Thread: [Lcms-user] lcms demo program src?
An ICC-based CMM for color management
Brought to you by:
mm2
From: John G. <gr...@ag...> - 2001-06-29 16:59:32
|
Hello, I'm using ijg lib and the lcms lib to decode jpeg images. I have an image I'm having trouble decoding (its a CMYK jpeg image, that I want to convert to sRGB). The demo app decodes it just fine. I imagine I'm not setting something up correctly. Is the src to the demo available? I suspect a peek at it will uncover my problem pretty quickly. Thanks, John -- John Gray gr...@ag... AgoraNet, Inc. (302) 224-2475 102 E. Main Street, Suite 303 (302) 224-2552 (fax) Newark, De 19711 http://www.agora-net.com |
From: <ma...@li...> - 2001-06-29 17:57:17
Attachments:
JDCOLOR.ZIP
|
John, Most CMYK JPEG comes inverted. This is a long history about a Junior programmer that did a mistake in early versions of PhotoShop, and adobe trying to keep backwards compatibilty. All CMYK JPEG from adobe programs are stored with CMYK inks inverted. In a conversation with Tom Lane, time ago, he told me that he cannot change this behaviour on ijg code, since this will break existing applications that are aware of this, and does the inversion by itselves. I am using a patched version of ijg, that does return correct inks, on depending of adobe markers. I attach the code as well, (is very small). If you don't like to use modified version of a library, you can provide your own reversing. Is only a matter of detect if adobe marker is present, and if so, reverse (255-x) the channels. About the demo sources, well, the demo is using a image processing library still in development and a lot more complex that the CMM itself, so I'm afraid it would be of little use. The cmyk->srgb is only a matter of opening cmyk profile on input and srgb on output, and then apply transform. Anyway, if you experience any problem feel free to drop me a note. Regards, Marti. ----- Original Message ----- From: "John Gray" <gr...@ag...> To: <lcm...@li...> Sent: Friday, June 29, 2001 1:40 PM Subject: [Lcms-user] lcms demo program src? > Hello, > > I'm using ijg lib and the lcms lib to decode jpeg images. > > I have an image I'm having trouble decoding (its a CMYK jpeg image, that > I want to convert to sRGB). The demo app decodes it just fine. I > imagine I'm not setting something up correctly. Is the src to the demo > available? I suspect a peek at it will uncover my problem pretty quickly. > > Thanks, > > John > > -- > John Gray gr...@ag... > AgoraNet, Inc. (302) 224-2475 > 102 E. Main Street, Suite 303 (302) 224-2552 (fax) > Newark, De 19711 http://www.agora-net.com > > > _______________________________________________ > Lcms-user mailing list > Lcm...@li... > http://lists.sourceforge.net/lists/listinfo/lcms-user > > |
From: John G. <gr...@ag...> - 2001-06-30 18:32:31
|
Marti, Your patch works well for reading in the botched adobe images, but it=20 also causes a problem. When I asked the ijg lib to write out a CMYK=20 jpeg, it writes out the adobe markers, but writes out the componets=20 correctly. Now when I read in image I created, it assumes that adobe=20 created, and inverts the componets. See a work around for this? Thanks, John Mart=ED Maria wrote: > John, >=20 > Most CMYK JPEG comes inverted. This is a long history about a Junior > programmer that did a mistake in early versions of PhotoShop, and adobe > trying to keep backwards compatibilty. All CMYK JPEG from adobe=20 > programs are stored with CMYK inks inverted.=20 >=20 > In a conversation with Tom Lane, time ago, he told me that he cannot=20 > change this behaviour on ijg code, since this will break existing=20 > applications that are aware of this, and does the inversion by itselves= .=20 >=20 > I am using a patched version of ijg, that does return correct inks, on > depending of adobe markers. I attach the code as well, (is very small). >=20 > If you don't like to use modified version of a library, you can provide= =20 > your own reversing. Is only a matter of detect if adobe marker is prese= nt,=20 > and if so, reverse (255-x) the channels. >=20 > About the demo sources, well, the demo is using a image processing > library still in development and a lot more complex that the CMM itself= , > so I'm afraid it would be of little use. The cmyk->srgb is only a matt= er=20 > of opening cmyk profile on input and srgb on output, and then apply=20 > transform. Anyway, if you experience any problem feel free to drop=20 > me a note.=20 >=20 > Regards, > Marti. >=20 --=20 John Gray gr...@ag... AgoraNet, Inc. (302) 224-2475 102 E. Main Street, Suite 303 (302) 224-2552 (fax) Newark, De 19711 http://www.agora-net.com |
From: <ma...@li...> - 2001-07-02 08:56:27
Attachments:
JCCOLOR.ZIP
|
Hi, Well, of course you need to handle both senses :-) Here is the patch for the encoder. Regards, Marti. ----- Original Message ----- From: "John Gray" <gr...@ag...> To: "Martí Maria" <ma...@li...> Cc: <lcm...@li...> Sent: Saturday, June 30, 2001 3:13 PM Subject: Re: [Lcms-user] lcms demo program src? Marti, Your patch works well for reading in the botched adobe images, but it also causes a problem. When I asked the ijg lib to write out a CMYK jpeg, it writes out the adobe markers, but writes out the componets correctly. Now when I read in image I created, it assumes that adobe created, and inverts the componets. See a work around for this? Thanks, John Martí Maria wrote: > John, > > Most CMYK JPEG comes inverted. This is a long history about a Junior > programmer that did a mistake in early versions of PhotoShop, and adobe > trying to keep backwards compatibilty. All CMYK JPEG from adobe > programs are stored with CMYK inks inverted. > > In a conversation with Tom Lane, time ago, he told me that he cannot > change this behaviour on ijg code, since this will break existing > applications that are aware of this, and does the inversion by itselves. > > I am using a patched version of ijg, that does return correct inks, on > depending of adobe markers. I attach the code as well, (is very small). > > If you don't like to use modified version of a library, you can provide > your own reversing. Is only a matter of detect if adobe marker is present, > and if so, reverse (255-x) the channels. > > About the demo sources, well, the demo is using a image processing > library still in development and a lot more complex that the CMM itself, > so I'm afraid it would be of little use. The cmyk->srgb is only a matter > of opening cmyk profile on input and srgb on output, and then apply > transform. Anyway, if you experience any problem feel free to drop > me a note. > > Regards, > Marti. > -- John Gray gr...@ag... AgoraNet, Inc. (302) 224-2475 102 E. Main Street, Suite 303 (302) 224-2552 (fax) Newark, De 19711 http://www.agora-net.com _______________________________________________ Lcms-user mailing list Lcm...@li... http://lists.sourceforge.net/lists/listinfo/lcms-user |