• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Resolution of an NSImage(Rep)?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Resolution of an NSImage(Rep)? (From: Brian Postow <email@hidden>)
 >Re: Resolution of an NSImage(Rep)? (From: Graham Cox <email@hidden>)
 >Re: Resolution of an NSImage(Rep)? (From: Brian Postow <email@hidden>)
 >Re: Resolution of an NSImage(Rep)? (From: Brian Postow <email@hidden>)
 >Re: Resolution of an NSImage(Rep)? (From: Quincey Morris <email@hidden>)
 >Re: Resolution of an NSImage(Rep)? (From: Brian Postow <email@hidden>)
 >Re: Resolution of an NSImage(Rep)? (From: Quincey Morris <email@hidden>)
 >Re: Resolution of an NSImage(Rep)? (From: Brian Postow <email@hidden>)
 >Re: Resolution of an NSImage(Rep)? (From: Quincey Morris <email@hidden>)
 >Re: Resolution of an NSImage(Rep)? (From: Brian Postow <email@hidden>)

  • Prev by Date: Re: Resolution of an NSImage(Rep)?
  • Next by Date: Coercion exception assigning a Core Data property
  • Previous by thread: Re: Resolution of an NSImage(Rep)?
  • Next by thread: calling a function in one class from another
  • Index(es):
    • Date
    • Thread