문제

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.

올바른 솔루션이 없습니다

다른 팁

PNGs, like most other image formats that support transparency, seem to have multiple ways to handle the alpha channel. Apple recommends the PNG-24 format; perhaps GraphicsConverter gave something else?

You can use Preview to convert your image files. The iPhone should like it better. Just open your file and Save As.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top