1

我有一个由我的设计师在 Photoshop 中创建的背景图像。我将它转换为 png-24,并有两个文件,一个用于 640 x 920 的视网膜显示,一个用于 320 x 460 的正常显示(我用@2x 正确命名)。

当我在 iPhone 4 上实现它时,它不能正确渲染(颜色要深得多),但是,当我把它放在 iPhone5 上时它工作正常。文件大小为 608 KB。任何人都知道可能出了什么问题以及我该如何解决这个问题?

4

2 回答 2

2

I wouldn't say that the size is a problem. Beeing a background image means it doesn't change over the life time of the app. Regarding the file size - you could play with the "Save for Web" option in Photoshop and watch for artifacts while you change the format/quality. PNG is great for images with transparency and according to Apple it is the optimal image format for the iPhone.

The color inconsistency between devices might be due to differences in display quality. You could try to fix it programmatically, but make sure to test it on a few devices. As for a easy workaround, in interface builder add a new view over you background image and set the transparency and color to your liking. Then set the view to hidden. Then, depending on the device (iPhone5, iPhone4) set your color view to visible [view setHidden:NO];

However I can't imagine that iPhone displays differ that much, so be careful if you really want to fix it programmatically.

于 2012-11-11T20:06:02.373 回答
0

我真的尝试了很多来解决这个问题,并在上​​面使用了 DTS 票证。最后,这是因为 iPhone5 显示颜色更好,我无法修复它。

于 2013-05-18T16:53:05.823 回答