CGImageRef printing issue
CGImageRef printing issue
- Subject: CGImageRef printing issue
- From: "Renzil D'Souza" <email@hidden>
- Date: Wed, 12 Aug 2009 12:09:24 +0530
Hi,
I'm trying to print, given a CGImageRef (cgImage). In order to do this
correctly, I need to get a couple of 'CGImageProperty' from my image, like
kCGImagePropertyDPIHeight, kCGImagePropertyDPIWidth and
kCGImagePropertyOrientation. I try to do this from a CGImageSourceRef, which
I create in the following way:
CGImageSourceRef imageSource =
CGImageSourceCreateWithDataProvider(CGImageGetDataProvider(cgImage), NULL);
Once I get the CGImageSourceRef, I make a call to
CGImageSourceCopyProperties() passing it the imageSource . But this always
returns a NULL. If I output this CGImageRef to a file, and then read it back
as a CGImageSource, and then call CGImageSourceCopyProperties(), it works
fine and gives me the required properties. But I need it to work without
having to output an image file.
>From my experience on Windows, DPIHeight and DPIWidth are properties of the
display device the image is drawn on, and not properties of the image
itself. And what is kCGImagePropertyOrientation? The print routine on Mac
that I'm linking to needs it, but I have no idea what it is, and I don't
think it has a Windows equivalent. Is it that the orientation of a saved
image file can be one of a number of enumerations, but the orientation of a
CGImageRef is always the default orientation?
Thanks for your time.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden