yarr-image-io 0.9.1 → 0.9.2
raw patch · 2 files changed
+15/−6 lines, 2 filesdep ~yarrPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: yarr
API changes (from Hackage documentation)
+ Data.Yarr.IO.Image: data Word8 :: *
+ Data.Yarr.IO.Image: instance Show Image
Files
- Data/Yarr/IO/Image.hsc +13/−4
- yarr-image-io.cabal +2/−2
Data/Yarr/IO/Image.hsc view
@@ -1,11 +1,11 @@ module Data.Yarr.IO.Image ( -- * The Image array type - Image (..)+ Image (..), Word8, -- * Image IO - , readImage, writeImage, readRGB, readRGBVectors- ) where+ readImage, writeImage, readRGB, readRGBVectors,+) where import Control.Applicative (Applicative, (<$>)) import Control.Monad (when)@@ -43,6 +43,15 @@ | BGR (UArray F L Dim2 (VecList N3 Word8)) | Grey (UArray F L Dim2 Word8) +instance Show Image where+ show i = case i of+ (RGBA arr) -> s "RGBA" arr+ (RGB arr) -> s "RGB" arr+ (BGRA arr) -> s "BGRA" arr+ (BGR arr) -> s "BGR" arr+ (Grey arr) -> s "Grey" arr+ where s t arr = t ++ " " ++ (show (extent arr))+ -- | @readRGBVectors = 'readRGB' 'construct'@ readRGBVectors :: (Vector v Word8, Dim v ~ N3)@@ -55,7 +64,7 @@ -- -- @ -- anyImage <- 'readImage' \"lena.png\"--- let image = readRGB (\r g b -> ...) anyImage+-- let image = readRGB (\\r g b -> ...) anyImage -- @ readRGB :: (Fun N3 Word8 a) -- ^ Passed red, green, blue component in @0-255@ range
yarr-image-io.cabal view
@@ -1,5 +1,5 @@ Name: yarr-image-io-Version: 0.9.1+Version: 0.9.2 Synopsis: Image IO for Yarr library Description: @repa-devil@ package, adapted to @yarr@ library.@@ -20,7 +20,7 @@ Library build-depends: base == 4.6.*,- yarr == 0.9.1+ yarr == 0.9.2 extra-libraries: IL