Re: Flipping an NSImage (SOLVED)
Re: Flipping an NSImage (SOLVED)
- Subject: Re: Flipping an NSImage (SOLVED)
- From: Heinrich Giesen <email@hidden>
- Date: Fri, 7 Oct 2005 12:05:03 +0200
On 07.10.2005, at 02:50, Michael Becker wrote:
Actually I did that, already. Here's my code:
NSBitmapImageRep *imageRep = [NSBitmapImageRep
imageRepWithContentsOfFile:path];
NSImage *image = [[NSImage alloc] initWithSize:[imageRep size]];
[image addRepresentation:imageRep];
That did not work. But luckily . . . . .
The code works, it shows exactly what you said
(maybe not what you wanted) : the image
has a size with respect to the resolution of the ImageRep.
If you want to get an image with a size without using the
resolution (i.e. with respect to the pixelnumber), use this:
NSImage *image = [[NSImage alloc] initWithSize:
NSMakeSize( [imageRep pixelsWide, [imageRep pixelsHigh] )];
Try also in Preview.app --> Preferences button:
Respect image DPI for "Actual Size"
and Preview.app --> Tools --> Get Info : Details
--
Heinrich Giesen
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden