Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Requesting 8-bit grayscale from the converter



Paul -

I've followed the procedure that you outlined in your email to Aaron on
this topic, and I'm seeing something a little... well, a little
unexpected, I guess.

After successfully completing a call to BeginJob that sets up the converter
ticket to request 8-bit grayscale, the printing subsystem immediately
invokes EndJob and proceeds to stop the printer queue, without reporting
any errors. (If I simply change the converter ticket to request 32-bit
RGBX, everything runs fine: the call to BeginJob is followed by the rest of
the normal sequence of calls.)

The following changes have been made in our real PM, and in Apple's
SamplePM source as a sanity-check:
1) I've added a new <dict> entry to the PMColorDeviceProfiles.xml file to
specify a second profile for use with grayscale modes, using the example
you provided in your email as a starting point.
2) I've changed the code responsible for setting up the converter ticket to
request kPMGray_8 as the format, rather than kPMRGBX_32.
3) In our real PM, I've modified the code paths so that they should be able
to handle 8-bit grayscale as the input format. (The SamplePM was left
alone, since I was just using it to try and reproduce the problem from our
PM: if the sample crashed or produced garbage output, that's fine, as long
as it didn't just go directly from BeginJob() to EndJob().)

Can you offer any suggestions as to what might be happening here? Is there
anything that I've missed, or that your directions might have left out?

We'd obviously rather get grayscale data as direct input data, rather than
having to run conversions on the fly, but it looks like the printing
subsystem is either unhappy with the request "as stated" by the ticket, or
else there's some other problem that we're not being notified of.

Anything you can suggest would be *greatly* appreciated. Thanks!

-mjh

At 05:23 PM 2/18/2003, it's rumored that Paul Danbold said:
>Aaron,
>
>8-bit grayscale (kPMGray_8) is supported on both 10.1.x and 10.2.x.
>But the sample code does not do a good job of showing how a PM can
>specify and process grayscale output. If your driver is based on the
>SamplePM you will need to make the following changes:
>
>1. Specify a grayscale profile in your PrinterInfo ticket. So, for
>example, in PMColorDeviceProfiles.xml ...
>
> <dict>
> <key>PMColorDeviceProfileID</key>
> <integer>1</integer>
> <key>PMColorDeviceProfileName</key>
> <string>Grayscale</string>
> <key>PMColorDeviceProfileURL</key>
>
><string>file://localhost//System/Library/ColorSync/Profiles/
>Generic%20Gray%20Profile.icc</string>
> </dict>
>
>2. Tell the converter that you want to use this profile. In the sample
>code, the hpVerifyColorSyncProfileID function should, but does not,
>return a valid profile id to put into the converter setup ticket. If
>the profile id for the grayscale profile is "1", then
>hpVerifyColorSyncProfileID() should return "1".
>
>3. The sample code shows how to process color output (kPMXRGB_32) from
>the converter. In hpCreateConverterSetup() that means setting
>kPMRequestedPixelFormatKey to kPMGray_8, instead of kPMXRGB_32, in the
>converter setup ticket. And methods in EnginePCL.cp (e.g. PrintBand)
>need to be modified to handle grayscale data.
>
>I hope this helps.
>
>-Paul

---------------------------------------------------------------------
Matthew J. Healy, Principal Software Engineer
Vanteon Corporation
2851 Clover Street
Pittsford, NY 14534-1711
http://www.vanteon.com
Office: (585) 248-0510, x227
FAX: (585) 248-0537
_______________________________________________
printing mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/printing
Do not post admin requests to the list. They will be ignored.

References: 
 >Requesting 8-bit grayscale from the converter (From: "Aaron Sher" <email@hidden>)
 >Re: Requesting 8-bit grayscale from the converter (From: Paul Danbold <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.