Re: [Lcms-user] Noob needs help on ColorSpaces
Hi, Next step is implementing some Ink Limiting. Ok. But anyway, most CMYK profiles have ink limiting already applied, so, unless you are experiencing problems because too much ink dropped, there is no real need to do that. The way to do that is by using multiprofile transforms (cmsCreateMultiprofileTransform) or by applying the ink limit devicelink using another transform. Ink limiting takes place at the very final stage. The profile chain is: Input - Output - CMYK - Ink limiting Humm, I think delphi wrapper has multiprofile transforms not defined so you are forced to two transforms in this case. Regards Marti Maria The littleCMS project http://www.littlecms.com - Original Message - From: Mat Ballard [EMAIL PROTECTED] To: lcms-user@lists.sourceforge.net Sent: Tuesday, January 10, 2006 5:58 AM Subject: Re: [Lcms-user] Noob needs help on ColorSpaces g'day Marti, thanks for your help on ColorSpaces - that bit is now cooking on gas. Can now convert from RGB to CMYK without getting nasty crashes due to using an inappropriate profile. Next step is implementing some Ink Limiting. I've seen cmsCreateInkLimitingDeviceLink in the lcmsAPI, and I think that what I need. However, I am unsure how to use it, especially in combination with the existing RGB to CMYK conversion. My current code is: hSrc := lcmsdll.cmsOpenProfileFromFile(PChar(SourceFile), 'r'); hDest := lcmsdll.cmsOpenProfileFromFile(PChar(DestFile), 'r'); xform := lcmsdll.cmsCreateTransform(hSrc, TYPE_BGR_8, hDest, TYPE_CMYK_8, Intent, dwFlags); for i := 0 to SourceBitmap.Height - 1 do begin ALine := SourceBitmap.Scanline[i]; lcmsdll.cmsDoTransform(xform, ALine, CMYKLine, SourceBitmap.Width); {save the CYMKLine to appropriate bitmap planes} end; {cleanup:} lcmsdll.cmsDeleteTransform(xform); lcmsdll.cmsCloseProfile(hSrc); lcmsdll.cmsCloseProfile(hDest); Can you or someone please indicate where / how I should add the cmsCreateInkLimitingDeviceLink function ? Thank in advance, Mat --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user
Re: [Lcms-user] Noob needs help on ColorSpaces
Hi, Can sometime indicate what I'm doing wrong, and/or how I can identify valid output profiles to use with CMYK separations. The format descriptor holds more information that just the colorspace, it also has the encoding, extra channels, planar configuration, bytes per sample, etc. You could use: SpaceSig = cmsGetColorSpace(hSrc) ColorSpace = _cmsLCMScolorSpace(SpaceSig) And then in ColorSpace you will have one of these #define PT_GRAY 3 #define PT_RGB 4 #define PT_CMY 5 #define PT_CMYK 6 #define PT_YCbCr 7 #define PT_YUV 8 #define PT_XYZ 9 #define PT_Lab 10 #define PT_YUVK 11 #define PT_HSV 12 #define PT_HLS 13 #define PT_Yxy 14 #define PT_HiFi 15 #define PT_HiFi7 16 #define PT_HiFi8 17 #define PT_HiFi9 18 #define PT_HiFi1019 #define PT_HiFi1120 #define PT_HiFi1221 #define PT_HiFi1322 #define PT_HiFi1423 #define PT_HiFi1524 in your case _cmsLCMScolorSpace(SpaceSig) == PT_CMYK will do the trick. Hope this helps, Marti. - Original Message - From: Mat Ballard [EMAIL PROTECTED] To: lcms-user@lists.sourceforge.net Sent: Tuesday, December 06, 2005 1:43 AM Subject: [Lcms-user] Noob needs help on ColorSpaces g'day everyone, I'm using lcms via Delphi to perform to separate to CMYK. Sometimes it works, and sometimes gives a fatal error: Error #3000; Output profile is operating on wrong colorspace resulting in abrupt program termination. To me the message suggests that the problem is the Color Space of the chosen output profile. To address this I wrote some code to open the profile and extract the ColorSpace as a first step: hSrc := lcmsdll.cmsOpenProfileFromFile(PChar(Filename), 'r'); Sig1 := lcmsdll.cmsGetColorSpace(hSrc); Sig2 := cmsGetPCS(hSrc); lcmsdll.cmsCloseProfile(hSrc); I thought that Sig1 and Sig2 would be one of the icColorSpaceSignature Format descriptors: TYPE_GRAY_8 = $30009 ... TYPE_CMYK_DBL = $60020 however, I always get Sig1 = 1380401696, and Sig2 = 1482250784 - which isn't in the range of expected values. Can sometime indicate what I'm doing wrong, and/or how I can identify valid output profiles to use with CMYK separations. Thanks in advance, Mat rm -rf /mnt/windows/* Dr Mat Ballard, CSIRO Molecular Science Linux Registered User #6854 --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click ___ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user