iDevGames Forums
How can I avoid XCODE transform my PNGs when moved to iPhone? - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: iPhone, iPad & iPod Game Development (/forum-11.html)
+--- Thread: How can I avoid XCODE transform my PNGs when moved to iPhone? (/thread-1469.html)



How can I avoid XCODE transform my PNGs when moved to iPhone? - riruilo - Apr 11, 2009 04:28 PM

Hi dudes!

How can I avoid XCODE transform my PNGs when moved to iPhone?
I know there is a flag or define or something but I can't find it.
Do you remember it?
Now I rename my PNG to PN2 but I don't like this way.

BTW: I ask this because I use C++ and have a png loader that works perfectly on the simulator, but this loader don't load modify pngs.

Thanks a lot.


How can I avoid XCODE transform my PNGs when moved to iPhone? - miq01 - Apr 13, 2009 03:52 PM

Hi riruilo.

What do you mean by transform? I'm using PNGs in the game I'm working on and the only problem I have is that all the textures are rotated 180 degrees, but I think it's OpenGL related and not because of Xcode doing any transformation. Is it what you mean? Other than that, my PNGs look exactly like the original ones.

If you want I can attach the code I'm using to load them -I got it from an example I found on the Internet- although it's Objective-C and not C++.


How can I avoid XCODE transform my PNGs when moved to iPhone? - kodex - Apr 13, 2009 03:56 PM

The iPhone strips off the header from the PNG files so they arent read correctly


How can I avoid XCODE transform my PNGs when moved to iPhone? - arekkusu - Apr 13, 2009 06:36 PM

Read the Xcode documentation that I pointed out in the previous thread on this topic.


How can I avoid XCODE transform my PNGs when moved to iPhone? - Frank C. - Apr 13, 2009 08:58 PM

riruilo Wrote:Now I rename my PNG to PN2 but I don't like this way.
Personally I find this to be the easiest and most flexible way. There are times when you want Xcode to mangle your PNGs (e.g. Icon.png and Default.png).


How can I avoid XCODE transform my PNGs when moved to iPhone? - riruilo - Apr 14, 2009 02:18 AM

Frank C. Wrote:Personally I find this to be the easiest and most flexible way. There are times when you want Xcode to mangle your PNGs (e.g. Icon.png and Default.png).

Mmm.. I didn't realise about that. Do you know if I will have problems in the case I deactivate PNG transformation?

Thanks for replies.


How can I avoid XCODE transform my PNGs when moved to iPhone? - Frank C. - Apr 14, 2009 02:42 PM

riruilo Wrote:Mmm.. I didn't realise about that. Do you know if I will have problems in the case I deactivate PNG transformation?.
I don't think you'll have problems, but Apple has legitimate performance reasons for mangling PNGs so it would make sense to play nice with the springboard when it loads your icon and default image.


How can I avoid XCODE transform my PNGs when moved to iPhone? - smallstepforman - Apr 24, 2009 12:02 AM

Add "IPHONE_OPTIMIZE_OPTIONS=-skip-PNGs" to your project settings.

See http://www.plaidworld.com/iphonefaq.txt for instructions.