VGMaps
April 22, 2019, 07:01:04 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Total site PNG optimization status  (Read 5318 times)
0 Members and 1 Guest are viewing this topic.
JonLeung
Administrator
*****
Offline Offline

Posts: 3200


« on: October 02, 2006, 04:45:03 PM »

Since last month, or maybe earlier, I've been recompressing all the .PNGs using PNGGauntlet's "brute force optimization" option, shrinking the images which make up the bulk of the site to reduce bandwidth usage.  As you know, the site has funked out near the end of each month because of bandwidth issues, and though I've asked for an increase from 50 GB to 75 GB, I thought it really couldn't hurt to be able to deliver the same maps, unaltered in visual quality, using less bandwidth on my end and less time loading on your end.



All sections except for the top five sections (NES, Super NES, GB/GBC, GBA, and PC) take up only 10% of the site (based on numbers of maps), so I didn't record the differences in them.  But you might be interested in the size reductions of the major sections.



NES:

83.6 MB to 55.0 MB

-difference of 28.6 MB, or reduction of 34.21%

-biggest change (in bytes, not percentage) in a single map: EarthBound Zero's whole world map, from 7.00 MB to 3.42 MB



PC:

120 MB to 113 MB

-difference of 7 MB, or reduction of 5.83%



GB/GBC:

52.1 MB to 39.8 MB

-difference of 12.3 MB, or reduction of 23.61%

-new sizes not noted on file listing yet



GBA:

92.4 MB to 65.0 MB

-difference of 27.4 MB, or reduction of 29.65%

-new sizes not noted on file listing yet



Super NES

188 MB to 124 MB

-difference of 64 MB, or reduction of 34.04%

-new sizes not noted on file listing yet

-biggest change in a single game I've seen so far: The 7th Saga maps by KingKuros alone took up 36 MB (30.5% of all of the Super NES atlas's size!), but shrunk to 16 MB (a difference of 20 MB, a size comparable to the total change of the other major sections!)



Neat stuff, huh?



Other things:



-greyscale images can actually be visually altered by PNGGauntlet if "preserve gamma information" isn't checked.  Greys can be darkened or lightened, and I didn't want that.  However, they don't seem to be altered if they've already been run through PNGGauntlet once before.  So I did a double pass with the Game Boy maps...once with that option checked, and then a second time with it unchecked.  The second time most images didn't shrink at all, but some still managed to shrink some more.  Overall, though, I'm kind of surprised that they didn't shrink a lot, the maps with colour shrank more.



-unanimated .GIFs on this site have been or will be replaced by .PNGs.  I will have to change all title images which are currently all .GIFs for whatever reason.  The only .GIFs that should remain are the animated ones.



-currently, all maps in the DS section are all less than 1 kB each.  Of course, they're all Mario Kart DS in-game maps as transcribed by osrevad and Revned, but it's still worth noting as having some of the smallest maps.



-I think the smallest map used to be "ResidentEvil(PC)-Laboratory-B2.png" in the PC section.  Now the honour goes to "ResidentEvil-Survivor(PC)-Arcade-1F.png", which compressed better, and is now at 170 B.



-one of the smallest NES maps is an anomaly.  "Bonk'sAdventure-Round4-Area5.png" has less than 16 colours, but PNGGauntlet only reduced it to a 256-colour palette.  (I love PNGGauntlet's ability to reduce images to a palette to only as small as it has to be (except in this case), shrinking many maps to a 16- or 256-colour palette, and some even to 4 colours!)  When using other programs to reduce the palette to 16 colours and using PNGGauntlet on that, the image comes out to being larger than when sticking to a 256-colour palette.  So I left it, but I don't get why.



- >_> don't take this the wrong way, but the most inefficient images (largest before compression) seem to come from KingKuros.  Also, Revned and TerraEsperZ have had some pretty overly large maps.  (If I haven't changed the file listing yet, compare the sizes of their GBC Legend Of Zelda: Oracle maps' listed size and actual size.)  Unless you have trouble sending maps to me, there's really no point to encourage people to use PNGGauntlet 'cause I'm going to do it anyway.  Plus, I hear that some people can't for whatever reason.  To put a more positive spin on it, that means their maps are the most compressible, and based on what I know about colour pattern recognition in .PNGs, it probably means their maps are accurate with everything all lined up.



-despite my love of PNGGauntlet and the incredible amount of space it's saving me, I fear it may not be the most efficient method of saving .PNGs.  When it's unable to compress a .PNG smaller than its original size, it makes a copy of the original.  Which is fine, because then I'm guaranteed that files won't get larger.  Only thing is, what if some maps (like the GBA Banjo-Kazooie maps) are MUCH smaller than PNGGauntlet can attempt to compress them?  There must be some secret to that!  Maps can never be, say, 1 byte each, but it seems like I haven't yet hit the minimum size possible yet.  I want to squeeze every unnecessary byte out of them if I can do it without altering the images!



-first maps compressed: Mega Man III

-last maps compressed: Mega Man X 3

-last maps compressed including April Fools' maps: Mega Man Solid X: Guns Of The Mavericks
Logged
DarkWolf
Hero Member
*****
Offline Offline

Posts: 621



« Reply #1 on: October 02, 2006, 05:03:09 PM »

Using CSS and getting rid of all those nasty font tags and such would reduce some of the HTML bloat.  Although it would probably only reduce the big pages by a few K, it would be a few less K per visitor and you get the added benefit of being able to change the site's style easier.



Anyway, the drop in image size is cool, it means faster loading for us too.
Logged
JonLeung
Administrator
*****
Offline Offline

Posts: 3200


« Reply #2 on: October 02, 2006, 05:10:54 PM »

The HTMLs were originally written in Microsoft Word, as this is my first real web site and I've been learning as I go along.  At some point I switched to Microsoft FrontPage, which comes with an "optimize HTML" function, which is handy, but not before it totally bloated up all of them.  The Super NES index.htm is over 1 MB, and that's the most popular one!  I may have to break them up.  Or I may have to learn some database stuff to be able to efficiently have everything on its own page.  But I'm learning as I go so that may be a while.
Logged
TerraEsperZ
Hero Member
*****
Offline Offline

Posts: 2237



« Reply #3 on: October 02, 2006, 05:32:21 PM »

Well, I can't use PNGGauntlet not for "whatever reason" but because it requires VB.net which requires a legal copy of WinXP which I do not have at the moment. So I'd call it a "couple hundred bucks reason"





---

"With the first link, the chain is forged. The first speech censored, the first thought forbidden, the first freedom denied, chains us all irrevocably." [...] The first time any man's freedom is trodden on, we're all damaged. - Captain Jean-Luc Picard



B*tch, meet reality. Reality, meet b*tch. - Me
Logged

Current project that I really should try to finish:
-Drill Dozer (GBA)
-Sonic 3D Blast (Genesis)
-Naya's Quest (PC)

Pending project:
-A ton of stuff that will never be finished
DarkWolf
Hero Member
*****
Offline Offline

Posts: 621



« Reply #4 on: October 02, 2006, 05:41:04 PM »

I was able to take nes.html from about 808k to 518k just by stripping the font tags.



I'd love to help you build a dynamic site, but soon I'm going to be busy with working on contract work in conjunction with my internship. =/
Logged
JonLeung
Administrator
*****
Offline Offline

Posts: 3200


« Reply #5 on: October 02, 2006, 06:14:15 PM »

Don't worry, I didn't ask.  Tongue



I tried removing the font tags, but eventually they all came back.  I feel I should only have to define the Arial font once, but for whatever reason Microsoft FrontPage seems to like Times New Roman, and I seem to have trouble changing that.  Sometimes I'll insert new text and it comes out as Times New Roman, and so I go Ctrl+A to select everything and change the font to Arial.  But instead of simply having one Arial tag for the whole thing it creates several.  Don't ask me.  Maybe a separate HTML optimizing program would be helpful.
Logged
DarkWolf
Hero Member
*****
Offline Offline

Posts: 621



« Reply #6 on: October 03, 2006, 11:25:38 AM »

<font> is a span element, that's why you can't enclose everything in it and be done with it.  So for each block element (<p>, <h1>, etc) you'll need a <font> tag.  That's why the XHTML and CSS combination is superior.



With CSS you'd just say



body

{

     font-size:10px;

     font-family:"Arial", sans-serif;

}



And that pretty much takes care of it.
Logged
JonLeung
Administrator
*****
Offline Offline

Posts: 3200


« Reply #7 on: October 03, 2006, 03:23:28 PM »

Sorry if I sounded mean, TerraEsperZ, that was never my intent.  :/
Logged
TerraEsperZ
Hero Member
*****
Offline Offline

Posts: 2237



« Reply #8 on: October 03, 2006, 05:04:27 PM »

No problem. I read that in a moment of anger from something else and just read it wrong.



---

"With the first link, the chain is forged. The first speech censored, the first thought forbidden, the first freedom denied, chains us all irrevocably." [...] The first time any man's freedom is trodden on, we're all damaged. - Captain Jean-Luc Picard



B*tch, meet reality. Reality, meet b*tch. - Me
Logged

Current project that I really should try to finish:
-Drill Dozer (GBA)
-Sonic 3D Blast (Genesis)
-Naya's Quest (PC)

Pending project:
-A ton of stuff that will never be finished
JonLeung
Administrator
*****
Offline Offline

Posts: 3200


« Reply #9 on: October 07, 2006, 10:48:33 AM »

I finished uploading the compressed Super NES maps (and edited the first post above if you care).  Phew!  That should be all of them now...
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
VGMaps.com: The Video Game Atlas

 

Pixel WarehouseVGMuseum.com

Your ad could be here - contact me for advertising inquiries.

VGMaps.com is registered with and hosted by

Go Daddy.

Supported by you.

© 2002-2019 Jonathan Leung.

VGMaps.com is an archive of video game maps up since May 6, 2002. Optimized for at least 800 x 600 resolution.

This site does not contain commercial ROMs or any other illegal materials. All directly "ripped" game images are the property of their respective copyright holders.

This web site and compass logo are copyrighted by Jonathan Leung 2002-2019.