Re: Resizing an image
Re: Resizing an image
- Subject: Re: Resizing an image
- From: Robert Dell <email@hidden>
- Date: Mon, 23 Jan 2006 18:30:35 -0500
Heinrich Giesen wrote:
On 22.01.2006, at 13:09, Robert Dell wrote:
NSBitmapImageRep *theRep = ...;
why dont people like to finish out a line? it's almost as if they
are speaking off-the-cuff and have no idea if it will work.
at least that's the impression i get when somebody does that.
I was sure you know where your images comes from, is it like ?
NSImage *theImage = [[NSImage alloc] initWithContentsOfFile:fileName];
You may get the corresponding representation with:
NSBitmapImageRep *theRep = [NSImageRep
imageRepWithContentsOfFile:fileName];
or
NSBitmapImageRep *theRep = [[theImage representations] objectAtIndex:0];
(there was a typo in my former mail).
it's almost as if they are speaking off-the-cuff and have no idea if
it will work.
at least that's the impression i get when somebody does that.
I have some more ideas how to get images. (about 6 class methods
of NSImageRep and some other for NSBitmapImageRep).
And concerning the scaling: I wrote my own classes to scale images
without loss of information
(comments, EXIF data, icc profiles, thumbnail images, pixel structure,
etc.)
Sorry I couldn't help you.
actually, i was looking at all these postings even in cocoabuilder archive and saw so many of those that this last one sort of set me off.
as a beginner in certain fields, i'd love to see full coded stuff written out as opposed to the ellipse (elipse?) ...
that's why when somebody asked how to load a text file into a string, i copied how i do it in it's entirety, including converting the file from whatever to unix format.
robert
_______________________________________________
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