Is there a "right" format for bitmap images? jpg, png, power of 2, slicing?

Is there a “best practices” recommendation for preparing images for efficient use in Corona?

1.) A .jpg seems “smaller” than .pngs, but do they cause the app to do extra work when uncompressing them?
2.) Does Game Edition prefer “Power of 2” sizes?
3.) Would a textured background benefit from being assembled from a smaller repeating tile instead of a large full page image?

-Andy Hullinger

[import]uid: 5339 topic_id: 1484 reply_id: 301484[/import]

Hi Andy,

here are my thoughts on this subject.

  1. All compressed image formats will be uncompressed inside the device. I would choose PNG’s over JPG’s any time because of the quality.
  2. Mmmh, don’t know about that. I read people preaching to use the Po2 sized images which would perform better. It depends on the hardware a lot, if it is able to work with these textures. And I just recently read that it does not matter on the mobile devices, as they can’t perform a huge ammount of images anyway. I guess it is up to test and see.
  3. Well, it depends. Usually yes I say, but maybe Corona is subdividing a big image internally anyway. I would say just make a small test and see if you see a noticceable framerate difference.

Cheers
Michael Hartlef

http://www.whiteskygames.com
http://www.twitter.com/mhartlef
[import]uid: 5712 topic_id: 1484 reply_id: 4178[/import]

Like Mike said.

(1) JPG will make a smaller app, but may take longer to load. Avoid high JPG compression as that introduces visible artifacts.This won’t matter much in most cases. PNG is the choice if you have transparent images.
(2) It doesn’t matter to Corona, but images are loaded into texture memory which requires power of 2 images. So if you have a 130x130 image, it takes up a 256x256 tile. You’d be better off using 128x128. This only matters if you have a *lot* of images.
(3) If it’s screen sized, just use the full size image, unless you have *lots* of images, in which case you need to start paying attention to total memory usage. [import]uid: 54 topic_id: 1484 reply_id: 4307[/import]