gd 3000.6.2 → 3000.7
raw patch · 2 files changed
+13/−3 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Graphics/GD.hsc +12/−2
- gd.cabal +1/−1
Graphics/GD.hsc view
@@ -24,7 +24,7 @@ -- * Getting image information imageSize, -- * Querying- GD.getPixel,+ getPixel, -- * Manipulating images resizeImage, rotateImage, -- * Drawing@@ -47,7 +47,6 @@ ) where -import qualified Graphics.GD.Internal as GD import Control.Exception (bracket) import Control.Monad (liftM, unless) import Data.Bits@@ -160,6 +159,8 @@ -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO () +foreign import ccall "gd.h gdImageGetPixel" gdImageGetPixel+ :: Ptr GDImage -> CInt -> CInt -> IO CInt -- Drawing functions @@ -416,7 +417,16 @@ dataByteString f = F.alloca $ \szPtr -> do datPtr <- f szPtr >>= F.newForeignPtr gdFree . F.castPtr liftM (B.fromForeignPtr datPtr 0 . fromIntegral) (F.peek szPtr)+ +--+-- * Querying+-- +-- | Retrieves the color index or the color values of a particular pixel.+getPixel :: (Int,Int) -> Image -> IO Color+getPixel (x,y) i = withImagePtr i f+ where f p' = gdImageGetPixel p' (int x) (int y)+ -- -- * Getting information about images. --
gd.cabal view
@@ -1,7 +1,7 @@ Name: gd Category: Graphics License-File: LICENSE-Version: 3000.6.2+Version: 3000.7 Cabal-version: >= 1.2 Build-type: Simple Copyright: Bjorn Bringert