Re: resize image with cocoa
Re: resize image with cocoa
- Subject: Re: resize image with cocoa
- From: Alexey Zakhlestin <email@hidden>
- Date: Mon, 5 Dec 2005 13:45:42 +0300
take a look at this article:
http://weblog.scifihifi.com/2005/06/25/how-to-resize-an-nsimage/
On 12/5/05, Francesca P <email@hidden> wrote:
>
>
>
Il giorno 05/dic/05, alle ore 09:13, Alexey Zakhlestin ha scritto:
>
>
sure. NSImage does that transparently
>
>
>
Ok,
>
but now the problem is saving my image..
>
>
I'm searching and trying,
>
I've found this code..
>
>
>
>
mydata=[[NSData alloc] initWithContentsOfFile:path3];
>
>
bitmapRep = [[NSBitmapImageRep alloc] initWithData:uffa];
>
[bitmapRep setBitsPerSample:8];
>
bitmapData = [bitmapRep
>
representationUsingType:NSJPEGFileType
>
properties:[NSDictionary
>
dictionaryWithObjectsAndKeys:[NSNumber
>
numberWithFloat:0.0], NSImageCompressionFactor, nil]];
>
[bitmapData writeToFile:pathanteprima2
>
atomically:YES];
>
>
>
But here I don't know how resize image.
>
If I load the image from file it isn't resized.
>
So I'm trying to load from a view?
>
>
Or what can I do to save my resized image in JPEG format?
>
>
thanks
>
>
>
>
>
--
Alexey Zakhlestin
Milk Farm Software, ltd. CEO
http://www.milkfarmsoft.com/
_______________________________________________
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