| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Send Printing mailing list submissions to
email@hidden
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.apple.com/mailman/listinfo/printing
or, via email, send a message with subject or body 'help' to
email@hidden
You can reach the person managing the list at
email@hidden
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Printing digest..."
Today's Topics:
1. Re: How to get raster data by calling API in printer driver
(Roger Long)
----------------------------------------------------------------------
Message: 1
Date: Wed, 28 Sep 2005 14:02:57 -0700
From: Roger Long
Subject: Re: How to get raster data by calling API in printer driver
To: Henry Lai
Cc: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=ISO-8859-1
On Wednesday, September 28, 2005, at 02:04AM, Henry Laiwrote:
> 1.How can I know cgpdftoraster use which cupsBitsPerColor,
> cupsColorSpace and cupsBitsPerPixel to transfer image to raster
> data? Below is what I call in the driver. Are they enough?
>
> ras = cupsRasterOpen(fd, CUPS_RASTER_READ);
> ...
> cupsRasterReadHeader(ras, &header);
> ...
> cupsRasterReadPixels(ras, PixelBuffer, header->cupsBytesPerLine);
Each header that you read will contain cupsBitsPerColor, cupsColorSpace, and cupsBitsPerPixel. that were used to rasterize the page.
> 2.For the file I print, how can I know the picture size(inch), DPI
> and ColorSpace in my driver?
The header also contains a PageSize! array, which defines the page dimensions in points. The resolution (DPI) is another array, HWResolution, in the header..
> 3.In my driver , I get the cupsBitsPerColor, cupsColorSpace and
> cupsBitsPerPixel from my PPD file. Is it correct?
You get them from the header in the raster data that you read. The printing system gets them from the PPD in order to determine how to rasterize each page.
--
Roger L Long
email@hidden
------------------------------
_______________________________________________
Printing mailing list
email@hidden
http://lists.apple.com/mailman/listinfo/printing
End of Printing Digest, Vol 2, Issue 135
****************************************
___________________________________________________ 郔陔唳 Yahoo!✽藻撈�r籵�� 7.0 betaㄛ轎愐鋒繚����¦斕湖ㄐ http://messenger.yahoo.com.tw/beta.html
_______________________________________________ Do not post admin requests to the list. They will be ignored. Printing mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/printing/email@hidden This email sent to email@hidden
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.