Re: Resolution of an NSImage(Rep)?
Re: Resolution of an NSImage(Rep)?
- Subject: Re: Resolution of an NSImage(Rep)?
- From: Quincey Morris <email@hidden>
- Date: Thu, 5 Aug 2010 12:58:35 -0700
On Aug 5, 2010, at 12:18, Brian Postow wrote:
> 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
It seems this may have crossed over into the semantics of PDFs, which is beyond my competence. (I would *hope* that it's possible to obtain a bitmap representation of a PDF at any resolution, but I wouldn't necessarily *expect* that you could recover the original page image, other than contingently by choosing a matching rendering resolution.)
_______________________________________________
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