Doll Optimizing

Sure harddrives and bandwidth both grow in leaps and bounds, but even small files build up after you make 400 of them. There are some things you can do to make sure your dolls are as small as possible.

  1. Convert to PNG format, and use a batch-utility such as PNGCrush to strip the size down. In some cases, PNG may not offer much of an improvement over GIF (and in a few cases, may even be larger), but with the same 256 palette and transparency, I've found that nearly all of my dolls were smaller after these batch jobs were done. (Animations are exempt; there isn't much of a replacement for animated GIFs yet :]). People will whine about PNG transparency not working in Internet Explorer; if you use one-color transparency like GIF does(the only option for 8-bit images anyways), it's fine. If your users use a proper up-to-date browser, it's fine. You may be bothered by people who require GIFs for contests; you might include in your contest e-mail a line asking why they have such an archaic restriction. It's a small subsection of the internet that claims to have trouble with PNGs, and I'm not entirely convinced their complaints are valid. PNG images are everywhere. As far as I know, they don't know what they're talking about. (If you're one of those people, feel free to send me (a polite ;]) e-mail explaining how I'm wrong with screenshots to demonstrate it.

  2. Crop your images. In Photoshop, you can edit the marquee after you lay it down, so it's fairly easy there, and in PSP, you can just make multiple selections around the outside corners and crop it like that. You'll save a few bytes that a way (PROTIP: GIF makes smaller files if you have a lot of the same color going horizontally. PNG will make smaller files if you have the same color going vertically. Test it out. Actually, I already have for you.
    demodemo GIFs: 287b, 182b
    demodemo PNGs: 162b, 167b
    As you can see, the GIF with horizonal stripes is smaller than the one with vertical stripes. If you were to make the stripes 1px wide, the difference would be even greater. This is due to the way GIF stores image information; COMPUSERV designed it to store pixels in horizontal blocks, kinda like "lol make a line that stretches 40 pixels and they're all black, then next to that you have forty more pix, but they're blue". A vertical stripe in GIFs is not actually a vertical stripe, it is a bunch of horizontal ones aligned under each other.

  3. Take an active role in how your color palette is played out. Most image programs allow you to set a slider percentage of "dithering" (or as some exciteable dollers like to refer to it, the "GIF monster") and what kind of color palette you need. If you pixel shade, you probably never have this trouble so long as you tell your program to use 256 colors of the "Optimized Octree" or "Perceptual" or whatever your choice is kind. Toolshaders may be familiar with the loss in quality (unless you use 24-bit png! but then your file size balloons up to about 20kb instead of about 4-8kb, quality over quantity is your call to make). This is where dithering comes into play. Photoshop has a wonderful thing called "Pattern" dithering, which many novice overuse (I am guilty of this myself, but more in the arena of LJ Icons). Rarely will you have so many colors that you will find it necessary to use 100% dithering. Usually somewhere between 40-60% creates a nice balance between color dispersion and the blending effect. Especially on higher resolution monitors and viewers with worse eyesight 8)

Despite the number of people who proclaim its wondrousness, I have never used Iaza, and frankly I'm scared to. Perhaps it's not as bad as I imagine it, but I take comfort in the optimization wizards PSP and Photoshop provide and perhaps Iaza is like that too, but if I try it, I might keep using it! And then I would wither under my own hypocrisy 8)