Bob Friesenhahn wrote:
On Thu, 18 Aug 2005, Michal Paczek wrote:
Thanks for advices, code implementation was easy and is working fine
now, but...I met some strange things in converssion tiff file with
LAB to the RGB colorspace. Colours change in strange way and are not
correct. Colorspace conversion works, becouse I checked it with
couple of different ICC-RGB profiles and allways image colours were
changed.
I tried to apply LAB color profile first and than convert to RGB
(colorspace conversion made twice), but nothing happened, colours
were still .
If you want I can send that tiff file to you...so you can check that...
I am not an expert at TIFF LAB colorspace. I know that there are
experts on this list.
...but maybe I'm still doing something wrong...better if I paste my
code below:
----------------------------------------------------------------------
[...]
FILE* pFile;
long lSize;
char* pchBuffer;
pFile = fopen ( "c:\\profile\\myProfile.icm", "rb" );
if (pFile==NULL) exit (1);
fseek (pFile , 0 , SEEK_END);
lSize = ftell (pFile);
rewind (pFile);
pchBuffer = (char*) malloc (lSize);
if (pchBuffer == NULL)
exit (2);
fread (pchBuffer, 1, lSize, pFile);
ProfileImage(image, "ICC", pchBuffer, lSize, MagickFalse);
fclose (pFile);
free (pchBuffer);
[...]
----------------------------------------------------------------------
Is it ok?
Additionally I've found some information about this problem, so maybe
it's good idea to attach it to the post:
============================================================================================================
----- Weitergeleitete Nachricht
Von: Martí Maria <[EMAIL PROTECTED]>
Datum: Mon, 21 Jan 2002 18:48:17 -0320
An: Gunnar Lieb <[EMAIL PROTECTED]>, <Lcms-user@lists.sourceforge.net>
Betreff: Re: [Lcms-user] Profile/conversion problem
Hi,
> I'm not able to get similar values by doing it in LCMS. The olny profile I
> can use is Tiflab8space.icm. If I don't specify the profile and it uses the
Thanks for the images.
Sigh. :-( Ok. It happens that Photoshop does _not_ follow the TIFF 6.0 spec
and stores Lab using D50 instead of D65. As a result, Lab images saved in
Photoshop does behave quite different, specially on blues.
This "bug" pops up quite frequently, so, since it seems Photoshop is doing
the
"true" standard instead of the spec, I have put a profile for this case in
the site:
http://www.littlecms.com/tiff8adobe.zip
In the zip is also the code to generate the profile, if anyone is
interested on how
to generate weird profiles using lcms. This profile is smaller that the
anterior
Tifflab8spac.icm and not subjected to any Linotype copyright anymore.
I will check it carefully this week, but for now seems to work quite well on
your
test images.
The CMYK bitmap does give pretty same values that Photoshop. One important
thing: your Lab TIFF does have a embedded profile. This is wrong because Lab
does not need any profiles and worst, the profile is operating in RGB, and
tagged
as Lab. If you are using TIFFICC to do checking, assure to use -n to ignore
embedded profile.
Best Regards,
Martí Maria
The little cms project
http://www.littlecms.com
[EMAIL PROTECTED]
----- Original Message -----
From: "Martí Maria" <[EMAIL PROTECTED]>
To: "Gunnar Lieb" <[EMAIL PROTECTED]>; <Lcms-user@lists.sourceforge.net>
Sent: Monday, January 21, 2002 9:41 AM
Subject: Re: [Lcms-user] Profile/conversion problem
Hi,
> I'm trying to reproduce a color conversion from LAB->CMYK. The original
> conversion is made by Heidelberg Linocolor.
>
> I'm not able to get similar values by doing it in LCMS. The olny profile I
> can use is Tiflab8space.icm. If I don't specify the profile and it uses the
Are you decoding a TIFF file?. Tiflab8space.icm is only valid on 8-bit TIFF.
This profile does hold Lab AND a special decoding for 8 bit TIFF.
If your Lab source is any other, INCLUDING 16 BIT TIFF, try
lcmslabi.icm. Programatically, you can use the new built-in Lab profile:
cmsCreateLabProfile(NULL)
That is present on ver 1.08. I would recommend this latter, since it
takes 0 bytes on disk. If you are using tifficc, lcmslabi.icm will do the
job. I have done a lot of testing on Lab->CMYK and works quite well.
About the embedded profile... if the file is storing data on Lab space, there
is no need of embedded profile, data is already device independent.
Regards,
Martí Maria
The little cms project
http://www.littlecms.com
[EMAIL PROTECTED]
----- Original Message -----
From: "Gunnar Lieb" <[EMAIL PROTECTED]>
To: <Lcms-user@lists.sourceforge.net>
Sent: Sunday, January 20, 2002 2:13 PM
Subject: [Lcms-user] Profile/conversion problem
> Hi,
>
> I'm trying to reproduce a color conversion from LAB->CMYK. The original
> conversion is made by Heidelberg Linocolor.
>
> I'm not able to get similar values by doing it in LCMS. The olny profile I
> can use is Tiflab8space.icm. If I don't specify the profile and it uses the
> embeded I get strange colors. It looks like solarized!. If I use the
> mentioned LAB profile there a big differences in the color. I.e. I get in
> - Linocolor conversion a blue with c96 m72 y0 k0
> - LCMS conversion with c95 m66 y13 k5
>
> I tried the t option with all values, but the conversion remained different.
>
> So with does the embedded profile produces such a strange color?
> Are there any other options to look for?
>
> Thanks,
>
> Gunnar
>
>
> _______________________________________________
> Lcms-user mailing list
> Lcms-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lcms-user
>
>
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user
============================================================================================================
Best regards
Michal
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user