Re: ReadImageBlob error in 1.3.31

Bob Friesenhahn <[email protected]> Thu, 31 Jan 2019 08:19:54 -0600 (CST)
Newsgroups gmane.comp.video.graphicsmagick.help
Message-ID <[email protected]>
On Thu, 31 Jan 2019, yzh卯帽潞锚 wrote:

> Hi,  Bob,
>
> We upgrade GM from 1.3.21 to 1.3.31 in our production environment.
>
> However, 1.3.31 and 1.3.21 behave differently. There is a large increase of ReadImageBlob error in 1.3.31, and main error message is "Error:Corrupt JPEG data: bad Huffman code (), ExceptionType = 425."
>
> Because, in most cases, only a tiny part of image is damaged and not affect viewing.
>
> So, I want to know is there a way can these images pass ReadImageBlob.

Sorry for the troubles.

I added a define option 'jpeg:max-warnings=<value>' which is supposed 
to allow tuning how many corruption warnings may be reported before 
reporting an error.  For example:

   gm convert -define jpeg:max-warnings=1000 infile.jpg outfile.jpg

Does this help?  If it does help, then please help us with choosing a 
better default value for the limit.

There was also a 'jpeg:max-scan-number=<value>' option added which 
sets a maximum limit on progressive scans.

These changes were made due to small JPEG files which might take hours 
or even days to "read" due to the design of the JPEG file format. 
Some sample files produce warning after warning, consuming quite a lot 
of resources before the reader eventually gets done with reading.

Bob
-- 
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt

_______________________________________________
Graphicsmagick-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help