Resizing UIImage and saving

I am trying to figure out how I can shrink and save a UIImage, read it back in later, and then convert back to the original size without losing quality. I have managed to do the resizing and saving, but the problem is that if I save it smaller, when I read it back in and expand it, the quality is very poor. Does anyone know how this can be done without losing image quality?

Answers


You can't downsize the image and then bring it back without losing quality. You can't make something out of nothing, once you lose the data you lose the data.

You will need to save two versions of the image, one large and one small. This is a very typical scenario when dealing with thumbnails.

Check out the following site which provides categories for resizing images as well as several other really cool stuff:

http://vocaro.com/trevor/blog/2009/10/12/resize-a-uiimage-the-right-way/


Need Your Help

How to Auto-run construct in parent class without call from child class

php oop constructor

I'm searching for a way to call a parent class constructor(?) auto-magically from a child class:

Custom principal objects vs Membership API in ASP.NET?

c# asp.net authorization membership principal

I'm trying to get a handle on all the various techniques of implementing custom authorization within a traditional ASP.NET application - it seems that the preferred approach is to use the Membershi...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.