packages feed

JuicyPixels 3.1.7 → 3.1.7.1

raw patch · 3 files changed

+12/−6 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

JuicyPixels.cabal view
@@ -1,5 +1,5 @@ Name:                JuicyPixels
-Version:             3.1.7
+Version:             3.1.7.1
 Synopsis:            Picture loading/serialization (in png, jpeg, bitmap, gif, tiff and radiance)
 Description:
     <<data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADABAMAAACg8nE0AAAAElBMVEUAAABJqDSTWEL/qyb///8AAABH/1GTAAAAAXRSTlMAQObYZgAAAN5JREFUeF7s1sEJgFAQxFBbsAV72v5bEVYWPwT/XDxmCsi7zvHXavYREBDI3XP2GgICqBBYuwIC+/rVayPUAyAg0HvIXBcQoDFDGnUBgWQQ2Bx3AYFaRoBpAQHWb3bt2ARgGAiCYFFuwf3X5HA/McgGJWI2FdykCv4aBYzmKwDwvl6NVmUAAK2vlwEALK7fo88GANB6HQsAAAAAAAAA7P94AQCzswEAAAAAAAAAAAAAAAAAAICzh4UAO4zWAYBfRutHA4Bn5C69JhowAMGoBaMWDG0wCkbBKBgFo2AUAACPmegUST/IJAAAAABJRU5ErkJggg==>>
@@ -28,7 +28,7 @@ Source-Repository this
     Type:      git
     Location:  git://github.com/Twinside/Juicy.Pixels.git
-    Tag:       v3.1.7
+    Tag:       v3.1.7.1
 
 Flag Mmap
     Description: Enable the file loading via mmap (memory map)
changelog view
@@ -1,5 +1,10 @@ -*-change-log-*-
 
+v3.1.7.1 August 2014
+ * Previous gif fix was not working withing the readImage
+   function, only in specialized gif images. Correcting
+   miscorection
+
 v3.1.7 August 2014
  * Making Juicy.Pixels compatible with GHC 7.9 HEAD (ggreif)
  * Adding writing to uncompressed radiance file, due to
src/Codec/Picture/Gif.hs view
@@ -441,7 +441,7 @@           if hasGlobalMap screenDesc then
             getPalette $ colorTableSize screenDesc
           else
-            return $ Image 0 1 V.empty
+            return $ greyPalette
 
         return GifHeader
             { gifVersion = version
@@ -597,9 +597,10 @@                      pixeler x y = pixelAt oldImage x y
 
 decodeFirstGifImage :: GifFile -> Either String (Image PixelRGB8)
-decodeFirstGifImage
-        GifFile { gifHeader = GifHeader { gifGlobalMap = palette}
-                , gifImages = ((_, gif):_) } = Right . substituteColors palette $ decodeImage gif
+decodeFirstGifImage img@GifFile { gifImages = (firstImage:_) } =
+    case decodeAllGifImages img { gifImages = [firstImage] } of
+      [] -> Left "No image after decoding"
+      (i:_) -> Right i
 decodeFirstGifImage _ = Left "No image in gif file"
 
 -- | Transform a raw gif image to an image, witout