I have a problem when trying to display small (16x16) UIImages, they appear a bit blurry. These UIImages are favicons I download from different websites and I have compared them with some images from other apps and they re blurrier.
I custom custom:
NSData *favicon = [NSData dataWithContentsOfURL:[NSURL URLWithString:[subscription faviconURL]]];
if([favicon length] > 0){
UIImage *img = [[UIImage alloc] initWithData:favicon];
CGSize size;
size.height = 16;
size.width = 16;
UIGraphicsBeginImageContext(size);
[img drawInRect:CGRectMake(0, 0, size.width, size.height)];
UIImage *scaledImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
cell.mainPicture.image = scaledImage;
}
我的习惯“可调用的电文”或我下载图像的方式是否有什么错误?
谢谢。
[EDIT 1] : By the way, .ico and .png look the same. [EDIT 2] : I m working on an iPad 2, so no Retina display.