to GDI to sRGB. Windows has provisions for setting the profile of the
device. lcms is good for converting incoming images to sRGB.
At one time, I tried to use lcms to convert to CMYKcm (6-color) to send to an HP printer, but couldn't figure out how to send that kind of data to the printer. HP doesn't really document the protocol for 6-color printing.
----- Original Message ----- From: "Marti" <[EMAIL PROTECTED]>
To: "Tim Lebedkov (UPK)" <[EMAIL PROTECTED]>; <lcms-user@lists.sourceforge.net>
Sent: Monday, May 09, 2005 4:24 AM
Subject: Re: [Lcms-user] RGB -> RGB, printing
Maybe somebody can take a look at it and tell me why it doesn't work
Windows GDI doesn't support CMYK.
(it prints one black and one blue rectangle).
CMYK is just a macro to build a DWORD, since CreateSolidBrush expects a DWORD holding ABGR, It identifies CMYK(255, 0, 0, 0) as ABGR ff000000 (black) and CMYK(0, 255, 0, 0) as abgr 00ff0000 (blue)
Marti.
----- Original Message ----- From: "Tim Lebedkov (UPK)" <[EMAIL PROTECTED]>
To: <lcms-user@lists.sourceforge.net>
Sent: Monday, May 09, 2005 10:35 AM
Subject: AW: [Lcms-user] RGB -> RGB, printing
Hi,
I post here my code for testing CMYK printing. Maybe somebody can take a look at it and tell me why it doesn't work (it prints one black and one blue rectangle).
I use Apple Color LW 12/660 PS to create PostScript.
Thank You --Tim
class procedure TICM.PrintTest; var hDC_: HDC; diDocInfo: DOCINFO; lcs: LOGCOLORSPACE; hTransform: HCMTRANSFORM; profile: tagPROFILE; lpszFilename: PChar; hProfile_: HPROFILE; type TCHAR = char; begin lpszFilename := 'C:\WINDOWS\system32\spool\DRIVERS\COLOR\Photoshop4DefaultCMYK.icc';
hDC_ := GetPrinterDC(); if hDC_ = 0 then RaiseLastOSError;
// Fill in the DOCINFO structure diDocInfo.cbSize := sizeof(DOCINFO); diDocInfo.lpszDocName := 'sdft'; diDocInfo.lpszOutput := nil; diDocInfo.lpszDatatype := nil; diDocInfo.fwType := 0;
// Start the document if StartDoc(hDC_, diDocInfo) = SP_ERROR then RaiseLastOSError;
// Start the page if StartPage(hDC_) = SP_ERROR then RaiseLastOSError;
// I tested although ICM_ON if SetICMMode(hDC_, ICM_DONE_OUTSIDE_DC) = 0 then RaiseLastOSError;
if not SetICMProfile(hdc_, lpszFilename) then RaiseLastOSError;
SelectObject(hdc_, CreateSolidBrush(CMYK(255, 0, 0, 0))); Rectangle(hDC_, 0, 0, 1000, 100); SelectObject(hdc_, CreateSolidBrush(CMYK(0, 255, 0, 0))); Rectangle(hDC_, 0, 100, 1000, 200);
// Local variables if EndPage(hDC_) = SP_ERROR then RaiseLastOSError; if EndDoc(hDC_) = SP_ERROR then RaiseLastOSError;
DeleteDC(hDC_); end;
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user
-- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.11.6 - Release Date: 06/05/2005
-- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.11.6 - Release Date: 06/05/2005
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user
------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click _______________________________________________ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user