GIF

Implements reader/writer for *.GIF-files. Animation is accessed from a sliding window of setting the required frame. Requires linking against the ncompress library for LZW support.

Constructors

this
this()

Empty constructor used by the loader

Members

Classes

ApplicationExtension
class ApplicationExtension

Application extension block

PlainTextExtension
class PlainTextExtension

Plain text extension of GIF89a

Static functions

load
load(F file)

Loads a *.gif file from a file

Static variables

extensionIntroducer
enum ubyte extensionIntroducer;

Extension identifier

Structs

GraphicsControlExtension
struct GraphicsControlExtension

Extension found in GIF89a versions

Header
struct Header

Header for both 87a and 89a versions.

ImageDescriptor
struct ImageDescriptor

Per image descriptor.

Variables

frames
ubyte[] frames;
Undocumented in source.
header
Header header;
Undocumented in source.
imageDescriptors
ImageDescriptor[] imageDescriptors;
Undocumented in source.

Inherited Members

From Image

_palette
IPalette _palette;

Contains palette data and information

_imageData
IImageData _imageData;

Contains image data and information.

mod
ubyte mod;

used for fast access of indexes DEPRECATED!

shift
ubyte shift;

used for fast access of indexes DEPRECATED!

width
uint width [@property getter]

Returns the width of the image in pixels.

height
uint height [@property getter]

Returns the height of the image in pixels.

isIndexed
bool isIndexed [@property getter]

Returns true if the image is indexed.

getBitdepth
ubyte getBitdepth [@property getter]

Returns the number of bits used per sample.

getPaletteBitdepth
ubyte getPaletteBitdepth [@property getter]

Returns the number of bits used per colormap entry.

getPixelFormat
uint getPixelFormat [@property getter]

Returns the pixelformat of the image. See enumerator PixelFormat for more info.

getPalettePixelFormat
uint getPalettePixelFormat [@property getter]

Returns the pixelformat of the palette. See enumerator PixelFormat for more info.

backgroundColorIndex
int backgroundColorIndex [@property getter]

Returns the background color index if there's any. Returns -1 if there's no background color, -2 if background color is not indexed.

backgroundColor
ARGB8888 backgroundColor [@property getter]

Returns the background color if there's any, or a default value otherwise.

getBitplanes
ubyte getBitplanes()

Returns the number of planes the image have. Default is one.

palette
IPalette palette()

Returns a palette range, which can be used to read the palette.

imageData
IImageData imageData()

Returns the image data.

readPixel
ARGB8888 readPixel(uint x, uint y)

Reads a single 32bit pixel. If the image is indexed, a color lookup will be done.

readPalette
ARGB8888 readPalette(size_t index)

Looks up the index on the palette, then returns the color value as a 32 bit value.

flipVertical
void flipVertical()

Flips the image on the vertical axis. Useful to set images to the correct top-left screen origin point.

flipHorizontal
void flipHorizontal()

Flips the image on the vertical axis. Useful to set images to the correct top-left screen origin point.

topOrigin
bool topOrigin()

Returns true if the image originates from the top

rightSideOrigin
bool rightSideOrigin()

Returns true if the image originates from the right

From MultiImage

getCurrentImage
uint getCurrentImage()

Returns which image is being set to be worked on.

setCurrentImage
uint setCurrentImage(uint frame)

Sets which image is being set to be worked on.

setStaticImage
void setStaticImage()

Sets the current image to the static if available

nOfImages
uint nOfImages()

Number of images in a given multi-image.

frameTime
uint frameTime()

Returns the frame duration in hmsec if animation for the given frame. Returns 0 if not an animation.

isAnimation
bool isAnimation()

Returns true if the multi-image is animated

Meta