Something like that will work to write the contents of image, whatever it is, 
to a file. 

                NSData *data = UIImagePNGRepresentation( image );
                [ data writeToURL:fileURL atomically:YES ];

But how are you rotating the image, are you actually making a bitmap context 
and rotating it and drawing it into the context? If so you don't have to 
necessarily do that, you can start with the unrotated image, probably in a 
UIImageView just set a transform on the UIImageView and that will show it 
rotated. Which means you just save the original image and the rotation angle 
again and .. when you need it back you load up the original image into a new 
UIImageView and add that, rotated to your view.  

Your original question is a bit vague so it's not easy to figure out what you 
REALLY want to do. 


On Aug 11, 2011, at 8:44 PM, charisse napeÿfffff1as wrote:

> I can already rotate an image. But I don't know how to save it in that 
> current state.
> 
> 
> 
> ________________________________
> From: Mike Abdullah <cocoa...@mikeabdullah.net>
> To: charisse napeÿfffff1as <cnape...@yahoo.com>
> Cc: "cocoa-dev@lists.apple.com" <cocoa-dev@lists.apple.com>
> Sent: Wednesday, August 10, 2011 11:23 PM
> Subject: Re: Saving a rotated image
> 
> Break the problem up. Which bits don't you know how to do?
> 
> On 10 Aug 2011, at 07:37, charisse napeÿfffff1as wrote:
> 
>> Hello All,
>> 
>> Anybody knows how to save a rotated image to the Documents folder in iphone?
>> Given a variable number of degrees, how to save that rotated image in file, 
>> keeping its current
>> rotation angle?
>> 
>> thanks,
>> Charisse
>> 
>> _______________________________________________
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> 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:
>> http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net
>> 
>> This email sent to cocoa...@mikeabdullah.net
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/rols%40rols.org
> 
> This email sent to r...@rols.org

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to