Reducing the size of .bmp files used by Shareaza

Discuss Shareaza development as a user.
Forum rules
Home | Wiki | Rules

Reducing the size of .bmp files used by Shareaza

Postby zigozag » 18 Aug 2009 23:24

Hi guys,

There are many bitmap images that come with Shareaza, especially for skins. None of these images are compressed, although for 4 bit and 16 bit indexed images it's possible to enable RLE compression. AFAIK since Windows XP all Windows versions provide native support for this compression so as long as Shareaza relies on the OS to deal with these images, this compression should be entirely transparent. Since Win 9x support was dropped, what about taking advantage of this?

So I tested with a few ShareazaOS images in C:\Program Files\Shareaza\Skins\ShareazaOS and everything seemed to work fine... under Wine. Then I grabbed the zip archive containing the source code of Shareaza 2.4.0.0 and looked for all .bmp images (dir /s *.bmp), and compressed those that were indexed (see the attachment). It's tedious because in some cases RLE compression actually increases the file size, so it's can't be easily automatized. But hey, I have time to lose...
There's also another catch: zip compresses better an image that is not already RLE compressed, so the archive's size increases slightly (~100 Kb) but this could help to reduce the disk space occupied by Shareaza when it's installed.
To give a rough idea, the result is that when extracted, the original source code's size is 50 Mb, with compressed bmp images it was reduced to 48 Mb. Interestingly, I think some other, currently RGB images could be compressed if they were indexed. For instance Skins\ShareazaOS\sos_navbar_hr.bmp Skins\ShareazaOS\sos_navbar_kr.bmp that were probably left as RGB inadvertently, or the Green Moon, NucleoX and Arcadia's Call skins (some of these skins do not appear in the executable, no idea why they are in the source archive).

So if the idea is interesting, if someone could explain me the difference between RGB and indexed in Shareaza (is it only for aesthetics wrt the colour palette?), and if additional images could indeed be indexed, like I said, I have time to lose.
Attachments
razabmp.7z
Compressed images from raza 2.4's source zip archive. Directory structure preserved.
(1.66 MiB) Downloaded 111 times
zigozag
 
Posts: 134
Joined: 17 Jun 2009 22:11

Re: Reducing the size of .bmp files used by Shareaza

Postby kevogod » 19 Aug 2009 00:07

Is this really necessary? I think in some spots, BMP is used just because Shareaza does not support PNG in those areas (although it may now).

I do not think anyone is concerned about how much space Shareaza takes up. This is 2009. I would be more concerned at how large the installer is and even then it is not that large.
kevogod
 
Posts: 278
Joined: 13 Jun 2009 16:13

Re: Reducing the size of .bmp files used by Shareaza

Postby cyko_01 » 19 Aug 2009 00:21

IMHO time would be better spent fully supporting PNGs and transparency
User avatar
cyko_01
 
Posts: 938
Joined: 13 Jun 2009 15:51

Re: Reducing the size of .bmp files used by Shareaza

Postby zigozag » 19 Aug 2009 00:58

This is certainly not necessary, but maybe it could be a (very) minor improvement. If I could help for the support of PNG and transparency of course I would spent my time on it, but this bmp stuff is all I'm able to do, and you're not going to have to spend your time on it except for taking a look at the changes and uploading modified images. So, if the idea is interesting, all you need to say is "yes" (and provide a little explanation to the question in my first post). The change is almost insignificant, as is the time you need to spend on it. If you think it's not worth say 10 minutes of taking a look at it, I can very well understand that and lose my time on something else.
zigozag
 
Posts: 134
Joined: 17 Jun 2009 22:11

Re: Reducing the size of .bmp files used by Shareaza

Postby old_death » 19 Aug 2009 02:08

Cyko, that's true, but if he has already done the work, why not use it? Any little effort makes Shareaza better, and if this reduces the size of the installer/source, why not use it...? It doesn't cost us anything, does it?
User avatar
old_death
 
Posts: 1950
Joined: 13 Jun 2009 16:19

Re: Reducing the size of .bmp files used by Shareaza

Postby ocexyz » 20 Aug 2009 18:48

User avatar
ocexyz
 
Posts: 624
Joined: 15 Jun 2009 13:09

Re: Reducing the size of .bmp files used by Shareaza

Postby zigozag » 20 Aug 2009 21:06

There would be compatibility issues for Win9x users if Shareaza 2.5.0.0 was to be compatible with this OS family.
zigozag
 
Posts: 134
Joined: 17 Jun 2009 22:11

Re: Reducing the size of .bmp files used by Shareaza

Postby cyko_01 » 20 Aug 2009 23:00

User avatar
cyko_01
 
Posts: 938
Joined: 13 Jun 2009 15:51


Return to Bugs, Tasks, and Features Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron