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

OpenJPEG-1.3.0 pclr, cmap and cdef #27

Closed
gcode-importer opened this issue May 12, 2010 · 3 comments
Closed

OpenJPEG-1.3.0 pclr, cmap and cdef #27

gcode-importer opened this issue May 12, 2010 · 3 comments

Comments

@gcode-importer
Copy link

Originally reported on Google Code with ID 27

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

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)_
@gcode-importer
Copy link
Author

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 

Reported by szukw000 on 2010-05-14 07:35:02

@gcode-importer
Copy link
Author

Reported by malaterre on 2014-02-25 15:42:26

  • Labels added: Priority-Low
  • Labels removed: Priority-Medium

@gcode-importer
Copy link
Author

closing current issue, please follow issue 82

Reported by malaterre on 2014-02-26 14:09:37

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

No branches or pull requests

3 participants