You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have now made changes in jp2.c and jp2.h to handle pclr, cmap and
cdef. The files are attached as a whole.
jp2_read_colr(), jp2_read_jp2h() and jp2_decode() have been changed.
The changes are in jp2.c between 'begin INSERTION' and 'end INSERTION'.
First I inserted the necessary structures into opj_jp2_t . But then
I learned that MJ2 was unhappy with this decision. I have now made
the structures static in jp2.c . I suppose they can be inserted
into the opj_image_t, if static structures are unwanted.
It seems that I completely misunderstand the channel model of JP2.
Section I.5.3.6 in Part 1 suggest that there may be multiple opacity
channels. Until now I understood that there is either no channel or
one channel for opacity, i.e. transparency.
I have found the four test files in the fdis_j2kp4files.zip archives.
testfiles_jp2/file2.jp2 contains a 'cdef' box:
===============================================
[0]cn(0) typ(0) asoc(3)
[1]cn(1) typ(0) asoc(2)
[2]cn(2) typ(0) asoc(1)
The color space is sYCC. Ignoring 'cdef' means: using the wrong color
for Y resp. Cr. The image had false colors. It looked ugly. Now it
looks nice.
testfiles_jp2/file9.jp2 contains a 'pclr' and a 'cmap' box:
===========================================================
The color space is sRGB. The image has one component: the index channel.
Ignoring 'pclr' and 'cmap' means: using the index channel as the color
channel. The result looked ugly. Now it looks nice.
testfiles_jp2/file5.jp2 and testfiles_jp2/file7.jp2 both contain an
===================================================
ICC Profile. I have written a simple program that reads the profile
correctly. But I do not know how to include the profile into jp2.c :
WHERE/WHEN shall the profile be read, WHO shall use the values, ...
Nice enterprise for someone else.
winfried
I had first made a 'proposal' (issue 25) for a change in jp2.c/jp2.h . As nobody
answered, I made a change (see above). Then I realized that Marek Mauder sent
a patch to the LIST (date:26.01.2010). I want to point to the fact that Marek
made the same mistake as I did first: changing 'opj_jp2_t'. THIS WILL BREAK MJ2.
winfried
Originally reported on Google Code with ID 27
Reported by szukw000 on 2010-05-12 13:11:27
- _Attachment: [jp2.c.7z](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-27/comment-0/jp2.c.7z)_ - _Attachment: [jp2.h.7z](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-27/comment-0/jp2.h.7z)_
The text was updated successfully, but these errors were encountered: