jai-imageio / jai-imageio-jpeg2000

JPEG2000 support for Java Advanced Imaging Image I/O Tools API
Other
74 stars 56 forks source link

Incorrect decode of grayscale jpg2000 file #23

Open THausherr opened 6 years ago

THausherr commented 6 years ago
BufferedImage bim = ImageIO.read(new File("PDFBOX-4081.jp2"));
ImageIO.write(bim, "png", new File("PDFBOX-4081.png"));

PDFBOX-4081.zip

ZIP file attached that contains both files. The saved file looks "grainy" and the colors are wrong.

THausherr commented 6 years ago

See also https://issues.apache.org/jira/secure/attachment/12941886/PDFBOX-4328-001659-p14-1.jp2 in this issue: https://issues.apache.org/jira/browse/PDFBOX-4328

THausherr commented 6 years ago

This bug can be fixed by applying this commit by Mike Bremford of bfo.com https://github.com/faceless2/jpeg2000/commit/94e047e38091fe3646e47d574b0080d1bfd67cdf

Lonzak commented 3 years ago

@THausherr There was no PR for this one? Damn so it didn't went into 1.4.0... @faceless2 Would you be able to create PR for this one?

Update: Ok I added one