Re: Saving a rotated image
Re: Saving a rotated image
- Subject: Re: Saving a rotated image
- From: Roland King <email@hidden>
- Date: Thu, 11 Aug 2011 21:01:45 +0800
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 <email@hidden>
> To: charisse napeÿfffff1as <email@hidden>
> Cc: "email@hidden" <email@hidden>
> 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 (email@hidden)
>>
>> 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:
>>
>> This email sent to email@hidden
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden