Image Resolution
Image Resolution
- Subject: Image Resolution
- From: Amy Heavey <email@hidden>
- Date: Mon, 18 Oct 2010 12:37:11 +0100
Hi,
I've got an app that generates composite images, so it places images
onto a single canvas and saves that as a new image. It's working fine,
but I'm struggling with the resolutions/representations issue.
The source images are not generated by us, they are from a variety of
surces, and are generally 200pixels + on each side, however sometimes
they are 72 dpi, and sometimes they are 300dpi. Even if an aimage is
450pixels square, when it is set as 300 dpi it's reduced too small
when my app reduces it it to fit a 75pixel square area.
I know this is to do with the bitmapRepresentation, but I can't work
out how to change it. If I was doing this in photoshop I'd be keeping
the actual pixel count, but changing the resolution from 300 to 72 for
these images.
Can anyone point me in the right direction? Here's the code I'm using
at the moment:
while ((imgPath = [imageLoop nextObject])) {
NSImage *img = [[NSImage alloc]initWithContentsOfFile:imgPath];
[targetImage lockFocus];
[img drawInRect:NSMakeRect(x,y,75,75) fromRect:NSMakeRect(20,20,0,0)
operation:NSCompositeCopy fraction:1];
Thanks
Amy Heavey
_______________________________________________
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