This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Image Formats


Image Formats

Postby Moose or Chuck » Oct 23, 2001 @ 12:08am

Moose or Chuck
 


Re: Image Formats

Postby Digby » Oct 23, 2001 @ 1:15am

Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Re: Image Formats

Postby MirekCz » Oct 23, 2001 @ 9:58am

With best regards,
Mirek Czerwinski
User avatar
MirekCz
pm Member
 
Posts: 269
Joined: Sep 18, 2001 @ 6:42pm
Location: Poland,city Poznań


Re: Image Formats

Postby Digby » Oct 23, 2001 @ 12:09pm

RLE will allow you to use the compressed image, while with other compression formats you'll need to decompress the image into a buffer first.  This means that a game using RLE will have a smaller working set but will probably require a bit more disk space to store the images compared to zip or jpeg.  <br><br>As Mirek said, a lot of this depends on your sprite data.  RLE works great for images that contain spans of the same color, or multiple spans containing the same patterns of pixels.  Your tile sizes are relatively small, so you won't get a tremendous win by using RLE.  It can help quite a bit if alpha blending though.<br><br>
Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Re: Image Formats

Postby Moose or Chuck » Oct 23, 2001 @ 11:27pm

I am not sure that RLE is the way to go.  I tried it on a few sample tiles and the savings really weren't that great. Most bloated due to the adjacent pixels being of a different color.  I could optimize my sprites to work with this but I would really prefer something to work with a universal / generic tile / sprite set.  <br><br>So, as far as the on the fly decompression, that would save the space on the storage side but I am not sure that I have been swayed due to the decompression phase. <br><br>most hand held devices (pocket pc / pspc) have a 16bit color depth?  What would be the benefit of using a 32bit image?  It's not like I am going to be alpha blending that many layers due to the overall speed of these machines. <br><br>what have most of you used for your projects? <br><br>- ketamine
Moose or Chuck
 


Re: Image Formats

Postby Digby » Oct 24, 2001 @ 1:12am

Perhaps I misunderstood your original question.  Do you want to reduce the size of your game on the disk, or do you want to reduce the amount of RAM it takes to run the game?<br><br>My sprites are 16-bpp, but any alpha blending is done at 24-bpp, with a separate 8-bpp alpha mask.<br><br>
Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Re: Image Formats

Postby MirekCz » Oct 24, 2001 @ 7:11am

katamine:if you use "real world images" RLE compression won't bring you anywhere. RLE compression is only good for "cartoon-like" images where you use several colors per image mostly. If you want compress "real world images" (ie scanned pictures) you can get good results with both zip and jpg (you lose quality with jpg thru, but get much better results for images where zip can't find any decent patterns) There are both free zip and jpg libraries to use. The only drawback is that you have to first unpack a jpg/zip into a buffer in mem before using it. So you end up using less disk space and the same mem space (and you have a longer loading time because you need to uncompress images)<br><br>Personally I'm going to use ZIP to compress all my pictures into one/few pack(s), which will be uncompressed during loading time. All tiles in memory will be kept in full 16bpp format without any kind of compression (well actually alpha-blended ones might end up with a kind of RLE compression of alpha channel) all other images will end exactly the same way (ie if it's transparent or has alpha-channel then alpha-channel is compressed with RLE, other pictures stay uncompressed)<br><br>Hope it helps you a bit:)
With best regards,
Mirek Czerwinski
User avatar
MirekCz
pm Member
 
Posts: 269
Joined: Sep 18, 2001 @ 6:42pm
Location: Poland,city Poznań


Return to Phantom's Forum


Sort


Forum Description

Discuss any of Phantom's projects here (Operation Nutcracker, etc.)

Moderators:

sponge, RICoder, Phantom

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron