Surly
06-29-2006, 10:55 PM
I see a lot of people using stupid compression for their signatures, and it angers me! ANGRY!!!!! If you'd take the time to learn a little bit about compression, you can achieve the dream of making me happy. I know, it seemed impossible... but now it can be yours for the special introductory rate of "Stop being a dumbshit and listen up!" I won't go into any boring historical bullshit about "why it's called a jpeg" just to prove I have done my homework. If you want a fucking history lesson go to school for this shit.
Lets take this signature image as an example-
http://www.anvilsociety.com/sigs/sig_surly.gif
A .gif file as the finished product. 37.51kb, slightly above what I'd consider average, but I'll explain it later.
JPG
You'll notice that a large number of people on these boards use JPEG images. This is good, and in most cases ideal for minimal size. JPEG is a lossy compression method that does perceptual blending as you reduce its quality. Photoshop and other programs can apply a blur during the compression process to reduce the noticability of the blur.
Example:
http://www.anvilsociety.com/test/badjpeg.jpg
Here's what the image looks like with a #333333 background compressed as much as it possibly can be compressed. It doesn't look that bad, though, huh?! The thing about JPG compression is, like any other compression, the amount of colors in it influences what it looks like after compression very heavily! 4.5kb, amazingly tiny! That's great news, but it doesn't look very clean.
Here it is again with what I'd call "ideal" compression:
http://www.anvilsociety.com/test/goodjpeg.jpg
10Kb this time, with a quality of 35 and a slight blur applied during compression. The final product is pretty clean, and I'd settle with it right here and now! Your goal in compressing a JPG for a 150px by 500px image should probably be somewhere around 20-25kb depending on the range of colors you have in it. Obviously, this signature has less color variation and can go even lower (10kb is quite nice!). I can also get away with much larger compression because of this. I used a quality level of 35, wheras more colorful signatures will likely want to stay around 60-65.
Problems with the JPG Format-
JPEG images there have another limitation - no transparency. This isn't an issue at all for signatures that use up their entire rectangular box, but for cases like this you have to apply a faux background to them before compression. This makes the signature useless on any forum that doesn't use a #333333 background.
GIF
The next option for you is the long standing de facto transperancy image format known as GIF! With GIF, you can specify transparent pixels to show the background of the document they are applied to. The problem with a GIF is that it has only 256 possible colors (one of which is used for transparent pixels), and every pixel can have only one color applied to it. .gif images are very popular for images smaller than 100px by 100px because they offer the best quality and size compression at that level (excluding the newer png-8 which is replacing it, but I'll get into that in a second).
Basically, if you want a signature image to be truly transparent, and not "fake transparent" you're going to want to use .gif in most cases. GIF images can be used on any forum regardless of their background colors or textures.
Compressing in GIFs is a simple matter of choosing which colors you want to use. For BEST compression, always use an amount of colors that are powers of 2 (2, 4, 8, 16, 32, 64, 128, or 256).
Lets take a look!
http://www.anvilsociety.com/test/badgif.gif
Here we've reached our previous "good" record of 10kb. You can see, quite obviously, that GIF images are an inferior compression for images of this size. Unless you're really looking for this sort of "effect" its best to use more colors with your gif.
Again, I'll stress, the only reason to use GIF over a JPEG with a background color is for versatility. If you want to use it on many different forums, AND it has transparency effects, THEN consider gif.
You already know what a good .gif looks like, as I posted it as the original, so lets go to PNG.
PNG
This is the portable network graphic, the newest form of compression on the intarwebs. PNG comes in two forms. PNG-8 (directly competitive to gif), and PNG-24 (the lossless compression everyone seems to love so much). PNG-24 is lossless, AND it supports transparency. What is lossless? Lossless means that your original working image will look exactly the same as your compressed product. Tempting, huh? But let me explain why you should NEVER EVER use PNG-24!
PNG-24 is a format designed for sending photographic material and important documents that cannot afford to be compressed in a lossy fashion. Don't be such an arrogant dick to think that your piece of shit signature is so goddamned important that you should force me to download 150kb+ of data just to view the fucking thing. Your signature sucks, stop hogging my fucking bandwidth! GODDAMNIT.
Additionally, PNG-24 is INCOMPATIBLE with most browsers. Firefox is the only browser that supports it. Here, lets look:
http://www.anvilsociety.com/test/bigpng.png
o noes! 110kb just to get the same quality as the original gif i posted. and additionally, if you're using anything but firefox right now you're going to see some shitty grey background around it.
now PNG-24 with no transparency compared to the original gif:
http://www.anvilsociety.com/sigs/sig_surly.gif
http://www.anvilsociety.com/test/biggerpng.png
Ah, now that's a little better. Still 90kb. And it'd be up to 250kb depending on how many colors are in it. Don't force people to download a quarter of a megabyte just to view the piece of shit you vomited out into your fucking photoshop screen. It's crap, and it's annoying. And fuck you for considering it.
For those of you who can't tell, the one on the top is the gif.
The last option for you to consider is PNG-8. It is, again, higher quality than gif, but it isn't visible with the naked eye. For images larger than 50px by 50px, PNG-8 shouldn't even be considered. Example:
http://www.anvilsociety.com/test/crappng.png
This is as close as I can get to 10kb with PNG-8 and still retain some similarity to the original image. PNG-8 is shit for images of this size. Unlike gif, however, PNGs handle color variation much better. If you have an image where you absolutely MUST have super duper quality... well ok, fine, consider PNG-8 if you think your abomination of a sig is worth the quality.
Here it is in 256 colors on PNG-8:
http://www.anvilsociety.com/test/goodpng.png
Very clean, nearly lossless... it's an "ok" compression. You're still a prick for using it because the file size is still too big for virtually (read: you can't SEE the difference) the same quality product, but at least 40kb is tolerable.
It is also possible but unlikely that your sigs may be smaller in PNG-8 than GIF, so it's worth looking at if nothing else. Generally though it's never of use, and png compatibility is an issue with many browsers.
So that does it, quit making over-sized pieces of shit. I have my settings on this forum load up 100 posts per page rather than the standard 10, so after clearing my cache I'm downloading 5mb or more on every fucking page view thanks to people like BENSIDHE =D
Lets take this signature image as an example-
http://www.anvilsociety.com/sigs/sig_surly.gif
A .gif file as the finished product. 37.51kb, slightly above what I'd consider average, but I'll explain it later.
JPG
You'll notice that a large number of people on these boards use JPEG images. This is good, and in most cases ideal for minimal size. JPEG is a lossy compression method that does perceptual blending as you reduce its quality. Photoshop and other programs can apply a blur during the compression process to reduce the noticability of the blur.
Example:
http://www.anvilsociety.com/test/badjpeg.jpg
Here's what the image looks like with a #333333 background compressed as much as it possibly can be compressed. It doesn't look that bad, though, huh?! The thing about JPG compression is, like any other compression, the amount of colors in it influences what it looks like after compression very heavily! 4.5kb, amazingly tiny! That's great news, but it doesn't look very clean.
Here it is again with what I'd call "ideal" compression:
http://www.anvilsociety.com/test/goodjpeg.jpg
10Kb this time, with a quality of 35 and a slight blur applied during compression. The final product is pretty clean, and I'd settle with it right here and now! Your goal in compressing a JPG for a 150px by 500px image should probably be somewhere around 20-25kb depending on the range of colors you have in it. Obviously, this signature has less color variation and can go even lower (10kb is quite nice!). I can also get away with much larger compression because of this. I used a quality level of 35, wheras more colorful signatures will likely want to stay around 60-65.
Problems with the JPG Format-
JPEG images there have another limitation - no transparency. This isn't an issue at all for signatures that use up their entire rectangular box, but for cases like this you have to apply a faux background to them before compression. This makes the signature useless on any forum that doesn't use a #333333 background.
GIF
The next option for you is the long standing de facto transperancy image format known as GIF! With GIF, you can specify transparent pixels to show the background of the document they are applied to. The problem with a GIF is that it has only 256 possible colors (one of which is used for transparent pixels), and every pixel can have only one color applied to it. .gif images are very popular for images smaller than 100px by 100px because they offer the best quality and size compression at that level (excluding the newer png-8 which is replacing it, but I'll get into that in a second).
Basically, if you want a signature image to be truly transparent, and not "fake transparent" you're going to want to use .gif in most cases. GIF images can be used on any forum regardless of their background colors or textures.
Compressing in GIFs is a simple matter of choosing which colors you want to use. For BEST compression, always use an amount of colors that are powers of 2 (2, 4, 8, 16, 32, 64, 128, or 256).
Lets take a look!
http://www.anvilsociety.com/test/badgif.gif
Here we've reached our previous "good" record of 10kb. You can see, quite obviously, that GIF images are an inferior compression for images of this size. Unless you're really looking for this sort of "effect" its best to use more colors with your gif.
Again, I'll stress, the only reason to use GIF over a JPEG with a background color is for versatility. If you want to use it on many different forums, AND it has transparency effects, THEN consider gif.
You already know what a good .gif looks like, as I posted it as the original, so lets go to PNG.
PNG
This is the portable network graphic, the newest form of compression on the intarwebs. PNG comes in two forms. PNG-8 (directly competitive to gif), and PNG-24 (the lossless compression everyone seems to love so much). PNG-24 is lossless, AND it supports transparency. What is lossless? Lossless means that your original working image will look exactly the same as your compressed product. Tempting, huh? But let me explain why you should NEVER EVER use PNG-24!
PNG-24 is a format designed for sending photographic material and important documents that cannot afford to be compressed in a lossy fashion. Don't be such an arrogant dick to think that your piece of shit signature is so goddamned important that you should force me to download 150kb+ of data just to view the fucking thing. Your signature sucks, stop hogging my fucking bandwidth! GODDAMNIT.
Additionally, PNG-24 is INCOMPATIBLE with most browsers. Firefox is the only browser that supports it. Here, lets look:
http://www.anvilsociety.com/test/bigpng.png
o noes! 110kb just to get the same quality as the original gif i posted. and additionally, if you're using anything but firefox right now you're going to see some shitty grey background around it.
now PNG-24 with no transparency compared to the original gif:
http://www.anvilsociety.com/sigs/sig_surly.gif
http://www.anvilsociety.com/test/biggerpng.png
Ah, now that's a little better. Still 90kb. And it'd be up to 250kb depending on how many colors are in it. Don't force people to download a quarter of a megabyte just to view the piece of shit you vomited out into your fucking photoshop screen. It's crap, and it's annoying. And fuck you for considering it.
For those of you who can't tell, the one on the top is the gif.
The last option for you to consider is PNG-8. It is, again, higher quality than gif, but it isn't visible with the naked eye. For images larger than 50px by 50px, PNG-8 shouldn't even be considered. Example:
http://www.anvilsociety.com/test/crappng.png
This is as close as I can get to 10kb with PNG-8 and still retain some similarity to the original image. PNG-8 is shit for images of this size. Unlike gif, however, PNGs handle color variation much better. If you have an image where you absolutely MUST have super duper quality... well ok, fine, consider PNG-8 if you think your abomination of a sig is worth the quality.
Here it is in 256 colors on PNG-8:
http://www.anvilsociety.com/test/goodpng.png
Very clean, nearly lossless... it's an "ok" compression. You're still a prick for using it because the file size is still too big for virtually (read: you can't SEE the difference) the same quality product, but at least 40kb is tolerable.
It is also possible but unlikely that your sigs may be smaller in PNG-8 than GIF, so it's worth looking at if nothing else. Generally though it's never of use, and png compatibility is an issue with many browsers.
So that does it, quit making over-sized pieces of shit. I have my settings on this forum load up 100 posts per page rather than the standard 10, so after clearing my cache I'm downloading 5mb or more on every fucking page view thanks to people like BENSIDHE =D