Using PNGs for storing imported bitmaps internally

If there is something important you think is missing in the current version of ZGameEditor then you can post a feature request here!

Moderator: Moderators

Post Reply
darkhog
Posts: 58
Joined: Sun Sep 09, 2012 7:59 pm

Using PNGs for storing imported bitmaps internally

Post by darkhog » Wed Sep 12, 2012 4:48 am

Because texture which have in PNG 6.9KB after import was increased to around 393216 bytes (over 390KB!), which is same texture as bitmap (BMP). I know that textures would need to get uncompressed before run, but please store them in project file and in exe as PNGs so file size will be even smaller (especially significant if you are using lots of loaded textures)

User avatar
VilleK
Site Admin
Posts: 2052
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK » Wed Sep 12, 2012 10:45 am

The ZGE engine has a built-in JPEG decoder. So you can use jpg format to get compressed bitmaps in executable.

darkhog
Posts: 58
Joined: Sun Sep 09, 2012 7:59 pm

Post by darkhog » Wed Sep 12, 2012 12:06 pm

Yeah, but JPEG has no alpha and is of lesser quality. And PNG is a lossless format with small footprint (at least on disk) plus has alpha. So why not use PNG instead of BMP and convert all BMPs to PNGs instead other way around?

User avatar
VilleK
Site Admin
Posts: 2052
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK » Wed Sep 12, 2012 12:27 pm

ZGE has been designed to be as cross-platform as possible. Less dependences on external codec support makes it more portable. I agree Png support would be useful (also mp3) but that makes the platform specific code harder to write for the engine developer (me :) ) and also becomes an additional hurdle when a new platform comes around. As it is now, I was able to make the Android port in very short time.

darkhog
Posts: 58
Joined: Sun Sep 09, 2012 7:59 pm

Post by darkhog » Wed Sep 12, 2012 12:31 pm

http://www.libpng.org/pub/png/libpng.html
^ cross-platform PNG lib.

//edit: Also OGG Vorbis is superior to MP3. Not only you don't have to pay license fees, but also OGG produces better quality sounds with smaller files.

Post Reply