The Image Classes
Figure 85 shows the hierarchy of the Objective Toolkit image classes.
Figure 85 – Objective Toolkit image class hierarchy
SECImage
SECImage is an abstract base class from which the individual image file format classes derive. The SECImage class contains most of the functionality provided by Objective Toolkit’s image support such as reading, writing, format conversion, and limited image manipulation.
The format-specific derivatives act as translators for reading the format-specific image bits into the internal SECImage format and writing from the internal SECImage format to the specific image format. For example, SECPcx is an SECImage derivative that can read a .PCX file, convert it to the internal SECImage format and then write the SECImage format out as a .PCX file.
This architecture isolates image format-specific code to the derived image classes and places general image handling routines in the SECImage base class.
Because SECImage is an abstract base class, you cannot create an instance of it. Instead, use one of the image format-specific derivative classes: SECDib, SECGif, SECJpeg, SECPcx, SECTarga, or SECTiff.
SECDib
The SECDib class supports the reading and writing of the Windows Device Independent Bitmap (.DIB) format. Typically, these files have .bmp or .dib extensions. SECDib supports all color and compression formats for DIBs.
SECGif
The SECGif class supports reading and writing for Graphic Information File (.GIF) images. The GIF format is defined by CompuServe and is currently one of the standard image types used by Internet World Wide Web (WWW) browsers. Support is also included for interlaced as well as transparent GIF images.
SECJpeg
The SECJpeg class supports the JPEG compression scheme found in JFIF (JPEG File Interchange Format) files, which is used in many Internet World Wide Web browsers and professional image applications. SECJpeg is based on the version 1.02 JFIF standard. Objective Toolkit includes support for progressive JPEG images.
SECPcx
The SECPcx class supports the PC eXchange (PCX) format that many Windows graphics applications use for exchanging images. The current version of SECPcx only supports writing out to 256 colors.
SECTarga
The SECTarga class handles the TGA (TARGA Image File) format as defined by Truevision. TGA is used in video-capturing applications and supports 24-bit color. SECTarga only supports 24-bit-per-pixel images.
SECTiff
The SECTiff class can read and write Tagged Image File Format (TIFF) files. TIFF files are common in scanning applications. SECTiff supports version 6.0 of the TIFF standard and includes support for all image depths and compression schemes.
NOTE >> The TIFF library has been upgraded to version 4.2.0, released in December 2020.