On 10 Oct 2014, at 1:08 pm, Carl Hoefs <newsli...@autonomy.caltech.edu> wrote:

>  [oldImage setSize:NSMakeSize(640.0,480.0)];


The size of an NSImage is an abstract property that does not reflect the pixel 
dimensions of the representations within it. This sounds a bit odd, until you 
realise that images can have any resolution (including none, for PDFs), so this 
size is the size the image scales to, in points, when drawn in a Quartz context.

Instead you need to work with the bitmap image representation that the image 
holds (or create one if it doesn't have one). In fact this latter approach 
might be the most general and safest anyway, so you can work with PDF images, 
etc.

--Graham



_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to