packages feed

JuicyPixels 3.2.7.1 → 3.2.7.2

raw patch · 3 files changed

+16/−4 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Codec.Picture.Metadata: Author :: Keys String
- Codec.Picture.Metadata: Comment :: Keys String
- Codec.Picture.Metadata: Copyright :: Keys String
- Codec.Picture.Metadata: Description :: Keys String
- Codec.Picture.Metadata: Disclaimer :: Keys String
- Codec.Picture.Metadata: DpiX :: Keys Word
- Codec.Picture.Metadata: DpiY :: Keys Word
- Codec.Picture.Metadata: Exif :: !ExifTag -> Keys ExifData
- Codec.Picture.Metadata: Format :: Keys SourceFormat
- Codec.Picture.Metadata: Gamma :: Keys Double
- Codec.Picture.Metadata: Height :: Keys Word
- Codec.Picture.Metadata: Software :: Keys String
- Codec.Picture.Metadata: Source :: Keys String
- Codec.Picture.Metadata: Title :: Keys String
- Codec.Picture.Metadata: Unknown :: !String -> Keys Value
- Codec.Picture.Metadata: Warning :: Keys String
- Codec.Picture.Metadata: Width :: Keys Word
+ Codec.Picture: type family PixelBaseComponent a :: *;
+ Codec.Picture: }
+ Codec.Picture.Metadata: [Author] :: Keys String
+ Codec.Picture.Metadata: [Comment] :: Keys String
+ Codec.Picture.Metadata: [Copyright] :: Keys String
+ Codec.Picture.Metadata: [Description] :: Keys String
+ Codec.Picture.Metadata: [Disclaimer] :: Keys String
+ Codec.Picture.Metadata: [DpiX] :: Keys Word
+ Codec.Picture.Metadata: [DpiY] :: Keys Word
+ Codec.Picture.Metadata: [Exif] :: !ExifTag -> Keys ExifData
+ Codec.Picture.Metadata: [Format] :: Keys SourceFormat
+ Codec.Picture.Metadata: [Gamma] :: Keys Double
+ Codec.Picture.Metadata: [Height] :: Keys Word
+ Codec.Picture.Metadata: [Software] :: Keys String
+ Codec.Picture.Metadata: [Source] :: Keys String
+ Codec.Picture.Metadata: [Title] :: Keys String
+ Codec.Picture.Metadata: [Unknown] :: !String -> Keys Value
+ Codec.Picture.Metadata: [Warning] :: Keys String
+ Codec.Picture.Metadata: [Width] :: Keys Word
+ Codec.Picture.Types: type family PackedRepresentation a;
+ Codec.Picture.Types: }
- Codec.Picture: class (Storable (PixelBaseComponent a), Num (PixelBaseComponent a), Eq a) => Pixel a where type family PixelBaseComponent a :: * mixWithAlpha f _ = mixWith f pixelBaseIndex (Image {imageWidth = w}) x y = (x + y * w) * componentCount (undefined :: a) mutablePixelBaseIndex (MutableImage {mutableImageWidth = w}) x y = (x + y * w) * componentCount (undefined :: a)
+ Codec.Picture: class (Storable (PixelBaseComponent a), Num (PixelBaseComponent a), Eq a) => Pixel a where type PixelBaseComponent a :: * mixWithAlpha f _ = mixWith f pixelBaseIndex (Image {imageWidth = w}) x y = (x + y * w) * componentCount (undefined :: a) mutablePixelBaseIndex (MutableImage {mutableImageWidth = w}) x y = (x + y * w) * componentCount (undefined :: a) where {
- Codec.Picture: encodeBitmap :: (BmpEncodable pixel) => Image pixel -> ByteString
+ Codec.Picture: encodeBitmap :: forall pixel. (BmpEncodable pixel) => Image pixel -> ByteString
- Codec.Picture: encodeTiff :: (TiffSaveable px) => Image px -> ByteString
+ Codec.Picture: encodeTiff :: forall px. (TiffSaveable px) => Image px -> ByteString
- Codec.Picture: generateFoldImage :: (Pixel a) => (acc -> Int -> Int -> (acc, a)) -> acc -> Int -> Int -> (acc, Image a)
+ Codec.Picture: generateFoldImage :: forall a acc. (Pixel a) => (acc -> Int -> Int -> (acc, a)) -> acc -> Int -> Int -> (acc, Image a)
- Codec.Picture: generateImage :: (Pixel px) => (Int -> Int -> px) -> Int -> Int -> Image px
+ Codec.Picture: generateImage :: forall px. (Pixel px) => (Int -> Int -> px) -> Int -> Int -> Image px
- Codec.Picture: imageFromUnsafePtr :: (Pixel px, (PixelBaseComponent px) ~ Word8) => Int -> Int -> ForeignPtr Word8 -> Image px
+ Codec.Picture: imageFromUnsafePtr :: forall px. (Pixel px, (PixelBaseComponent px) ~ Word8) => Int -> Int -> ForeignPtr Word8 -> Image px
- Codec.Picture: imageIPixels :: (Pixel pxa, Pixel pxb) => Traversal (Image pxa) (Image pxb) (Int, Int, pxa) pxb
+ Codec.Picture: imageIPixels :: forall pxa pxb. (Pixel pxa, Pixel pxb) => Traversal (Image pxa) (Image pxb) (Int, Int, pxa) pxb
- Codec.Picture: imagePixels :: (Pixel pxa, Pixel pxb) => Traversal (Image pxa) (Image pxb) pxa pxb
+ Codec.Picture: imagePixels :: forall pxa pxb. (Pixel pxa, Pixel pxb) => Traversal (Image pxa) (Image pxb) pxa pxb
- Codec.Picture: pixelMap :: (Pixel a, Pixel b) => (a -> b) -> Image a -> Image b
+ Codec.Picture: pixelMap :: forall a b. (Pixel a, Pixel b) => (a -> b) -> Image a -> Image b
- Codec.Picture: withImage :: (Pixel pixel, PrimMonad m) => Int -> Int -> (Int -> Int -> m pixel) -> m (Image pixel)
+ Codec.Picture: withImage :: forall m pixel. (Pixel pixel, PrimMonad m) => Int -> Int -> (Int -> Int -> m pixel) -> m (Image pixel)
- Codec.Picture.Bitmap: encodeBitmap :: (BmpEncodable pixel) => Image pixel -> ByteString
+ Codec.Picture.Bitmap: encodeBitmap :: forall pixel. (BmpEncodable pixel) => Image pixel -> ByteString
- Codec.Picture.Bitmap: encodeBitmapWithMetadata :: BmpEncodable pixel => Metadatas -> Image pixel -> ByteString
+ Codec.Picture.Bitmap: encodeBitmapWithMetadata :: forall pixel. BmpEncodable pixel => Metadatas -> Image pixel -> ByteString
- Codec.Picture.Bitmap: encodeBitmapWithPaletteAndMetadata :: (BmpEncodable pixel) => Metadatas -> BmpPalette -> Image pixel -> ByteString
+ Codec.Picture.Bitmap: encodeBitmapWithPaletteAndMetadata :: forall pixel. (BmpEncodable pixel) => Metadatas -> BmpPalette -> Image pixel -> ByteString
- Codec.Picture.Jpg: encodeDirectJpegAtQualityWithMetadata :: (JpgEncodable px) => Word8 -> Metadatas -> Image px -> ByteString
+ Codec.Picture.Jpg: encodeDirectJpegAtQualityWithMetadata :: forall px. (JpgEncodable px) => Word8 -> Metadatas -> Image px -> ByteString
- Codec.Picture.Tiff: encodeTiff :: (TiffSaveable px) => Image px -> ByteString
+ Codec.Picture.Tiff: encodeTiff :: forall px. (TiffSaveable px) => Image px -> ByteString
- Codec.Picture.Types: class PackeablePixel a where type family PackedRepresentation a
+ Codec.Picture.Types: class PackeablePixel a where type PackedRepresentation a where {
- Codec.Picture.Types: class (Storable (PixelBaseComponent a), Num (PixelBaseComponent a), Eq a) => Pixel a where type family PixelBaseComponent a :: * mixWithAlpha f _ = mixWith f pixelBaseIndex (Image {imageWidth = w}) x y = (x + y * w) * componentCount (undefined :: a) mutablePixelBaseIndex (MutableImage {mutableImageWidth = w}) x y = (x + y * w) * componentCount (undefined :: a)
+ Codec.Picture.Types: class (Storable (PixelBaseComponent a), Num (PixelBaseComponent a), Eq a) => Pixel a where type PixelBaseComponent a :: * mixWithAlpha f _ = mixWith f pixelBaseIndex (Image {imageWidth = w}) x y = (x + y * w) * componentCount (undefined :: a) mutablePixelBaseIndex (MutableImage {mutableImageWidth = w}) x y = (x + y * w) * componentCount (undefined :: a) where {
- Codec.Picture.Types: extractComponent :: (Pixel px, Pixel (PixelBaseComponent px), PixelBaseComponent (PixelBaseComponent px) ~ PixelBaseComponent px, ColorPlane px plane) => plane -> Image px -> Image (PixelBaseComponent px)
+ Codec.Picture.Types: extractComponent :: forall px plane. (Pixel px, Pixel (PixelBaseComponent px), PixelBaseComponent (PixelBaseComponent px) ~ PixelBaseComponent px, ColorPlane px plane) => plane -> Image px -> Image (PixelBaseComponent px)
- Codec.Picture.Types: generateFoldImage :: (Pixel a) => (acc -> Int -> Int -> (acc, a)) -> acc -> Int -> Int -> (acc, Image a)
+ Codec.Picture.Types: generateFoldImage :: forall a acc. (Pixel a) => (acc -> Int -> Int -> (acc, a)) -> acc -> Int -> Int -> (acc, Image a)
- Codec.Picture.Types: generateImage :: (Pixel px) => (Int -> Int -> px) -> Int -> Int -> Image px
+ Codec.Picture.Types: generateImage :: forall px. (Pixel px) => (Int -> Int -> px) -> Int -> Int -> Image px
- Codec.Picture.Types: imageIPixels :: (Pixel pxa, Pixel pxb) => Traversal (Image pxa) (Image pxb) (Int, Int, pxa) pxb
+ Codec.Picture.Types: imageIPixels :: forall pxa pxb. (Pixel pxa, Pixel pxb) => Traversal (Image pxa) (Image pxb) (Int, Int, pxa) pxb
- Codec.Picture.Types: imagePixels :: (Pixel pxa, Pixel pxb) => Traversal (Image pxa) (Image pxb) pxa pxb
+ Codec.Picture.Types: imagePixels :: forall pxa pxb. (Pixel pxa, Pixel pxb) => Traversal (Image pxa) (Image pxb) pxa pxb
- Codec.Picture.Types: newMutableImage :: (Pixel px, PrimMonad m) => Int -> Int -> m (MutableImage (PrimState m) px)
+ Codec.Picture.Types: newMutableImage :: forall px m. (Pixel px, PrimMonad m) => Int -> Int -> m (MutableImage (PrimState m) px)
- Codec.Picture.Types: pixelFold :: (Pixel pixel) => (acc -> Int -> Int -> pixel -> acc) -> acc -> Image pixel -> acc
+ Codec.Picture.Types: pixelFold :: forall acc pixel. (Pixel pixel) => (acc -> Int -> Int -> pixel -> acc) -> acc -> Image pixel -> acc
- Codec.Picture.Types: pixelFoldMap :: (Pixel px, Monoid m) => (px -> m) -> Image px -> m
+ Codec.Picture.Types: pixelFoldMap :: forall m px. (Pixel px, Monoid m) => (px -> m) -> Image px -> m
- Codec.Picture.Types: pixelMap :: (Pixel a, Pixel b) => (a -> b) -> Image a -> Image b
+ Codec.Picture.Types: pixelMap :: forall a b. (Pixel a, Pixel b) => (a -> b) -> Image a -> Image b
- Codec.Picture.Types: pixelMapXY :: (Pixel a, Pixel b) => (Int -> Int -> a -> b) -> Image a -> Image b
+ Codec.Picture.Types: pixelMapXY :: forall a b. (Pixel a, Pixel b) => (Int -> Int -> a -> b) -> Image a -> Image b
- Codec.Picture.Types: readPackedPixelAt :: (Pixel px, PackeablePixel px, Storable (PackedRepresentation px), PrimMonad m) => MutableImage (PrimState m) px -> Int -> m px
+ Codec.Picture.Types: readPackedPixelAt :: forall m px. (Pixel px, PackeablePixel px, Storable (PackedRepresentation px), PrimMonad m) => MutableImage (PrimState m) px -> Int -> m px
- Codec.Picture.Types: unsafeExtractComponent :: (Pixel a, Pixel (PixelBaseComponent a), PixelBaseComponent (PixelBaseComponent a) ~ PixelBaseComponent a) => Int -> Image a -> Image (PixelBaseComponent a)
+ Codec.Picture.Types: unsafeExtractComponent :: forall a. (Pixel a, Pixel (PixelBaseComponent a), PixelBaseComponent (PixelBaseComponent a) ~ PixelBaseComponent a) => Int -> Image a -> Image (PixelBaseComponent a)
- Codec.Picture.Types: withImage :: (Pixel pixel, PrimMonad m) => Int -> Int -> (Int -> Int -> m pixel) -> m (Image pixel)
+ Codec.Picture.Types: withImage :: forall m pixel. (Pixel pixel, PrimMonad m) => Int -> Int -> (Int -> Int -> m pixel) -> m (Image pixel)
- Codec.Picture.Types: zipPixelComponent3 :: (Storable (PixelBaseComponent px)) => (PixelBaseComponent px -> PixelBaseComponent px -> PixelBaseComponent px -> PixelBaseComponent px) -> Image px -> Image px -> Image px -> Image px
+ Codec.Picture.Types: zipPixelComponent3 :: forall px. (Storable (PixelBaseComponent px)) => (PixelBaseComponent px -> PixelBaseComponent px -> PixelBaseComponent px -> PixelBaseComponent px) -> Image px -> Image px -> Image px -> Image px

Files

JuicyPixels.cabal view
@@ -1,5 +1,5 @@ Name:                JuicyPixels-Version:             3.2.7.1+Version:             3.2.7.2 Synopsis:            Picture loading/serialization (in png, jpeg, bitmap, gif, tga, 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.2.7.1+    Tag:       v3.2.7.2  Flag Mmap     Description: Enable the file loading via mmap (memory map)
changelog view
@@ -1,6 +1,10 @@ Change log ========== +v3.2.7.2 June 2016+------------------+ * Fix: no more libjpeg warning when decoding Juicy.Pixels encoded images.+ v3.2.7.1 May 2016 -----------------  * Fix: some wrongly infinitely looping JPEG decoding
src/Codec/Picture/Jpg/Types.hs view
@@ -444,8 +444,16 @@     put JpgHuffmanTableMarker >> put (TableList $ map fst tables) putFrame (JpgIntervalRestart size) =     put JpgRestartInterval >> put (RestartInterval size)-putFrame (JpgScanBlob hdr blob) =-    put JpgStartOfScan >> put hdr >> putLazyByteString blob+putFrame (JpgScanBlob hdr blob) = do+    put JpgStartOfScan+    put hdr+    putLazyByteString blob+    putWord8 0 -- AKA the libjpeg pleaser, for some unknown reason+               -- libjpeg raise a warning "invalid end of data segment".+               -- so dumbly pad, seems to make the warning go away (and+               -- I don't want to invest that much time looking for that).+               --+               -- Ok this is a crummy fix.... putFrame (JpgScans kind hdr) =     put kind >> put hdr