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 TIFF Portable format, supported by many tools on different platforms PCX Common file format on PC platforms GIF Graphical Interchange Format File JPEG Joint Photographic Experts Group File PNG Portable Network Graphics The following icon file formats are supported: Table 24. Supported icon file formats Format Description Windows ICO Native format for the Windows platform PNG Portable Network Graphics 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 CgGIFFileFormat GIF file format CgJPEGFileFormat JPEG file format CgPCXFileFormat PCX file format CgPNGFileFormat PNG 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.