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: <[email protected]>
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 [email protected] 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 [email protected] https://lists.sourceforge.net/lists/listinfo/lcms-user
