Autokeen now has PNG support
- Gav
- Blue-haired 'Spot Geek

- Posts: 115
- Joined: Fri Jan 01, 1999 4:00 pm
- Location: Berkeley, CA, USA
- Contact:
Hello all,<P>Just a quick announcement. I've added support for PNG graphics to Autokeen. So you may now use PNG files for comics or for navigation buttons. I cannot be held responsible for any reader whining, of course, that may result. Have a swell day.<P>------------------
Lates...
Darren "Gav" Bleuel
(Traveling)<P>(<A HREF="http://www.nukees.com/" TARGET=_blank>Nukees</A>)
Lates...
Darren "Gav" Bleuel
(Traveling)<P>(<A HREF="http://www.nukees.com/" TARGET=_blank>Nukees</A>)
-
Gravity
- Regular Poster
- Posts: 397
- Joined: Fri Jan 01, 1999 4:00 pm
- Location: Near Pittsburgh, PA
- Contact:
Man, aren't PNG files huge? I tried saving in that format a few times in a compression program and just lauged at how huge the file size was. No good at all. <P>Never heard of Apps not supporting Gifs, and I doubt that will ever happen. If there's any fact to that, let me know though, because I too would like to be prepared...
PNG's are absolutely massive. That's why I have both <a href="http://portsidepng.keenspace.com/">PNG</a> and <a href="http://portside.keenspace.com/">Jpeg</a> versions of my comic.<P>Not supporting Gifs? What would you use for transparent animations?<P>------------------
Time will tell. Sooner or later, time will tell - Albert Einstein, Red Alert.
Don't Panic. - Hitch-Hikers Guide to the Galaxy.
Spam Works(tm) - Overloaded billboard, <A HREF="http://portside.keenspace.com" TARGET=_blank>PortSide</A>
__|__P /_._
. |/ .. . |/
. / . .. / _
A pic from the first violent video game, Axe.
Time will tell. Sooner or later, time will tell - Albert Einstein, Red Alert.
Don't Panic. - Hitch-Hikers Guide to the Galaxy.
Spam Works(tm) - Overloaded billboard, <A HREF="http://portside.keenspace.com" TARGET=_blank>PortSide</A>
__|__P /_._
. |/ .. . |/
. / . .. / _
A pic from the first violent video game, Axe.
-
Bonk
- Regular Poster
- Posts: 90
- Joined: Fri Jan 01, 1999 4:00 pm
- Location: Port Angeles, WA USA
- Contact:
Awesome! That'll be really, really handy when all of the apps quit supporting GIFs. Stupid falling royalty laws...<P>One day, all of my b/w comics will be PNG... it's still no match for JPEG, so as long as their algorithims are Public Domain, I'm still good for Sunday's. <IMG SRC="http://www.keenspace.com/forums/smile.g ... .<P>Thanks, Gav.<P>------------------
Where's the rationale?<P><A HREF="http://rationale.keenspace.com" TARGET=_blank>Right here!</A>
Where's the rationale?<P><A HREF="http://rationale.keenspace.com" TARGET=_blank>Right here!</A>
The story on GIFs is that the makers of the GIF format never intended it to be free. They're big ol' doody-heads and are amking a stink about charging for use of GIFs ... so PNGs were created as an open-source alternative. Not perfect yet, and AFAIK don't to transparencies.<P>I'm not sure how the GIF people intend to enforce this, but a lot of software apparently is considering removing GIFs from the ist of supported file types.<P>------------------
Scott Maddix
<A HREF="http://PDI.keenspace.com" TARGET=_blank>Psychic Dyslexia Institute:</A>
Where we all have <I>special</I> special powers
<B>AND</B>
<A HREF="http://spoon.keenspace.com" TARGET=_blank>Spoon on High</A> featuring<A HREF="http://woofaboomus.ngender.net/music/Gr ... untain.mp3" TARGET=_blank>"Fire on the Mountain"</A>
Scott Maddix
<A HREF="http://PDI.keenspace.com" TARGET=_blank>Psychic Dyslexia Institute:</A>
Where we all have <I>special</I> special powers
<B>AND</B>
<A HREF="http://spoon.keenspace.com" TARGET=_blank>Spoon on High</A> featuring<A HREF="http://woofaboomus.ngender.net/music/Gr ... untain.mp3" TARGET=_blank>"Fire on the Mountain"</A>
- STrRedWolf
- Confuzzled CG Admin

- Posts: 2579
- Joined: Fri Jan 01, 1999 4:00 pm
- Location: undef;
- Contact:
I've tried it myself. It sucks badly. GIMP hands down.<P>------------------
--
WolfSkunk "STriker" RedWolf
Cheif Officer -- <A HREF="http://stalag99.keenspace.com/" TARGET=_blank>Stalag '99</A> -- <A HREF="http://stalag99.keenspace.com/" TARGET=_blank>http://stalag99.keenspace.com/</A>
This signature is Usenet compliant.
--
WolfSkunk "STriker" RedWolf
Cheif Officer -- <A HREF="http://stalag99.keenspace.com/" TARGET=_blank>Stalag '99</A> -- <A HREF="http://stalag99.keenspace.com/" TARGET=_blank>http://stalag99.keenspace.com/</A>
This signature is Usenet compliant.
- STrRedWolf
- Confuzzled CG Admin

- Posts: 2579
- Joined: Fri Jan 01, 1999 4:00 pm
- Location: undef;
- Contact:
Ok, here's the lowdown on PNG's:<P>Unisys owns the patent on the compresson used in GIF (It's called LZW). A few years ago Unisys changed policy and started demanding money for using it.<P>So, turn around, PNG was created. It uses the Internet standard "Deflate" algorithm (the same one used in ZIP or GZ archives). It also has support for transparency, but not for multiple frames (like GIF). But it does compress good if you set the software to really crunch 'em down.<P>However, Netscape and IE don't support transparency in their software. <IMG SRC="http://www.keenspace.com/forums/frown.gif"> Not only that, most major (non-open-source) software won't let you change how much to crunch it (0 being none, 9 being as much as possible). <IMG SRC="http://www.keenspace.com/forums/mad.gif"> GIMP does, and it asks you every time you save a new image.<P>BUT: If you save your work as hirez (300dpi) TIFF's, you'll save alot of space by changing them over to PNG's. TIFF's uses LZW at most (and recently allowed Deflate, but most major software hasn't caught up yet). PNG's use Deflate, and belive me, Deflate beats LZW no matter what you throw into the fight.<P>I'm still wondering what IBM has to say, since it has another patent for the exact same algorithm (LZW). Chalk it up for the Patent Office to keep screwing things up (just like Amazon's one-click patent).<P><P>------------------
--
WolfSkunk "STriker" RedWolf
Cheif Officer -- <A HREF="http://stalag99.keenspace.com/" TARGET=_blank>Stalag '99</A> -- <A HREF="http://stalag99.keenspace.com/" TARGET=_blank>http://stalag99.keenspace.com/</A>
This signature is Usenet compliant.
--
WolfSkunk "STriker" RedWolf
Cheif Officer -- <A HREF="http://stalag99.keenspace.com/" TARGET=_blank>Stalag '99</A> -- <A HREF="http://stalag99.keenspace.com/" TARGET=_blank>http://stalag99.keenspace.com/</A>
This signature is Usenet compliant.
-
Reinder
- Cartoon Hero
- Posts: 1691
- Joined: Fri Jan 01, 1999 4:00 pm
- Location: Groningen, The Netherlands
- Contact:
Just to add to that: I've read somewhere that Photoshop's PNG support is particularly bad.<P>Also, it often helps to pass your image through a gif stage, and then convert that gif to PNG. <P>I'll do some experimenting over the weekend. I know GIMP for Windows can make PNGs nice and small, but not whether they'll actually be smaller than my petite sexy raven-haired gifs.<P>------------------
Reinder Dijkhuis
<A HREF="http://www.rocr.net/" TARGET=_blank>Rogues of Clwyd-Rhan</A>, Humorous fantasy strip, updated Mon-Fri, and really rather good. <A HREF="http://www.rocr.net/d/20000701.html" TARGET=_blank>Read it from the first strip!</A>
Reinder Dijkhuis
<A HREF="http://www.rocr.net/" TARGET=_blank>Rogues of Clwyd-Rhan</A>, Humorous fantasy strip, updated Mon-Fri, and really rather good. <A HREF="http://www.rocr.net/d/20000701.html" TARGET=_blank>Read it from the first strip!</A>
-
Reinder
- Cartoon Hero
- Posts: 1691
- Joined: Fri Jan 01, 1999 4:00 pm
- Location: Groningen, The Netherlands
- Contact:
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by STrRedWolf:
<B>I've tried it myself. It sucks badly. GIMP hands down.<P></B><HR></BLOCKQUOTE><P>
I now have a test up on my message board. The same (small) image in Gif and PNG form. The PNG is smaller by 10%, and most users so far report that both look the same. If they don't, your browser doesn't support transparent PNGs.<P>So far everyone could at the least see the PNG, I'm happy to report. Both images made with GIMP for Windows.<P>See for yourself: <A HREF="http://www.keenspace.com/forums/Forum13 ... 00047.html" TARGET=_blank>http://www.keenspace.com/forums/Forum13 ... 47.html</A> <P>
<P>------------------
Reinder Dijkhuis
<A HREF="http://www.rocr.net/" TARGET=_blank>Rogues of Clwyd-Rhan</A>, Humorous fantasy strip, updated Mon-Fri, and really rather good. <A HREF="http://www.rocr.net/d/20000701.html" TARGET=_blank>Read it from the first strip!</A>
<B>I've tried it myself. It sucks badly. GIMP hands down.<P></B><HR></BLOCKQUOTE><P>
I now have a test up on my message board. The same (small) image in Gif and PNG form. The PNG is smaller by 10%, and most users so far report that both look the same. If they don't, your browser doesn't support transparent PNGs.<P>So far everyone could at the least see the PNG, I'm happy to report. Both images made with GIMP for Windows.<P>See for yourself: <A HREF="http://www.keenspace.com/forums/Forum13 ... 00047.html" TARGET=_blank>http://www.keenspace.com/forums/Forum13 ... 47.html</A> <P>
<P>------------------
Reinder Dijkhuis
<A HREF="http://www.rocr.net/" TARGET=_blank>Rogues of Clwyd-Rhan</A>, Humorous fantasy strip, updated Mon-Fri, and really rather good. <A HREF="http://www.rocr.net/d/20000701.html" TARGET=_blank>Read it from the first strip!</A>
Okay, I already posted this in <A HREF="http://www.keenspot.com/KeenBoard/Forum ... 00399.html" TARGET=_blank>this thread in Keenspot Central</A> (which also has a lot more information). But it'll probably do more good here.<P>The most important difference between JPEGs and PNGs (or GIFs) is that JPEGs use "lossy" compression, while PNGs and GIFs use lossless compression. That means that JPEGs lose part of the information when they're compressed. That's why some JPEGs you see have sort of a "tiled" or "plaid" look...they've been overcompressed and the data loss has become very visible.<P>JPEGs do best with images involving irregular shapes and uneven color (like photographs...JPEG stands for Joint Photographic Experts Group, IIRC). They aren't so great at compressing images with large single-color areas, and the compression "artifacting" tends to show up more in spots like that (meaning that you can't set the compression very high without marring your image).<P>Additionally, Photoshop unfortunately does a really bad job of saving as PNG, doing wonderful things like saving in truecolor even though you only used 16 colors, using the lowest compression setting, etc. This may be the reason why some <P>Some possibly useful references:
<UL TYPE=SQUARE> <LI><A HREF="http://www.libpng.org/pub/png/" TARGET=_blank>The PNG Home Page</A> - just about all the information on PNG available. The spec, applications that support it, history of PNG, etc.
<LI><A HREF="http://www.libpng.org/pub/png/pngapcv.html" TARGET=_blank>PNG-supporting helper apps</A> - This includes a lot of tools for converting to and from PNG, optimising PNGs, turning PNGs into ASCII art (some people have too much time on their hands)...
<LI><A HREF="http://www.tuxedo.org/~esr/gif2png/" TARGET=_blank>gif2png</A> - the official GIF-to-PNG converter.
<LI><A HREF="http://www.nigels.com/exorcist/Exorcist.html" TARGET=_blank>The Exorcist</A> - gif2png with a GUI. Windows-only. Aside from the windows (as opposed to command line) user interface, it's absolutely the same program as gif2png.
<LI><A HREF="http://pmt.sourceforge.net/pngcrush/" TARGET=_blank>pngcrush</A> - a small command-line utility to optimise PNGs as much as possible without data loss. It can also fix buggy PNGs created by Photoshop 5.0 and 5.5.
<LI><A HREF="http://pobox.com/~jason1/imaging/" TARGET=_blank>pngrewrite</A> - a command-line utility to shrink PNGs by reducing bit depths and unnecessarily large palettes. Works well with pngcrush.
<LI><A HREF="http://www.libpng.org/pub/png/apps/pngquant.html" TARGET=_blank>pngquant</A> - another command-line tool. This one quantizes and dithers PNGs (usually 32-bit ones) into 8-bit or smaller ones. Unlike pngcrush and pngrewrite, this will modify the image data, so only use it if the results look good to you.</UL><P>------------------
"Sun Ra? He's out to lunch, all right...same place I eat at!"
- George Clinton
<UL TYPE=SQUARE> <LI><A HREF="http://www.libpng.org/pub/png/" TARGET=_blank>The PNG Home Page</A> - just about all the information on PNG available. The spec, applications that support it, history of PNG, etc.
<LI><A HREF="http://www.libpng.org/pub/png/pngapcv.html" TARGET=_blank>PNG-supporting helper apps</A> - This includes a lot of tools for converting to and from PNG, optimising PNGs, turning PNGs into ASCII art (some people have too much time on their hands)...
<LI><A HREF="http://www.tuxedo.org/~esr/gif2png/" TARGET=_blank>gif2png</A> - the official GIF-to-PNG converter.
<LI><A HREF="http://www.nigels.com/exorcist/Exorcist.html" TARGET=_blank>The Exorcist</A> - gif2png with a GUI. Windows-only. Aside from the windows (as opposed to command line) user interface, it's absolutely the same program as gif2png.
<LI><A HREF="http://pmt.sourceforge.net/pngcrush/" TARGET=_blank>pngcrush</A> - a small command-line utility to optimise PNGs as much as possible without data loss. It can also fix buggy PNGs created by Photoshop 5.0 and 5.5.
<LI><A HREF="http://pobox.com/~jason1/imaging/" TARGET=_blank>pngrewrite</A> - a command-line utility to shrink PNGs by reducing bit depths and unnecessarily large palettes. Works well with pngcrush.
<LI><A HREF="http://www.libpng.org/pub/png/apps/pngquant.html" TARGET=_blank>pngquant</A> - another command-line tool. This one quantizes and dithers PNGs (usually 32-bit ones) into 8-bit or smaller ones. Unlike pngcrush and pngrewrite, this will modify the image data, so only use it if the results look good to you.</UL><P>------------------
"Sun Ra? He's out to lunch, all right...same place I eat at!"
- George Clinton
The other thing worth clarifying is that jpg shows fullcolor images (with lossy compression), gif shows palette images (256 or fewer colors), and png supports both modes (with lossless compression, unlike jpg). If you've saved a picture as png and think it's much larger than saved as gif, it is probably because you saved it as fullcolor instead of palette-ized, so you're comparing apples and oranges. <IMG SRC="http://www.keenspace.com/forums/smile.gif"><P>If you're not wanting a palette-ized version of your image (e.g. because you've got gradients or photos or whatever other reason that it doesn't look good reduced to 256 or fewer colors), then normally jpg would be the way to go rather than png.<P>BTW For those who don't know, the Gimp software gives you very nice fine control over the compression-vs-quality tradeoff when saving a jpg!<P><P>------------------
russ
<A HREF="http://www.kofightclub.com" TARGET=_blank>Ko Fight Club</A>
<A HREF="http://comicollage.keenspace.com" TARGET=_blank>Comicollage</A>
russ
<A HREF="http://www.kofightclub.com" TARGET=_blank>Ko Fight Club</A>
<A HREF="http://comicollage.keenspace.com" TARGET=_blank>Comicollage</A>
-
Reinder
- Cartoon Hero
- Posts: 1691
- Joined: Fri Jan 01, 1999 4:00 pm
- Location: Groningen, The Netherlands
- Contact:
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Seven3:
<B>If you paint program can count the number of unique colours, and lets you save at a reduced pallete, you may be better off with GIFs.<P></B><HR></BLOCKQUOTE><P>So far, this has not been the case for me. And I think the reason for that is this:<P>If you have reduced the number of colors in your graphical program, then the number of unique colors that appear in your saved file will be the same no matter how much palette space you have, and the number of identically-colored pixels that are affected by the compression algorithm will be the same. Because 'deflate' compresses better than LZW, you will still get all the savings from that, and only a minor loss due to palette overhead.
<B>If you paint program can count the number of unique colours, and lets you save at a reduced pallete, you may be better off with GIFs.<P></B><HR></BLOCKQUOTE><P>So far, this has not been the case for me. And I think the reason for that is this:<P>If you have reduced the number of colors in your graphical program, then the number of unique colors that appear in your saved file will be the same no matter how much palette space you have, and the number of identically-colored pixels that are affected by the compression algorithm will be the same. Because 'deflate' compresses better than LZW, you will still get all the savings from that, and only a minor loss due to palette overhead.
However I should point out that while 8-bit (256 colour) PNG's are smaller than an 8-bit GIF, it is possible to reduce a GIF pallete down to 128, 64, 32, 16, 8, 4, or even 2 colours (7, 6, 5, 4, 3, 2, and 1 bits respectively), which can make it smaller than a PNG which only has 256 and 16777216 (24-bit) colour options.<P>If you paint program can count the number of unique colours, and lets you save at a reduced pallete, you may be better off with GIFs.<P>------------------
Time will tell. Sooner or later, time will tell - Albert Einstein, Red Alert.
Don't Panic. - Hitch-Hikers Guide to the Galaxy.
Spam Works(tm) - Overloaded billboard, <A HREF="http://portside.keenspace.com" TARGET=_blank>PortSide</A>
__|__P /_._
. |/ .. . |/
. / . .. / _
A pic from the first violent video game, Axe. <IMG SRC="http://www.keenspace.com/forums/smile.gif"><p>[This message has been edited by Seven3 (edited 03-27-2001).]
Time will tell. Sooner or later, time will tell - Albert Einstein, Red Alert.
Don't Panic. - Hitch-Hikers Guide to the Galaxy.
Spam Works(tm) - Overloaded billboard, <A HREF="http://portside.keenspace.com" TARGET=_blank>PortSide</A>
__|__P /_._
. |/ .. . |/
. / . .. / _
A pic from the first violent video game, Axe. <IMG SRC="http://www.keenspace.com/forums/smile.gif"><p>[This message has been edited by Seven3 (edited 03-27-2001).]
More PNG info. The first two items are informational documents geared towards users (steering clear of technical jargon for the most part). I suggest that anyone at all curious about PNGs read them. The third is a conversion tool that may be useful.
<UL TYPE=SQUARE>
<LI><A HREF="http://www.libpng.org/pub/png/pngfaq.html" TARGET=_blank>The PNG FAQ</A> - answers to questions like "Why do you say PNGs are smaller than GIFs? Mine are all bigger!" and "How do I make transparent PNGs?"
<LI><A HREF="http://www.libpng.org/pub/png/pngintro.html" TARGET=_blank>Intro to PNG features</A> - compression, alpha transparency, making images look the same on all systems with gamma, etc.
<LI><A HREF="http://www.libpng.org/pub/png/apps/tiff2png.html" TARGET=_blank>tiff2png</A> - the official TIFF-to-PNG converter.
</UL><P>------------------
"Sun Ra? He's out to lunch, all right...same place I eat at!"
- George Clinton
<UL TYPE=SQUARE>
<LI><A HREF="http://www.libpng.org/pub/png/pngfaq.html" TARGET=_blank>The PNG FAQ</A> - answers to questions like "Why do you say PNGs are smaller than GIFs? Mine are all bigger!" and "How do I make transparent PNGs?"
<LI><A HREF="http://www.libpng.org/pub/png/pngintro.html" TARGET=_blank>Intro to PNG features</A> - compression, alpha transparency, making images look the same on all systems with gamma, etc.
<LI><A HREF="http://www.libpng.org/pub/png/apps/tiff2png.html" TARGET=_blank>tiff2png</A> - the official TIFF-to-PNG converter.
</UL><P>------------------
"Sun Ra? He's out to lunch, all right...same place I eat at!"
- George Clinton
-
Matt Wilson
- Regular Poster
- Posts: 161
- Joined: Fri Jan 01, 1999 4:00 pm
- Contact:
If Gav says PNGs work, how come they don't?<P>Or is this some Keenspot-only frill?<P>I put a PNG in the comics dir just like I would any other gif comic, and while the HTML updated, the comic did not. This has happened every time in the past forever, due to PNGs not being supported before, but now that PNGs are supported now, I'd like to see this support.
-
Reinder
- Cartoon Hero
- Posts: 1691
- Joined: Fri Jan 01, 1999 4:00 pm
- Location: Groningen, The Netherlands
- Contact:
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Matt Wilson:
<B>If Gav says PNGs work, how come they don't?
</B><HR></BLOCKQUOTE><P>
It's worked fine for me all week.
<P>------------------
Reinder Dijkhuis
<A HREF="http://www.rocr.net/" TARGET=_blank>Rogues of Clwyd-Rhan</A>, Humorous fantasy strip, updated Mon-Fri, and really rather good. <A HREF="http://www.rocr.net/d/20000701.html" TARGET=_blank>Read it from the first strip!</A>
<B>If Gav says PNGs work, how come they don't?
</B><HR></BLOCKQUOTE><P>
It's worked fine for me all week.
<P>------------------
Reinder Dijkhuis
<A HREF="http://www.rocr.net/" TARGET=_blank>Rogues of Clwyd-Rhan</A>, Humorous fantasy strip, updated Mon-Fri, and really rather good. <A HREF="http://www.rocr.net/d/20000701.html" TARGET=_blank>Read it from the first strip!</A>
-
Matt Wilson
- Regular Poster
- Posts: 161
- Joined: Fri Jan 01, 1999 4:00 pm
- Contact:
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Seven3:
<B>However I should point out that while 8-bit (256 colour) PNG's are smaller than an 8-bit GIF, it is possible to reduce a GIF pallete down to 128, 64, 32, 16, 8, 4, or even 2 colours (7, 6, 5, 4, 3, 2, and 1 bits respectively), which can make it smaller than a PNG which only has 256 and 16777216 (24-bit) colour options.<P>If you paint program can count the number of unique colours, and lets you save at a reduced pallete, you may be better off with GIFs.
</B><HR></BLOCKQUOTE><P>This is not quite accurate, I'm afraid, because it confuses two different issues: The number of colors a palette can choose, and the precision of the colors that it can choose from.<P>GIF images can have a palette as small as 2 (2^1) colors or as large as 256 (2^8); PNGs in "palette" mode can have between 1 and 256. This is the total number of colors you can have, in any one GIF or any one palette-mode PNG. Part of the image data will be a table something like this:
<OL TYPE=1>
<LI> <I>deep blue</I>
<LI> <I>slightly less deep blue</I>
<LI> <I>solid black</I>
<LI> <I>midway between black and red</I>
</OL>
(except, of course, that it uses numbers to specify the colors precisely, not word descriptions like the above.) Then, when it comes time to store each pixel, it doesn't store the color; it stores the number that color possesses in the table.<P>Now, as mentioned before, PNG and GIF have nearly identical upper and lower limits on how many entries they can have in this table. The difference is how many colors you can <B>choose from</B> in creating the table. With GIF, you have exactly one option, and that is to specify the color in three bytes: one byte for the red, one byte for the green, one byte for the blue. So you have 2^24 (that's 16777216) colors from which to choose a palette of up to 256.<P>PNG, on the other hand, gives you more options. You can either use an 8-bit "sample depth", the same as GIF is restricted to, or if you choose to, you can use 16-bit samples -- so that instead of 8 bits for each of red, green and blue, for 16777216 possibilities, you can use 16 bits for each sample -- meaning you can select your palette from out of (2.8147497671e+14) possible colors.<P>That's assuming, of course, you need separate samples for red, blue and green; if your images are grayscale (as of course many Keenspot images are) you can use "grayscale" mode, and then each grayscale in the table only takes 8 or 16 bits to define. Compare this to GIF, where you pay 24 bits to define each entry in the table even if red is equal to green is equal to blue for every color in your palette. (PNG also gives you the option of specifying samples in an "alpha channel" to denote the transparency of each pixel, but this is something that browsers don't support well yet in general.)<P><B>Also...</B><P>On the issue of PNG performance, the story most often heard is "I tried saving an image as a PNG and it was obscenely huge, therefore the format can't really be that good." I wish I had a dime for every time I've heard this. =( The fact is that the palette mode I've described above only describes <B>two of three modes</B> that PNG supports. Indexed-color is the mode most directly comparable to GIF, and grayscale works on the same principle... However, suppose you just can't get an image faithful to your original with just 256 colors, no matter how well chosen? GIF handles this situation by dithering: trying to simulate a color it <B>doesn't</B> have with patterns made up of the colors it <B>does</B> have. Obviously there are situations where this just isn't enough, and for these situations, PNG has a third mode called "truecolor". This time, instead of storing the color of a pixel with the number of that color in a table, the actual colors -- the same numerical representation that would go into the table -- goes into the data itself. Now, deflate compression is very good (better than LZW in nearly every circumstance, as STrRedWolf points out) and there are plenty of tricks that PNG can use to make the data even easier to compress for common image elements like gradients and areas of flat color. But still, you'll most likely pay a price in size for the power to store an image which can use potentially every one of the 2.8147497671e+14 colors it can define.<P>Lots of image programs out there are aimed at people who don't really know much about computers and don't want to learn. The manufacturers of such programs of such programs, therefore, often say, "well, the PNG format gives them so many options, but all those options are only going to confuse them! Let's just pick one option, the one that most people are going to want most often, and then the clever people who know there's something better are the ones who can diddle around in the options to get it." Well, think about that "one that most people are going to want most often". If you told people that they could choose between getting faithful images, and getting small images, and that whichever they picked, they'd be stuck with forever, which do you think they'd pick? You're right... most people would pick the faithful images and live with the fact that they'd be larger.
<B>However I should point out that while 8-bit (256 colour) PNG's are smaller than an 8-bit GIF, it is possible to reduce a GIF pallete down to 128, 64, 32, 16, 8, 4, or even 2 colours (7, 6, 5, 4, 3, 2, and 1 bits respectively), which can make it smaller than a PNG which only has 256 and 16777216 (24-bit) colour options.<P>If you paint program can count the number of unique colours, and lets you save at a reduced pallete, you may be better off with GIFs.
</B><HR></BLOCKQUOTE><P>This is not quite accurate, I'm afraid, because it confuses two different issues: The number of colors a palette can choose, and the precision of the colors that it can choose from.<P>GIF images can have a palette as small as 2 (2^1) colors or as large as 256 (2^8); PNGs in "palette" mode can have between 1 and 256. This is the total number of colors you can have, in any one GIF or any one palette-mode PNG. Part of the image data will be a table something like this:
<OL TYPE=1>
<LI> <I>deep blue</I>
<LI> <I>slightly less deep blue</I>
<LI> <I>solid black</I>
<LI> <I>midway between black and red</I>
</OL>
(except, of course, that it uses numbers to specify the colors precisely, not word descriptions like the above.) Then, when it comes time to store each pixel, it doesn't store the color; it stores the number that color possesses in the table.<P>Now, as mentioned before, PNG and GIF have nearly identical upper and lower limits on how many entries they can have in this table. The difference is how many colors you can <B>choose from</B> in creating the table. With GIF, you have exactly one option, and that is to specify the color in three bytes: one byte for the red, one byte for the green, one byte for the blue. So you have 2^24 (that's 16777216) colors from which to choose a palette of up to 256.<P>PNG, on the other hand, gives you more options. You can either use an 8-bit "sample depth", the same as GIF is restricted to, or if you choose to, you can use 16-bit samples -- so that instead of 8 bits for each of red, green and blue, for 16777216 possibilities, you can use 16 bits for each sample -- meaning you can select your palette from out of (2.8147497671e+14) possible colors.<P>That's assuming, of course, you need separate samples for red, blue and green; if your images are grayscale (as of course many Keenspot images are) you can use "grayscale" mode, and then each grayscale in the table only takes 8 or 16 bits to define. Compare this to GIF, where you pay 24 bits to define each entry in the table even if red is equal to green is equal to blue for every color in your palette. (PNG also gives you the option of specifying samples in an "alpha channel" to denote the transparency of each pixel, but this is something that browsers don't support well yet in general.)<P><B>Also...</B><P>On the issue of PNG performance, the story most often heard is "I tried saving an image as a PNG and it was obscenely huge, therefore the format can't really be that good." I wish I had a dime for every time I've heard this. =( The fact is that the palette mode I've described above only describes <B>two of three modes</B> that PNG supports. Indexed-color is the mode most directly comparable to GIF, and grayscale works on the same principle... However, suppose you just can't get an image faithful to your original with just 256 colors, no matter how well chosen? GIF handles this situation by dithering: trying to simulate a color it <B>doesn't</B> have with patterns made up of the colors it <B>does</B> have. Obviously there are situations where this just isn't enough, and for these situations, PNG has a third mode called "truecolor". This time, instead of storing the color of a pixel with the number of that color in a table, the actual colors -- the same numerical representation that would go into the table -- goes into the data itself. Now, deflate compression is very good (better than LZW in nearly every circumstance, as STrRedWolf points out) and there are plenty of tricks that PNG can use to make the data even easier to compress for common image elements like gradients and areas of flat color. But still, you'll most likely pay a price in size for the power to store an image which can use potentially every one of the 2.8147497671e+14 colors it can define.<P>Lots of image programs out there are aimed at people who don't really know much about computers and don't want to learn. The manufacturers of such programs of such programs, therefore, often say, "well, the PNG format gives them so many options, but all those options are only going to confuse them! Let's just pick one option, the one that most people are going to want most often, and then the clever people who know there's something better are the ones who can diddle around in the options to get it." Well, think about that "one that most people are going to want most often". If you told people that they could choose between getting faithful images, and getting small images, and that whichever they picked, they'd be stuck with forever, which do you think they'd pick? You're right... most people would pick the faithful images and live with the fact that they'd be larger.