English 中文(简体)
Blurry UIImages
原标题:Blurry UIImages

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.

最佳回答

当你向用户展示出由此产生的<代码>UIImage时,您是否赞同关于六甲边界的观点?

theImage.frame = CGRectIntegral(theImage.frame);

如果你的意见被定位或与非融合价值观相混淆,那么你的大多数图表和文字似乎都是模糊的。 如果你在模拟器中掌握你的照片,你可以转而使用“孔错乱图像”,以突出那些被打坏的分子。

问题回答

暂无回答




相关问题
Asynchronous request to the server from background thread

I ve got the problem when I tried to do asynchronous requests to server from background thread. I ve never got results of those requests. Simple example which shows the problem: @protocol ...

objective-c: Calling a void function from another controller

i have a void, like -(void) doSomething in a specific controller. i can call it in this controller via [self doSomething], but i don t know how to call this void from another .m file. I want to call ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

NSUndoManager and runModalForWindow:

I have a simple Core Data app which displays a list of entities in the main window. To create or add new entities, I use a second modal window with a separate managed object context so changes can be ...

NSMutableArray values becoming "invalid"

I m trying to show a database information in a tableview and then the detailed information in a view my problem is as follow: I created a NSMutableArray: NSMutableArray *myArray = [[NSMutableArray ...

iPhone numberpad with decimal point

I am writing an iPhone application which requires the user to enter several values that may contain a decimal point (currency values, percentages etc.). The number of decimal places in the values ...

热门标签