I'm trying to small down my app's size and first thing I've done is to convert non-transparent PNGs (like backgrounds) to JPGs (which weights a lot less). Is there any problem doing this? Is this going to cause my app to load textures slower or make it draw them harder (so, is there any optimization problem using JPG textures in OpenGL instead of PNG)?
Surely you convert whatever image you load into an OpenGL native format as soon as you load anyway? So it won't make any performance difference - as for load time, it should be lower with the smaller JPEG files. However, JPEG compression is not lossless so you may experience a drop in image quality.
Personally I pre-process my images, and compress with zlib, into a format suitable for the game and OpenGL rather than using either format.
__________________
Visit Mr Jack Games for my blog and more about my games
...as for load time, it should be lower with the smaller JPEG files...
The time spent doing the actual I/O of loading the smaller file should be less, but might there be an increase in time doing the JPG decoding?
If overall app size is your primary concern, you probably want JPG (assuming you're OK with the whole lossy aspect), though I suspect your texture load times, from start to finish, may be greater than if using PNG. Just my theory; you should run your own tests to verify what works best for you.
The time spent doing the actual I/O of loading the smaller file should be less, but might there be an increase in time doing the JPG decoding?
Aye, there might be, and I've not tried JPG specifically. However, my experience with compression and iPhone leads me to believe that the time take to decode will be considerable less than the decrease in load time, using zLib to compress my textures certainly gained me a substantial speed up.
I think the processor and main RAM are just that much faster than the main flash storage.
__________________
Visit Mr Jack Games for my blog and more about my games