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: Keep raster data in printer driver



Hi Xavier,
 
Thanks for your help. It works fine now.
 
Regards,
--Henry
 
 
 
 
 

Hello,
I tried both methods and they work for me.
> Method 1:
> Use malloc( ) to allocate a big chunk(about 22M) of buffer to keep
data.
Here's part of my code:
rasterDataIn = (Ptr) malloc ( pageWidth * pageHeight * 4 );
rasterDataPtr = rasterDataIn;
Then for each band:
memcpy (rasterDataPtr, pmRasterBand.baseAddress, pmRasterBand.size);
rasterDataPtr += pmRasterBand.size;
> Method 2:
> Try to create a file to keep data like below shown. But I can't open
> it. In other directory, like /usr/lib,using the open function to test
is
> okay. It looks like permission problem. But I don't know how to solve
in
> printer driver.      

> Tempfd =open("ExpRaster.dump", O_RDWR | O_CREAT, S_IRWXU | S_IRWXG |
> S_IRWXO);
Try this:
Tempfd =open("ExpRaster.dump", O_CREAT | O_WRONLY, 0644);
Regards
--
Xavier Garreau <email@hidden>
http://www.xgarreau.org/

___________________________________________________ 郔陔唳 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



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.