Transform a raw gif image to an image, without modifying the pixels. This function can output the following images:
ModuleJuicyPixels-3.3.8Haskell2010
Codec.Picture.Gif
Module implementing GIF decoding.
- 5 types
- 14 values
- PackageJuicyPixels-3.3.8
- Exports19
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceGif.hs
Reading
5 declarationsTransform a raw gif image to an image, without modifying the pixels. This function can output the following images:
Metadatas include Width & Height information.
Return the gif image with metadata and palette. The palette is only returned for the first image of an animation and has no transparency.
Transform a raw gif to a list of images, representing all the images of an animation.
Extract a list of frame delays from a raw gif.
Writing
14 declarationsDelay to wait before showing the next Gif image. The delay is expressed in 100th of seconds.
GIF image definition for encoding
Constructors
An individual image frame in a GIF image
Constructors
GifFramegfXOffset :: IntImage X offset in GIF canvas
gfYOffset :: IntImage Y offset in GIF canvas
gfPalette :: Maybe PaletteImage local palette, optional if a global palette is given
gfTransparent :: Maybe IntTransparent color index, optional
gfDelay :: GifDelayFrame transition delay, in 1/100ths of a second
gfDisposal :: GifDisposalMethodFrame disposal method
gfPixels :: Image Pixel8Image pixels
Help to control the behaviour of GIF animation looping.
Constructors
LoopingNeverThe animation will stop once the end is reached
LoopingForeverThe animation will restart once the end is reached
LoopingRepeat Word16The animation will repeat n times before stoping
Encode a greyscale image to a bytestring.
Encode an image with a given palette. Can return errors if the palette is ill-formed.
A palette must have between 1 and 256 colors
Encode a gif animation to a bytestring.
Every image must have the same size
Every palette must have between one and 256 colors.
Encode a complex gif to a bytestring.
There must be at least one image.
The screen and every frame dimensions must be between 1 and 65535.
Every frame image must fit within the screen bounds.
Every palette must have between one and 256 colors.
There must be a global palette or every image must have a local palette.
The background color index must be present in the global palette.
Every frame's transparent color index, if set, must be present in the palette used by that frame.
Every color index used in an image must be present in the palette used by that frame.
Write a greyscale in a gif file on the disk.
Write a gif image with a palette to a file.
A palette must have between 1 and 256 colors
Write a list of images as a gif animation in a file.
Every image must have the same size
Every palette must have between one and 256 colors.
Default palette to produce greyscale images.