Skip to content

Jpeg2000 read/write image fix#213

Closed
robert-matusewicz wants to merge 1 commit intoAcademySoftwareFoundation:masterfrom
robert-matusewicz:jpeg_save_image_fix
Closed

Jpeg2000 read/write image fix#213
robert-matusewicz wants to merge 1 commit intoAcademySoftwareFoundation:masterfrom
robert-matusewicz:jpeg_save_image_fix

Conversation

@robert-matusewicz
Copy link

When TypeDesc is set to INT8 plugin should save 8-bit data to the file, not 16-bit (read_scanlin write_scanline should be typed to uint8_t).

Run the testsuite and this patch don't broke anything.

@lgritz
Copy link
Collaborator

lgritz commented Jan 15, 2012

Are there signed 8 bit J2K's out there?

If you look at jpeg2000input.cpp, line 202, we can't possibly set the format to INT8. But in some sense, that is where the real bug is (if there are INT8 JPEG's). So your new code can't change any behavior.

There is a similar bug in jpeg2000output.cpp, where I think it won't behave properly if the user passes a non-UINT8, non-UINT16 buffer. I think the lines you changed are just one part of the chain of events that needs to be fixed.

@robert-matusewicz
Copy link
Author

Ah, thats good points, now I'm not sure why I prepared this pull request, brobably was tired when writing this code:) I close this pull request and prepare other

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

Successfully merging this pull request may close these issues.

2 participants