PNG is slow?

Chat about anything not covered in these forums, but keep it civil!

Post » Sun Sep 02, 2012 8:59 am

I read an article about PNG and RLE TARGA. What do you think? I'm not too knowledged in digital image formats, but figured it was an interesting topic.

http://astronautz.com/wordpress/why-pngs-are-a-poor-choice-for-games/DiGiCORE2012-09-02 09:09:21
- Diji
B
23
S
4
G
4
Posts: 54
Reputation: 3,996

Post » Sun Sep 02, 2012 9:12 am

I believe that only holds true for loading textures into memory, which means that only preloading time is affected.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Sun Sep 02, 2012 9:29 am

Oh, I see. Plus, I was reading this. It would seem Scirra had already worked on the matter of loading times considering images.
- Diji
B
23
S
4
G
4
Posts: 54
Reputation: 3,996

Post » Sun Sep 02, 2012 12:19 pm

@DiGiCORE : in fact, what they said isn't very relevant to HTML5. They are working with native binaries. When going native, XCode on iOS is using a fileformat that is indeed having the .png extension, but in fact it's not a true PNG (for efficiency reason, Apple swap internally the channel order of their file, to let OpenGL ES, the backend displaying the images and doing manipulations on them, go faster).
Because of that, if you load true PNG files in an XCode project, without "optimzing" them the Apple way (swapping the channels), the app is going to do it at load time. Meaning you'll be slower than any other fileformat.
As the original author is saying, when you optimize them, and make a pass of PNGCrush or a similar tool on them, they are as fast (or close) to other file format.
Finally, browser (HTML5) don't support natively TGA. You can only go with BMP/JPG/PNG(and XBM/PBM but don't deal with that, it's old, buggy and unuseful).
If you want to load another file format, you need to create a wrapper to deal with that format in JS, and it's going to be slower that the eventual benefit of a "faster" file format...
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Sun Sep 02, 2012 1:44 pm

Good discussion, and great insight @Pode.
All I know is TGA files are large and contain much more information then required by web browsers/pages/apps.
I only use it for prints because of its loss-less quality.
B
36
S
10
G
6
Posts: 948
Reputation: 11,101

Post » Sun Sep 02, 2012 4:57 pm

Thanks Pode. Very interesting.
- Diji
B
23
S
4
G
4
Posts: 54
Reputation: 3,996

Post » Sun Sep 02, 2012 6:00 pm

If you measure the time from pressing 'download' to when the game starts up, PNG is still probably faster since it will reduce the download size a lot more!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600


Return to Open Topic

Who is online

Users browsing this forum: No registered users and 5 guests