Home |
Image Convert |
Image ConvertImage Convert (program Pimagcon) is a utility program that can be used to convert .BMP, .GIF, .JPG, and .PNG files into binary or source code formats supported by RTPEG-32. Input files can be 1, 2, 4, 8, 16, or 24 bit-per-pixel formats. Likewise, Image Convert can generate 1, 2, 4, 8, 16, or 24 bit-per-pixel image files. During the image conversion process, the palette used to encode the output image can be saved in source format, suitable for use in calling the PegScreen SetupPalette() function. The actual operation of Image Convert strongly depends on the selected output format. Image Convert may perform color reduction, dithering, RLE compression, and transparency encoding for all input file types. In addition, for 8-bpp output formats, Image Convert adds optimal palette generation. While Image Convert can output PegBitmap structures in many formats, this is of little use if the PegScreen driver being used on the target is not capable of properly displaying the bitmaps in the format in which they are saved. For example, while Image Convert can save PegBitmap structures using 2-bpp encoding, this format should only be used if your derived PegScreen driver class understands and can properly display images saved in 2-bpp format. The PegScreen derived interface classes provided with On Time RTOS-32 support both 8-bpp bitmap encoding and the native encoding corresponding to the color depth of the target display. All of the options that can be selected on the Image Convert dialog window control the output of Image Convert. The format and data content of the input file(s) is determined by Image Convert by reading and parsing the input file header information. If the target supports 256 or more colors, Image Convert can also perform advanced palette reduction and optimization, allowing the creation and use of any number of color palettes, each of which is optimized for the images displayed in the application. This option is best utilized along with batch image processing (described below), which allows a custom palette to be created for optimal display of multiple images. The input files for list processing can be any combination of the supported file types, and can even have different internal formats in terms of the color resolution associated with each input file. Image Convert utilizes an improved form of Heckbert's Median Cut algorithm for color reduction.
|