|
|
|
|
|
|
| Synopsis |
|
|
|
|
| Types
|
|
|
|
|
|
|
|
|
|
| Creating and copying images
|
|
|
| Create a new empty image.
|
|
|
| Make a copy of an image.
|
|
| Loading images
|
|
| JPEG
|
|
|
| Load a JPEG image from a file.
|
|
|
| :: | | | => Int | Buffer size.
| | -> Ptr a | Buffer with image data.
| | -> IO Image | | | Load a JPEG image from a buffer.
|
|
|
| PNG
|
|
|
| Load a PNG image from a file.
|
|
|
| :: | | | => Int | Buffer size.
| | -> Ptr a | Buffer with image data.
| | -> IO Image | | | Load a PNG image from a buffer.
|
|
|
| GIF
|
|
|
| Load a GIF image from a file.
|
|
|
| :: | | | => Int | Buffer size.
| | -> Ptr a | Buffer with image data.
| | -> IO Image | | | Load a GIF image from a buffer.
|
|
|
| Saving images
|
|
| JPEG
|
|
|
| :: Int | quality: 0-95, or negative for default quality.
| | -> FilePath | | | -> Image | | | -> IO () | | | Save an image as a JPEG file.
|
|
|
| PNG
|
|
|
| Save an image as a PNG file.
|
|
| GIF
|
|
|
| Save an image as a GIF file.
|
|
| Getting image information
|
|
|
| :: Image | | | -> IO (Int, Int) | (width, height)
| | Get the size of an image.
|
|
|
| Manipulating images
|
|
|
| :: Int | width in pixels of output image
| | -> Int | height in pixels of output image
| | -> Image | | | -> IO Image | | | Resize an image to a give size.
|
|
|
|
| :: 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.
|
|
|
| Drawing
|
|
|
| Fill the entire image with the given color.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Use anti-aliasing when performing the given drawing function.
This can cause a segault with some gd versions.
|
|
|
|
| Colors
|
|
|
|
|
|
| :: Int | Red (0-255)
| | -> Int | Green (0-255)
| | -> Int | Blue (0-255)
| | -> Int | Alpha (0-127), 0 is opaque, 127 is transparent
| | -> Color | |
|
|
| Produced by Haddock version 2.1.0 |