I'm creating a CGImageRef out of, in one case, a TIFF file, through a CGImageSource, in another case raw bitmap data via a CGDataProvider and in another case, from a PDFPage via an NSImage. I need to know the resolution of the CGImage. Is there an easy way to find this out?
in the PDFPage case, I should be able to get the pixelwidth and the pointwidth and do the arithmetic. however, in the other two cases, I don't see a way to get resolution (or pointwidth, or physical width or anything like that) out of the source.
Actually, in the Raw bitmap case, I have the resolution separately, but I guess I'm wondering if I need to carry that along separately, or if there's a clever way to just get it out of the CGImageRef...