CGImageRef printing issue

2009-08-12 Thread Renzil D'Souza
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

Re: CGImageRef printing issue

2009-11-12 Thread Mirko Viviani
On 12/ago/2009, at 21.30, David Duncan wrote: >> 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. > > They are properties of both. In the case of printing, you are using a fixed > grid

Re: CGImageRef printing issue

2009-11-12 Thread David Duncan
On Nov 12, 2009, at 2:26 PM, Mirko Viviani wrote: > On 12/ago/2009, at 21.30, David Duncan wrote: > >>> 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. >> >> They are properties of b

Re: CGImageRef printing issue

2009-11-12 Thread Kyle Sluder
On Thu, Nov 12, 2009 at 2:26 PM, Mirko Viviani wrote: > Do you mean that there is no way to print an image using a grid of 300 PPI > with Cocoa/Quartz? > If not, why? Alternatives? Resolution independence. Your physical screen may have 96 pixels per inch, but the system exposes it as 72 points

Re: CGImageRef printing issue

2009-11-12 Thread Shawn Erickson
On Thu, Nov 12, 2009 at 2:26 PM, Mirko Viviani wrote: > Do you mean that there is no way to print an image using a grid of 300 PPI > with Cocoa/Quartz? > If not, why? Alternatives?

Re: CGImageRef printing issue

2009-11-13 Thread Mirko Viviani
On 12/nov/2009, at 23.46, David Duncan wrote: > Just like with all CGContexts you can apply a transform matrix to change the > coordinate system. However in general this isn't necessary. If you want an > image to display in a 1" x 1" area on screen, draw it into a 72x72 box. The > pixel size of

Re: CGImageRef printing issue

2009-11-13 Thread David Duncan
On Nov 13, 2009, at 1:27 AM, Mirko Viviani wrote: > To be honest I didn't remember the resolution indipendent thing, but I was > supposing something similar > since drawing my image in tiles on this context resulted with gaps ! > But I was not able to obtain the scale factor of the printing conte

Re: CGImageRef printing issue

2009-08-12 Thread David Duncan
On Aug 11, 2009, at 11:39 PM, Renzil D'Souza wrote: 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 CGIm