Loading large images Monotouch

I am using ImageLoader in my app to load images for tableview. It works perfect for small images as it was designed for. But in my app I load some images that are nearly 3MB and when I load in a tableview(4-5 cells) my app crashes after couple of refreshes. I understand that the ImageLoader is not the right API for this, but how do I download or infact load a scaled down version of the image so that there is no memory hog. The tableview does not need a high resolution image and since its showing a small thumbnail size, I would like to know what is the best option to load in IOS and if there are any predefined API available?. (For Android I use the android developer recommended bitmap sizing functions to scale down the image).

Answers


UIImage has a Scale() function.

UIImage imageToBeScaled ...
UIImage scaledImage = imageToBeScaled.Scale (new SizeF (newWidth, newHeight));

Need Your Help

AjaxControlToolkit AsyncUpload Creates New Session on upload completed

asp.net ajax session

I am using the Ajax Control Toolkit 3.5 (The project cannot be upgraded to 4.0). The project also uses Cookieless sessions. This app is reliant on session state pretty heavily.

How to get the current collection of mediaitems in ipod player?

iphone ios ios4

I have an application with [MPMusicPlayerController iPodMusicPlayer].

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.