|
|
|
|
|
|
Synopsis |
|
|
|
|
Types
|
|
type Image = ForeignPtr GDImage |
|
Loading images
|
|
JPEG
|
|
loadJpegFile :: FilePath -> IO Image |
Load a JPEG image from a file.
|
|
loadJpegData |
:: Int | Buffer size.
| -> Ptr a | Buffer with image data.
| -> IO Image | | Load a JPEG image from a buffer.
|
|
|
PNG
|
|
loadPngFile :: FilePath -> IO Image |
Load a PNG image from a file.
|
|
loadPngData |
:: Int | Buffer size.
| -> Ptr a | Buffer with image data.
| -> IO Image | | Load a PNG image from a buffer.
|
|
|
GIF
|
|
loadGifFile :: FilePath -> IO Image |
Load a GIF image from a file.
|
|
loadGifData |
:: Int | Buffer size.
| -> Ptr a | Buffer with image data.
| -> IO Image | | Load a GIF image from a buffer.
|
|
|
Saving images
|
|
JPEG
|
|
saveJpegFile |
:: Int | quality: 0-95, or negative for default quality.
| -> FilePath | | -> Image | | -> IO () | | Save an image as a JPEG file.
|
|
|
PNG
|
|
savePngFile :: FilePath -> Image -> IO () |
Save an image as a PNG file.
|
|
GIF
|
|
saveGifFile :: FilePath -> Image -> IO () |
Save an image as a GIF file.
|
|
Getting image information
|
|
imageSize |
:: Image | | -> IO (Int, Int) | (width, height)
| Get the size of an image.
|
|
|
Manipulating images
|
|
resizeImage |
:: Int | width in pixels of output image
| -> Int | height in pixels of output image
| -> Image | | -> IO Image | | Resize an image to a give size.
|
|
|
rotateImage |
:: Int | 1 for 90 degrees counter-clockwise,
2 for 180 degrees, etc.
| -> Image | | -> IO Image | | Rotate an image by a multiple of 90 degrees counter-clockwise
|
|
|
Produced by Haddock version 0.7 |