commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruno P. Kinoshita (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (IMAGING-143) Decompression Exception of Tiff Group 3 with T4 Options = 4
Date Sat, 30 Dec 2017 09:56:01 GMT

     [ https://issues.apache.org/jira/browse/IMAGING-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Bruno P. Kinoshita updated IMAGING-143:
---------------------------------------
    Description: 
I have multiple tiff images that are causing an "ImageReadException: Decompression error".
 All are Group 3 (T.4) encoded with T4Options tag value 4 (zero fill to byte).  Other Group
3 images without T4Options 4 work fine.

Stepping through Imaging 1.0 RC7, the hasFill boolean is being set properly to true. The exception
is thrown at the bottom of method HuffmanTree.java decode(bitStream).  Nothing is passed to
this method indicating zero fill or not.  I will attach a test image that reproduces the issue.
 The stack trace:

{noformat}
Caused by: org.apache.commons.imaging.ImageReadException: Decompression error
       at org.apache.commons.imaging.common.itu_t4.T4AndT6Compression.decompressT4_1D(T4AndT6Compression.java:254)
       at org.apache.commons.imaging.formats.tiff.datareaders.DataReader.decompress(DataReader.java:163)
       at org.apache.commons.imaging.formats.tiff.datareaders.DataReaderStrips.readImageData(DataReaderStrips.java:216)
       at org.apache.commons.imaging.formats.tiff.TiffImageParser.getBufferedImage(TiffImageParser.java:676)
       at org.apache.commons.imaging.formats.tiff.TiffDirectory.getTiffImage(TiffDirectory.java:161)
       at org.apache.commons.imaging.formats.tiff.TiffImageParser.getBufferedImage(TiffImageParser.java:478)
       at org.apache.commons.imaging.Imaging.getBufferedImage(Imaging.java:1379)
       at org.apache.commons.imaging.Imaging.getBufferedImage(Imaging.java:1293)
       at com.dstresearch.baseutils.ApacheImagingUtil.readImage(ApacheImagingUtil.java:157)
       ... 27 more
Caused by: org.apache.commons.imaging.common.itu_t4.HuffmanTreeException: Invalid bit pattern
       at org.apache.commons.imaging.common.itu_t4.HuffmanTree.decode(HuffmanTree.java:89)
       at org.apache.commons.imaging.common.itu_t4.T4AndT6Compression.decompressT4_1D(T4AndT6Compression.java:240)
       ... 35 more
{noformat}


  was:
I have multiple tiff images that are causing an "ImageReadException: Decompression error".
 All are Group 3 (T.4) encoded with T4Options tag value 4 (zero fill to byte).  Other Group
3 images without T4Options 4 work fine.

Stepping through Imaging 1.0 RC7, the hasFill boolean is being set properly to true. The exception
is thrown at the bottom of method HuffmanTree.java decode(bitStream).  Nothing is passed to
this method indicating zero fill or not.  I will attach a test image that reproduces the issue.
 The stack trace:

{noformat}
Caused by: org.apache.commons.imaging.ImageReadException: Decompression error

       at org.apache.commons.imaging.common.itu_t4.T4AndT6Compression.decompressT4_1D(T4AndT6Compression.java:254)

       at org.apache.commons.imaging.formats.tiff.datareaders.DataReader.decompress(DataReader.java:163)

       at org.apache.commons.imaging.formats.tiff.datareaders.DataReaderStrips.readImageData(DataReaderStrips.java:216)

       at org.apache.commons.imaging.formats.tiff.TiffImageParser.getBufferedImage(TiffImageParser.java:676)

       at org.apache.commons.imaging.formats.tiff.TiffDirectory.getTiffImage(TiffDirectory.java:161)

       at org.apache.commons.imaging.formats.tiff.TiffImageParser.getBufferedImage(TiffImageParser.java:478)

       at org.apache.commons.imaging.Imaging.getBufferedImage(Imaging.java:1379)

       at org.apache.commons.imaging.Imaging.getBufferedImage(Imaging.java:1293)

       at com.dstresearch.baseutils.ApacheImagingUtil.readImage(ApacheImagingUtil.java:157)

       ... 27 more

Caused by: org.apache.commons.imaging.common.itu_t4.HuffmanTreeException: Invalid bit pattern

       at org.apache.commons.imaging.common.itu_t4.HuffmanTree.decode(HuffmanTree.java:89)

       at org.apache.commons.imaging.common.itu_t4.T4AndT6Compression.decompressT4_1D(T4AndT6Compression.java:240)

       ... 35 more

{noformat}



> Decompression Exception of Tiff Group 3 with T4 Options = 4
> -----------------------------------------------------------
>
>                 Key: IMAGING-143
>                 URL: https://issues.apache.org/jira/browse/IMAGING-143
>             Project: Commons Imaging
>          Issue Type: Bug
>          Components: Format: TIFF
>    Affects Versions: 1.0
>            Reporter: Josh Highley
>             Fix For: Patch Needed
>
>         Attachments: group3test.tif
>
>
> I have multiple tiff images that are causing an "ImageReadException: Decompression error".
 All are Group 3 (T.4) encoded with T4Options tag value 4 (zero fill to byte).  Other Group
3 images without T4Options 4 work fine.
> Stepping through Imaging 1.0 RC7, the hasFill boolean is being set properly to true.
The exception is thrown at the bottom of method HuffmanTree.java decode(bitStream).  Nothing
is passed to this method indicating zero fill or not.  I will attach a test image that reproduces
the issue.  The stack trace:
> {noformat}
> Caused by: org.apache.commons.imaging.ImageReadException: Decompression error
>        at org.apache.commons.imaging.common.itu_t4.T4AndT6Compression.decompressT4_1D(T4AndT6Compression.java:254)
>        at org.apache.commons.imaging.formats.tiff.datareaders.DataReader.decompress(DataReader.java:163)
>        at org.apache.commons.imaging.formats.tiff.datareaders.DataReaderStrips.readImageData(DataReaderStrips.java:216)
>        at org.apache.commons.imaging.formats.tiff.TiffImageParser.getBufferedImage(TiffImageParser.java:676)
>        at org.apache.commons.imaging.formats.tiff.TiffDirectory.getTiffImage(TiffDirectory.java:161)
>        at org.apache.commons.imaging.formats.tiff.TiffImageParser.getBufferedImage(TiffImageParser.java:478)
>        at org.apache.commons.imaging.Imaging.getBufferedImage(Imaging.java:1379)
>        at org.apache.commons.imaging.Imaging.getBufferedImage(Imaging.java:1293)
>        at com.dstresearch.baseutils.ApacheImagingUtil.readImage(ApacheImagingUtil.java:157)
>        ... 27 more
> Caused by: org.apache.commons.imaging.common.itu_t4.HuffmanTreeException: Invalid bit
pattern
>        at org.apache.commons.imaging.common.itu_t4.HuffmanTree.decode(HuffmanTree.java:89)
>        at org.apache.commons.imaging.common.itu_t4.T4AndT6Compression.decompressT4_1D(T4AndT6Compression.java:240)
>        ... 35 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message