Programmer's Reference


Image and icon file formats

There are many file formats used for storing images and icons. Common Graphics provides several classes for reading and writing standard file formats. The following image file formats are supported:

Table 23. Supported image file formats

Format Description
Windows BMP Native format for the Windows platform
PM BMP Native format for the PM platform
TIFF Portable format, supported by many tools on different platforms
PCX Common file format on PC platforms

The following icon file formats are supported:

Table 24. Supported icon file formats

Format Description
Windows ICO Native format for the Windows platform
PM ICO Native format for the PM platform

The following table shows the class hierarchy that implements the file format framework of Common Graphics. This framework provides methods to load and unload images and icons in these formats, to test whether a file has a given format, and to detect what the format of a given file is.

Table 25. File format class hierarchy

Class Description.
CgFileFormat Abstract file format class
 CgIconFileFormat Abstract icon file format class
  CgPMICOFileFormat PM ICO file format
  CgWinICOFileFormat Windows ICO file format
 CgImageFileFormat Abstract image file format class
  CgPCXFileFormat PCX file format
  CgPMBMPFileFormat PM BMP file format
  CgTIFFFileFormat TIFF file format
  CgWinBMPFileFormat Windows BMP file format

In addition to loading from files and unloading into files, Common Graphics provides methods to load from ByteArrays and unload into ByteArrays. Error handling methods are also provided. These methods are described in the following sections.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]