On Aug 5, 2010, at 3:07 PM, Quincey Morris wrote: > On Aug 5, 2010, at 11:23, Brian Postow wrote: > >> the representations size is also in points. > > Well, to clarify, do you really mean "size"? I would assume that > imageRep.size.width == image.size.width (both are in points), but > imageRep.pixelsWide would be different, if the resolution is not 72 dpi. Did > you actually check pixelsWide/pixelsHigh? >
yes: I have the following code: PDFPage* pdfPage = [[PDFPage alloc] initWithImage: img]; DEBUGSTR(@"I have %d pages", [doc pageCount]); [doc insertPage:pdfPage atIndex: maxPage ]; NSData* imgData = [pdfPage dataRepresentation]; NSImage* img2 = [[NSImage alloc] initWithData:imgData ]; and in the debugger I get: (gdb) p (int)[[[img2 representations] objectAtIndex: 0] pixelsHigh] $1 = 611 (gdb) p (int)[[[img representations] objectAtIndex: 0] pixelsHigh] $2 = 1696 > Incidentally, if your scenario is intentionally working with only a single > image representation, then it's probably better (and, I'd say, with 10.6 > definitely better) to avoid NSImage completely and stick with just NSImageRep > throughout the scenario. I don't think there are any API reasons left to > prefer NSImage, when multiple representations are not at issue, but others > may have a more informed opinion on that subject than I do. > I'm targeting 10.5... I'm not sure if that matters much, but yeah... I'm also using IKImageView, and so I'm ACTUALLY targeting CGImageRef, but NSImage seems the easiest way of getting there... > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > 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: > http://lists.apple.com/mailman/options/cocoa-dev/brian.postow%40acordex.com > > This email sent to brian.pos...@acordex.com > Brian Postow Senior Software Engineer Acordex Imaging Systems _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com