Hi guy's,
I am getting the list of contacts from the Address book in that some contacts have images which are taken with camera they are very huge in size.I am displaying the contacts along with their images in a 3x3 rows and columns format.The problem is due to huge size of the images its taking time to load the images.Can anyone suggest me how to Compress them. I tried to compress them in a way:
if ([imageData length] > 0)
{
int len = [imageData length];
if(len > 9000)
{
UIImage *theImage = [UIImage imageWithData:imageData];
imageData = UIImageJPEGRepresentation(theImage,0.5);
printf("\n image data length in condition...%d",[imageData length]);
imageViewL.image = [UIImage imageWithData:imageData];
}
else
{
imageViewL.image = [UIImage imageWithData:imageData];
}
}
Eventhough its taking time to load.
Anyone's help will be much appreciated.
Thanks to all, Monish.