========================================================== DOCUMENTATION NOTES FOR Informix Image Foundation Datablade Module, Version 2.00 DATE: 01/17/2001 ========================================================== TABLE OF CONTENTS I. Overview of Documentation Notes +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ I. Overview of Documentation Notes =================================== These documentation notes describe features not documented in the "Informix Image Foundation DataBlade Module User's Guide." Informix reserves the right to drop support for any of these functions in future releases. SETCOLOR GIF Property --------------------- The user can force specific colors to appear in a GIF image. GIFs can have at most 256 colors so it is sometimes necessary to reduce the number of colors in an image when displaying or saving it as a GIF. Specifically, this means that most colors in the original image will not appear in the resulting GIF. When colors are reduced, the server creates a palette for the image by finding clusters of similar colors in the image and replacing them with a single representative color. The reduced color image is created by replacing colors in the original image with the nearest color in the palette. The server tries to chose representative colors to minimize the difference between the original image and the reduced color image. The setcolor property allows specific colors to be inserted into the palette; any remaining colors are determined as before. The format for the setcolor property is exemplified below: execute function NewImage( CVT('photo.psd', 'wid=200'), 'photo.gif?fmt=image/gif,setcolor=0x00RRGGBB' ); where 0x00RRGGBB represents the color hexadecimal value that determines the color you want to be present in the palete. The setcolor GIF property specifies the color that is to be preserved as a 6-digit hexadecimal number with two digits for each of the red, green and blue components of the color (in that order). TRANSPARENCY GIF Property ------------------------- The following illustrates an example of how the transparency property would be used in creating transparent GIF images: To create a transparent GIF, an index for the transparent color must be specified. This index is set using the "transparency" option. In order to make a specific color in the original image appear transparent, that color should be inserted into the palette using the setcolor option. Setcolor also ensures that the transparent color will be at a certain index because colors specified using the "setcolor" option are indexed as each "setcolor" option is encountered from left to right. The first setcolor is indexed as 0, the next is indexed as 1 and so on. The CVT command for creating a transparent GIF would be as follows: execute function NewImage( CVT('photo.psd', 'wid=200'), 'photo.gif?fmt=image/gif,setcolor=0x00RRGGBB,transparency=0 ); This example assumes that white is the transparent color and inserts it into the palette using the property setcolor=ffffff. The inserted color is placed at the first palette index, which is 0. The option 'transparency=0' specifies that palette index 0 is to represent the transparent color in the resulting GIF image.