
These figures illustrate the syntax and options for the contentFormat operator.įigure D-1 illustrates the contentFormat syntax that you use to convert an image to monochrome.įor finer control of the image output when you convert an image to monochrome, use the quantize operator with the ERRORDIFFUSION, ORDEREDDITHER, or THRESHOLD value. Otherwise, a default content format is chosen depending on the destination file format. If the contentFormat operator is not passed to the process( ) method, then Oracle Multimedia attempts to duplicate the content format of the source image if it is supported by the file format of the destination image. If the LUT image supports an alpha channel, then the table usually uses 32 bits to represent each color. Typically, the color table uses 24 bits to represent the possible colors, so although only 16 colors might be available in an image, they could each be any of up to 16 million possible RGB combinations. A 1-bit LUT image would have 1-bit pixels and 2 possible colors (2^1), a 4-bit image would have 16 (2^4) possible colors, and an 8-bit image would have 256 (2^8) possible colors. The bit depth of a LUT image indicates both the size of the pixel data and the number of possible colors in the lookup table. LUT images (also referred to as indexed color images) store possible color values in a table of possible color combinations, and pixel data then indicate which possible color from the table is to be used. In direct color images, the bit depth of the image indicates the size of the pixel data monochrome images are implicitly 1 bit deep, grayscale images are 8 bits deep, or 16 if an optional 8-bit alpha channel is present, and RGB images are 24 bits deep - usually 8 bits each for red, green, and blue, or 32 bits deep if an optional 8-bit alpha channel is present. This category includes monochrome images (pure black and white), grayscale images (shades of gray) and RGB (true color) images. In direct color images, the pixel data indicate color values directly, without reference to any additional information. Image content formats fall into two broad categories, as follows: Depending on which file format is used to store the output image, some or most of the content formats may not be supported. The content means the number of colors supported by the image and the manner in which they are supported. The contentFormat operator determines the format of the image content. If the source image is a foreign image, the output image is written as Raw Pixel. If the file format of the source image does not support output, an error occurs. If the fileFormat operator is not used in the process( ) command string, Oracle Multimedia determines the file format of the source image and uses that as the default file format value.



This value determines the range of allowable content and compression formats, whether compression quality is useful, and whether the format-specific operators is useful. The value given to the fileFormat operator is the single most important detail when specifying the output for process( ). Appendix B contains basic information about each file format, including its mnemonic (file format), typical file extension, allowable compression and content formats, and other notable features. The list of allowable values for the image fileFormat operator is shown in Table 5-1 in Chapter 5. The value of this operator is a 4-character code, which is a mnemonic for the new file format name. The fileFormat operator determines the image file type, or format, of the output image.
