Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

converting .png to .jp2 by opj_compress is different from the original image #1378

Closed
seyeon923 opened this issue Sep 13, 2021 · 2 comments
Closed

Comments

@seyeon923
Copy link

I converted .png image to .jp2 image with opj_compress.exe of release v2.4.0.
(I downloaded the openjpeg-v2.4.0-windows-x64.zip at https://github.com/uclouvain/openjpeg/releases/tag/v2.4.0)
And the result jp2 image is a little different from with the original png image.

This is the command that I used for png -> jp2

.\opj_compress.exe -i .\Lenna.png -o Lenna.jp2

Left image is the original png image and right is converted jp2 image.
Lenna_compare

When I checked the pixel value, it differs.

I've also attached both files(Lenna.png and Lenna.jp2) with zip.
Lenna.zip

Is it a bug or did I use it wrongly?

I'm not sure, but when I debug it myself, it seems wrong pixel values are read from pngtoimage.

Thank you

@seyeon923
Copy link
Author

So, the program cannot decode gAMA, cHRM or sRGB chunks correctly?

I'm able to get the Lenna.jp2 identical to Lenna.png by removing the sRGB chunk.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@seyeon923 and others