Re: resize image with cocoa
Re: resize image with cocoa
- Subject: Re: resize image with cocoa
- From: Francesca P <email@hidden>
- Date: Mon, 5 Dec 2005 11:40:40 +0100
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] initWith
Data: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
_______________________________________________
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