Retina 显示器 VS 正常显示器色差

2023-07-08移动开发问题
18

本文介绍了Retina 显示器 VS 正常显示器色差的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我正在设计一个自定义按钮,它需要我在 UIImageView 之上覆盖一个 UIButton.UIImageView 使用 [UIImage stretchableImageWithLeftCapWidth:topCapHeight:] 图像,UIButton 具有带有图案图像的背景色 [UIColor colorWithPatternImage:[UIImage imageNamed:@"buttonPattern.png"]]

I am designing a custom button with that requires me to overlay a UIButton on top of a UIImageView. The UIImageView uses a [UIImage stretchableImageWithLeftCapWidth:topCapHeight:] image and the UIButton has a background color with a pattern image [UIColor colorWithPatternImage:[UIImage imageNamed:@"buttonPattern.png"]]

我面临的问题是,在 iPhone 4 上,来自 UIButtonUIImageView 的图像看起来颜色略有不同,尽管它们应该匹配.在 iPhone 3GS 上测试同样的东西,结果正常,没有色差.

The problem I am facing is that on iPhone 4, the images from the UIButton and the UIImageView appear to have slightly different colors although they should match. Testing the same thing on an iPhone 3GS shows normal results without the color difference.

这张图片显示了不同之处:

This image shows the difference:

如您所见,它在 3GS 上看起来不错.在视网膜显示屏上,您可以清楚地看到颜色的差异.我什至尝试在视网膜显示器上使用低分辨率图像(来自 3GS),颜色仍然显示不同.这是视网膜显示设备中的错误吗?有没有人遇到过这个问题?

as you can see it looks fine on the 3GS. On the retina display you can clearly see the difference in color. I even tried using the low res images (from the 3GS) on the retina display, the colors were still showing differently. is this a bug in retina display devices? has anyone faced this issue before?

推荐答案

确保您的所有图像文件都没有嵌入的颜色配置文件.这可能很棘手.对于 Adobe 软件,此页面很有帮助:

Make sure none of your image files has an embedded color profile. This can be tricky. For Adobe software, this page is helpful:

http://bjango.com/articles/photoshop/

这篇关于Retina 显示器 VS 正常显示器色差的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

硬件音量按钮更改应用程序音量
Hardware Volume buttons change in app volume(硬件音量按钮更改应用程序音量)...
2024-08-12 移动开发问题
10

Cocos2d - 如何检查不同层中对象之间的交集
Cocos2d - How to check for Intersection between objects in different layers(Cocos2d - 如何检查不同层中对象之间的交集)...
2024-08-12 移动开发问题
8

恢复游戏 cocos2d
Resume game cocos2d(恢复游戏 cocos2d)...
2024-08-12 移动开发问题
6

突出显示朗读文本(在 iPhone 的故事书类型应用程序中)
Highlight Read-Along Text (in a storybook type app for iPhone)(突出显示朗读文本(在 iPhone 的故事书类型应用程序中))...
2024-08-12 移动开发问题
9

Cocos2D + 仅禁用 Retina iPad 图形
Cocos2D + Disabling only Retina iPad Graphics(Cocos2D + 仅禁用 Retina iPad 图形)...
2024-08-12 移动开发问题
10

正确的 cocos2d 场景重启?
Proper cocos2d scene restart?(正确的 cocos2d 场景重启?)...
2024-08-12 移动开发问题
7