-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A Haskell binding to a subset of the GD graphics library
--
-- This is a binding to a (currently very small) subset of the GD
-- graphics library.
@package gd
@version 3000.2.0
module Graphics.GD
data Image
type Size = (Int, Int)
type Point = (Int, Int)
type Color = CInt
-- | Create a new empty image.
newImage :: Size -> IO Image
-- | Make a copy of an image.
copyImage :: Image -> IO Image
-- | Creates an image, performs an operation on the image, and frees it.
-- This function allows block scoped management of Image objects.
-- If you are handling large images, the delay before the finalizer which
-- frees the image runs may cause significant temporary extra memory use.
-- Use this function to force the image to be freed as soons as you are
-- done with it. Note that it is unsafe to hold on to the Image
-- after the function is done.
withImage :: IO Image -> (Image -> IO b) -> IO b
-- | Load a JPEG image from a file.
loadJpegFile :: FilePath -> IO Image
-- | Load a JPEG image from a buffer.
loadJpegData :: Int -> Ptr a -> IO Image
-- | Load a PNG image from a file.
loadPngFile :: FilePath -> IO Image
-- | Load a PNG image from a buffer.
loadPngData :: Int -> Ptr a -> IO Image
-- | Load a GIF image from a file.
loadGifFile :: FilePath -> IO Image
-- | Load a GIF image from a buffer.
loadGifData :: Int -> Ptr a -> IO Image
-- | Save an image as a JPEG file.
saveJpegFile :: Int -> FilePath -> Image -> IO ()
-- | Save an image as a PNG file.
savePngFile :: FilePath -> Image -> IO ()
-- | Save an image as a GIF file.
saveGifFile :: FilePath -> Image -> IO ()
-- | Get the size of an image.
imageSize :: Image -> IO (Int, Int)
-- | Resize an image to a give size.
resizeImage :: Int -> Int -> Image -> IO Image
-- | Rotate an image by a multiple of 90 degrees counter-clockwise.
rotateImage :: Int -> Image -> IO Image
-- | Fill the entire image with the given color.
fillImage :: Color -> Image -> IO ()
drawFilledRectangle :: Point -> Point -> Color -> Image -> IO ()
drawFilledEllipse :: Point -> Size -> Color -> Image -> IO ()
drawLine :: Point -> Point -> Color -> Image -> IO ()
drawArc :: Point -> Size -> Int -> Int -> Color -> Image -> IO ()
-- | Use anti-aliasing when performing the given drawing function. This can
-- cause a segault with some gd versions.
antiAliased :: (Color -> Image -> IO a) -> Color -> Image -> IO a
setPixel :: Point -> Color -> Image -> IO ()
rgb :: Int -> Int -> Int -> Color
rgba :: Int -> Int -> Int -> Int -> Color