Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
Twinside committed Jun 29, 2016
2 parents f8ac9d9 + d9845ef commit db1248f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
4 changes: 2 additions & 2 deletions JuicyPixels.cabal
Original file line number Diff line number Diff line change
@@ -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==>>
Expand Down Expand Up @@ -28,7 +28,7 @@ Source-Repository head
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)
Expand Down
4 changes: 4 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 10 additions & 2 deletions src/Codec/Picture/Jpg/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,16 @@ putFrame (JpgHuffmanTable tables) =
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

Expand Down

0 comments on commit db1248f

Please sign in to comment.