iflGIF(3)
NAME
- iflGIF - GIF format image file
HEADER FILE
- #include <ifl/iflGIF.h>
DESCRIPTION
- This Image Format Library provides support to read/write image files
stored in Compuserve Graphics Image File (GIF) format.
- The default extension for image files in the GIF format is '.gif'.
When you create a file with that extension IFL will assume you want
the GIF format, unless you override it with the iflFormat parameter.
Since GIF files always use a color palette, and there is no default
pallette, the color map must be set before calling the
setTile() method. You can either specify a global color map
using the setTag() method or a local color map using
setColormap().
- In addition to all the standard iflFile methods, this format supports a
number of format specific operations via the getTag() and setTag()
methods. The tag values supported by these methods are enumerated in the
following sections.
TAG VALUES FOR GET ITEM
- The following tag values are supported with getItem():
iflGIFtransparentColor
- iflStatus getItem(iflGIFtransparentColor, int* red, int* green, int* blue)
- If the GIF image being read has a transparent pixel i.e. it is intended
that a single index value be treated as a transparent pixel, then the
corresponding r,g,b values in the images colormap for that transparent
index is returned in red, green and blue. If there is no transparent
pixel then red, green and blue will be returned as -1.
iflGIFtransparentIndex
- iflStatus getItem(iflGIFtransparentColor, int* index)
- If the GIF image being read has a transparent pixel i.e. it is intended
that a single index value be treated as a transparent pixel, then the
value of that transparent index is returned in index. If there is no
transparent pixel then index will be returned as -1.
iflGIFinterlace
- iflStatus getItem(iflGIFinterlace, int* interlaced)
- If the GIF image being read is interlaced then TRUE will be returned in
interlaced, otherwise FALSE will be returned.
iflGIFdelayTime
- iflStatus getItem(iflGIFdelayTime, int* delayTime)
- Returns the delay time for the current image in 1/100ths of a second or
zero if no delay is specified.
iflGIFdisposalMethod
-
iflStatus getItem(iflGIFdisposalMethod, int* method)
-
Returns how the graphic is treated after being displayed.
-
iflGIFuserInput
-
iflStatus getItem(iflGIFuserInput, int* input)
-
Returns TRUE if user input is expected before continuing after this
image.
-
iflGIFleftPosition
-
iflStatus getItem(iflGIFleftPosition, int* left)
-
Returns the position of the left edge of this image in the logical
screen.
-
iflGIFtopPosition
-
iflStatus getItem(iflGIFtopPosition, int* top)
-
Returns the position of the top edge of this image in the logical screen.
-
iflGIFscreenWidth
-
iflStatus getItem(iflGIFscreenWidth, int* width)
-
Returns the logical screen width for all sub-images.
-
iflGIFscreenHeight
-
iflStatus getItem(iflGIFscreenHeight, int* height)
-
Returns the logical screen height for all sub-images.
-
iflGIFaspectRatio
-
iflStatus getItem(iflGIFaspectRatio, float* ratio)
-
Returns the quotient of a pixel's width over its height or
ilUNSUPPORTEDBYFILE status if no aspect ration is specified for this
image.
-
iflGIFglobalMap
-
iflStatus getItem(iflGIFglobalMap, const iflColormap** cmap)
-
Returns the global color map for the file or ilUNSUPPORTEDBYFILE status
if no global color map has been specified.
-
iflGIFbackgroundIndex
-
iflStatus getItem(iflGIFbackgroundIndex, int* index)
-
Returns the background color index for the logical screen or
ilUNSUPPORTEDBYFILE status if none has been specified.
-
iflGIFbackgroundColor
-
iflStatus getItem(iflGIFbackgroundColor, int* red, int* green,
int* blue)
-
Returns the color of the background pixel or ilUNSUPPORTEDBYFILE status
if none has been specified.
-
iflGIFloopCount
-
iflStatus getItem(iflGIFloopCount, int* count)
-
Returns the loop count for the animation sequence or
ilUNSUPPORTEDBYFILE status if none has been specified.
-
TAG VALUES FOR SET ITEM
- The following tag values are supported with setItem():
iflGIFtransparentIndex
- iflStatus setItem(iflGIFtransparentColor, int index)
- Set the index value of the image's transparent pixel to index.
iflGIFinterlace
- iflStatus setItem(iflGIFinterlace, int interlaced)
- If interlaced = TRUE, then the GIF image produced will be interlaced;
otherwise not.
iflGIFdelayTime
- iflStatus setItem(iflGIFdelayTime, int delayTime)
- Sets the delay time for the current image in 1/100ths of a second.
iflGIFdisposalMethod
-
iflStatus setItem(iflGIFdisposalMethod, int method)
Sets how the graphic is treated after being displayed.
iflGIFuserInput
-
iflStatus setItem(iflGIFuserInput, int input)
Indicates that user input is expected before continuing after this
image if input is TRUE.
iflGIFleftPosition
-
iflStatus setItem(iflGIFleftPosition, int left)
-
Sets the position of the left edge of this image in the logical screen.
iflGIFtopPosition
-
iflStatus setItem(iflGIFtopPosition, int top)
-
Sets the position of the top edge of this image in the logical screen.
iflGIFscreenWidth
-
iflStatus setItem(iflGIFscreenWidth, int width)
-
Sets the logical screen width for all sub-images.
iflGIFscreenHeight
-
iflStatus setItem(iflGIFscreenHeight, int height)
-
Sets the logical screen height for all sub-images.
iflGIFaspectRatio
-
iflStatus setItem(iflGIFaspectRatio, float ratio)
-
Sets the quotient of a pixel's width over its height; must be specified
before any images are written.
iflGIFglobalMap
-
iflStatus setItem(iflGIFglobalMap, const iflColormap* cmap)
-
Sets the global color map for the file; must be specified before any
images are written.
iflGIFbackgroundIndex
-
iflStatus setItem(iflGIFbackgroundIndex, int index)
-
Sets the background color index for the logical screen; must be
specified before any images are written.
iflGIFloopCount
-
iflStatus setItem(iflGIFloopCount, int count)
-
Sets the loop count for the animation sequence; must be specified
before any images are written.
SEE ALSO
- iflFile, ilFileImg