gloss-export-0.1.0.2: Export Gloss pictures to png, bmp, tga, tiff, gif and juicy-pixels-image

Safe HaskellNone
LanguageHaskell2010

Graphics.Gloss.Export

Contents

Description

Main module for exporting gloss pictures to image files, gif animations and juicy-pixels image datatypes The canvas seems limited to (1853,1025) beyond that it's transparent

Synopsis

For tinkering yourself

withGlossState :: Size -> (State -> IO a) -> IO a Source #

Acquire the Gloss.State required by the withImage* functions. This allows the same OpenGL surface (of the given size) to be reused several times, which in turn makes Gloss bitmaps faster to render because their textures are kept in video memory.

withImage Source #

Arguments

:: OpenGLPixel pixel 
=> Size

(width, height) in pixels - as in Gloss.Display

-> Color

Background color

-> State

Obtained via withGlossState

-> Picture 
-> (Image pixel -> IO a) 
-> IO a 

convert a gloss Picture into an Image.

withImages Source #

Arguments

:: OpenGLPixel pixel 
=> Size

(width, height) in pixels - as in Gloss.Display

-> Color

Background color

-> State

Obtained via withGlossState

-> [Picture] 
-> ([Image pixel] -> IO a) 
-> IO a 

exportPictureToFormat Source #

Arguments

:: (FilePath -> Image PixelRGBA8 -> IO ())

function that saves an intermediate representation to a format. Written with writeXY from Codec.Picture in mind

-> Size

(width, heigth) in pixels - as in Gloss.Display

-> Color

Background color

-> FilePath 
-> Picture 
-> IO () 

Save a gloss Picture to a file.

exportPicturesToFormat Source #

Arguments

:: (FilePath -> Image PixelRGBA8 -> IO ())

function that saves an intermediate representation to a format. Written with writeXY from Codec.Picture in mind

-> Size

(width, height) in pixels - as in Gloss.Display

-> Color

background color

-> FilePath

must contain "%d", will be replaced by frame number

-> Animation

function that maps from point in time to Picture. analog to Gloss.Animation

-> [Float]

list of points in time at which to evaluate the animation

-> IO () 

Save a series of gloss Picture to files of spcified format.

Writing to PNG

exportPictureToPNG Source #

Arguments

:: Size

width, height in pixels

-> Color

background color

-> FilePath 
-> Picture 
-> IO () 

Save a gloss Picture as PNG

exportPicturesToPNG Source #

Arguments

:: Size

width, height in pixels

-> Color

background color

-> FilePath 
-> Animation

function that maps from point in time to Picture. analog to Gloss.Animation

-> [Float]

list of points in time at which to evaluate the animation

-> IO () 

Save a gloss animation as PNG

Writing to Bitmap

exportPictureToBitmap Source #

Arguments

:: Size

width, height in pixels

-> Color

background color

-> FilePath 
-> Picture 
-> IO () 

Save a gloss Picture as Bitmap

exportPicturesToBitmap Source #

Arguments

:: Size

width, height in pixels

-> Color

background color

-> FilePath 
-> Animation

function that maps from point in time to Picture. analog to Gloss.Animation

-> [Float]

list of points in time at which to evaluate the animation

-> IO () 

Save a gloss animation as Bitmap

Writing to Tga

exportPictureToTga Source #

Arguments

:: Size

width, height in pixels

-> Color

background color

-> FilePath 
-> Picture 
-> IO () 

Save a gloss Picture as Tga

exportPicturesToTga Source #

Arguments

:: Size

width, height in pixels

-> Color

background color

-> FilePath 
-> Animation

function that maps from point in time to Picture. analog to Gloss.Animation

-> [Float]

list of points in time at which to evaluate the animation

-> IO () 

Save a gloss animation as Tga

Writing to Tiff

exportPictureToTiff Source #

Arguments

:: Size

width, height in pixels

-> Color

background color

-> FilePath 
-> Picture 
-> IO () 

Save a gloss Picture as Tiff

exportPicturesToTiff Source #

Arguments

:: Size

width, height in pixels

-> Color

background color

-> FilePath 
-> Animation

function that maps from point in time to Picture. analog to Gloss.Animation

-> [Float]

list of points in time at which to evaluate the animation

-> IO () 

Save a gloss animation as Tiff

Writing to Gif

exportPicturesToGif Source #

Arguments

:: GifDelay

time between frames in centiseconds

-> GifLooping 
-> Size

width, height in pixels as in Gloss.Display

-> Color

background color

-> FilePath 
-> Animation

function that maps from point in time to Picture. analog to Gloss.Animation

-> [Float]

list of points in time at which to evaluate the animation

-> IO () 

Save a gloss animation as PNG

type GifDelay = Int #

Delay to wait before showing the next Gif image. The delay is expressed in 100th of seconds.

data GifLooping #

Help to control the behaviour of GIF animation looping.

Constructors

LoopingNever

The animation will stop once the end is reached

LoopingForever

The animation will restart once the end is reached

LoopingRepeat Word16

The animation will repeat n times before stoping