2

I started with a .tiff file and used GraphicConverter to change it to a .png and set a transparency color. Worked fine in the simulator but when I pushed to the device the transparency color became black. Tested with a .png I downloaded from the net and that worked fine, so it seems to only happen with some files. Thus I suspect it has something to do with the way GraphicConverter writes the .pngs, but I don't know enough about file formats to debug it. Any ideas/suggestions? Ideally I'd like to programatically treat all .pngs because my app allowed dynamic loading of arbitrary files, so I can't verify the transparency beforehand.

4

1 回答 1

10

与大多数其他支持透明度的图像格式一样,PNG 似乎有多种方法来处理 Alpha 通道。Apple 推荐 PNG-24 格式;也许 GraphicsConverter 给了别的东西?

您可以使用预览来转换您的图像文件。iPhone应该更喜欢它。只需打开您的文件并另存为。

于 2010-06-01T17:30:31.317 回答