Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Writing JP2 openjpegv2, Colour specification box, ICC profile issue with greater than 3 bands
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Will K  
View profile  
 More options Nov 15 2012, 10:25 am
From: Will K <willkem...@gmail.com>
Date: Thu, 15 Nov 2012 07:25:15 -0800 (PST)
Local: Thurs, Nov 15 2012 10:25 am
Subject: Writing JP2 openjpegv2, Colour specification box, ICC profile issue with greater than 3 bands

I downloaded the latest OpenJpeg v2 source.  I am writing JP2 images with
greater than 3 bands.  In jp2.c line 1427 the meth is set to 2 for bands
greater than 3.  This requires an ICC profiles to be written.  The library
just sets it to NULL in line 722.  If I write JP2 this way, other JP2
readers get upset.  The ECW SDK reader errors and crashes and Photoshop
display a ICC profile error but does recover and open the file.  I took a
quick look at the ICC profile specs and I didn't see anything about higher
bands covered. My current solution is to just change jp2.c to set the meth
to 1 and the color space to RGBs for bands greater than 3.  When I write
this way the ECW SDK opens it fine and so does Photoshop.  Is there any
problem with this solution?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
szukw...@arcor.de  
View profile  
 More options Nov 16 2012, 9:48 pm
From: szukw...@arcor.de
Date: Sat, 17 Nov 2012 03:48:24 +0100 (CET)
Local: Fri, Nov 16 2012 9:48 pm
Subject: Re: [OpenJPEG] Writing JP2 openjpegv2, Colour specification box, ICC profile issue with greater than 3 bands
I downloaded the latest OpenJPEG v2 revision 2223 and did not find 'meth' in the lines
given.

winfried

----- Original Nachricht ----
Von:     Will K <willkem...@gmail.com>
An:      openjpeg@googlegroups.com
Datum:   15.11.2012 16:25
Betreff: [OpenJPEG] Writing JP2 openjpegv2, Colour specification box, ICC
 profile issue with greater than 3 bands


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Will K  
View profile  
 More options Nov 18 2012, 11:57 am
From: Will K <willkem...@gmail.com>
Date: Sun, 18 Nov 2012 08:57:08 -0800 (PST)
Local: Sun, Nov 18 2012 11:57 am
Subject: Re: [OpenJPEG] Writing JP2 openjpegv2, Colour specification box, ICC profile issue with greater than 3 bands

Sorry I gave the wrong line number.  The line is 2161.  It code looks like
this:

 if ((image->numcomps == 1 || image->numcomps == 3) && (jp2->bpc != 255)) {
  jp2->meth = 1; /* METH: Enumerated colourspace */
 } else {
  jp2->meth = 2; /* METH: Restricted ICC profile */
 }
 if (jp2->meth == 1) {
  if (image->color_space == 1)
   jp2->enumcs = 16; /* sRGB as defined by IEC 61966–2–1 */
  else if (image->color_space == 2)
   jp2->enumcs = 17; /* greyscale */
  else if (image->color_space == 3)
   jp2->enumcs = 18; /* YUV */
 } else {
  jp2->enumcs = 0;  /* PROFILE (??) */
 }

 Anyway, when numComps is greater than 3 jp2->meth gets set to 2.  Later in
the code the Meth 2 should write an ICC Profile, but it writes out a 0
instead.  I think it is best to not set meth 2 unless a real ICC profile is
going to actually be written.  I don't now the actual requirement about 4
band imagery, but the ECW and Photoshop JP2 readers do not seem to care if
the ICC profile is there.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic