Closed GoogleCodeExporter closed 9 years ago
Quick investigation :
The file is non-compliant because of a spare 0-byte located after the EOC
(FFD9). Without this last byte, everything works fine.
Since rev2317, openjpeg has a mechanism to overcome this kind of corruption.
Weird thing is that OPJ2.0 is beyond r2317 and should work on this file too.
Anyway, we should indeed at least change the ERROR to a WARNING as the
corruption can be fixed.
Original comment by antonin
on 9 Jul 2014 at 5:09
I'm curious : which program did you use to generate Sample.j2k ?
Original comment by antonin
on 10 Jul 2014 at 9:32
This issue was closed by revision r2875.
Original comment by antonin
on 14 Jul 2014 at 7:42
Hi antonin,
sorry for the delay in answering: I've been away for a couple of weeks.
As written in my original post, this j2k file was extracted from a medical
image file (DICOM). The j2k portion was extracted by my own code.
However, once you told me that the issue was an extra trailing '0' byte, then a
suspect came to my mind: probably my code extracting the j2k portion from the
DICOM file did not consider that in DICOM the value of every data element may
be padded to reach even length. Hence, that extra '0' trailing byte may
actually be DICOM padding, and not part of the j2k codestream. I will modify a
bit my code to take this into account, and I will then check if it will work
even with older OpenJPEG versions.
In all cases, good to know that OpenJPEG is now able to tolerate that extra
trailing byte.
Thanks a lot for shedding some light on this issue.
Regards,
Marco
Original comment by m.sam...@gmail.com
on 22 Jul 2014 at 10:14
Original issue reported on code.google.com by
m.sam...@gmail.com
on 30 Jun 2014 at 8:28Attachments: