Slashdot Mirror


What Is The Future of PNG?

miladus writes "The GIF patent (held by Unisys) will expire on June 20. C|Net wonders whether that will also mean that PNG "will lose its original reason for being". Remember Burn All GIFs? " My hope would be that at this point PNG can stand on its own technical merits, rather then on ideological merits.

20 of 609 comments (clear)

  1. PNGs by Gortbusters.org · · Score: 5, Insightful

    Unfortunately even half my coworkers don't know what a PNG is. I try to send them a UML diagram made from DIA and they demand a readable format :(

    --
    --------
    Free your mind.
    1. Re:PNGs by Anonymous Coward · · Score: 5, Interesting

      Out of interest, what the hell sort of software are your idiot coworkers using if they can't load a simple PNG? I can't understand this; every time someone mentions PNG, people always complain that they nobody has heard of it and no application can handle it. What? I use PNG for everything I do. I've never had a problem saving or loading it, unless for some bizare reason I'm using ancient Windows applications that can only handle BMP, TIFF and PCX of all things. I really don't get it!

  2. GIF and PNG are completely different! by flend · · Score: 5, Informative

    GIFs are limited to 8-bit colour depth, no alpha layer etc. etc. PNG is a standardised, open format with support for lossless encoding of full colour graphics with transparencies.

    Saying that GIF becoming patent unencumbered is going to reduce use of PNG is like implying that when the original patents ran out on horses & carriages people gave up their cars and reverted. Ain't gonna happen :)

    1. Re:GIF and PNG are completely different! by scrawny · · Score: 5, Informative

      The mistaken belief that GIF has a limit of 256 colors probably comes from the way GIF was first used when it came out. In the late 1980's, PC video cards generally supported no more than 256 colors. Image exchanges were becoming popular among BBS systems and the Internet and viewer programs were quickly produced. No one tried or needed to generate images with more than 256 colors since they could not be viewed on anything less than high priced graphics workstations. Programs that converted images to GIF worked up a number of methods to reduce the number of colors to 256 or fewer. Some actually did a very good job. GIF files were constructed with just a single image block, even though the GIF standard placed no limit on the number of blocks. Since there was no use for more than 256 colors, there was no use for more than one image block. This practice became effectively ingrained into the computer culture and eventually everyone "knew" that GIF supported no more than 256 colors. The fact is, the programs that generated GIF files supported no more than one image block, and thus didn't have a means to deal with more than 256 colors. The top image shows that a GIF file really can have more than 256 colors.

      this info and more (including full color GIF) from here.

  3. Its already moribund by Lysander+Luddite · · Score: 5, Insightful

    Until IE fully supports the format, it might as well be dead. Nobody who wants the Alpha Channel support can use it in IE6 so it pretty much just sits there, an unused option.

    Since IE apparently won't be getting an update until the next version of Windows, I don't see much changing.

    It also doesn't help that creating PNGs with Alpha Channels isn't as easy as it can be in some apps.

    1. Re:Its already moribund by barcodez · · Score: 5, Informative

      Apple's Quicktime can become the default plug in for PNGs and display them instead of IE within IE. Therefore full advantage can be made of Alpha channels. Obviously not everyone has QuickTime installed.

      --

      ----
  4. Wrong! by brennanw · · Score: 5, Informative

    If you're getting larger file sizes with PNG, then you're using a program that creates PNG poorly.

    When I converted all the graphics on my site over from GIF to PNG, I saved bandwidth. If I did my comic in GIF instead of PNG, the graphics would be much larger than they are now.

    use pngcrush or some other kind of tool to optimize them if your stuck using an older version of Photoshop (some versions of photoshop have lousy PNG support) or get some shareware or free software program that supports PNG properly.

    JPEGS will still be better for 24 bit color images, but with the right program PNGs will beat out GIFs.

    --
    Eviscerati.Org: All Hail the Eviscerati
    1. Re:Wrong! by rknop · · Score: 5, Informative

      All 3 of the graphics programs I use routinely creat PNG's that are larger than gif's, now this may not be a problem with the format persee, but it is a problem with the real world implementations that are out there and are being used.

      You should consider another possibility: you don't know what you're doing.

      Do you know the difference between a 24-bit true color and an 8-bit palette image? (This is not an insult or rhetorical question, it's a real question-- you may.) Many image processors and paint programs work naturally in 24-bits. If you save to PNG, they will then naturally save those images in 24-bit format. To save to GIF, though, they must first be converted to 8-bit palette format. With (for example) the Gimp, you have to do this explicitly, so you'll know you're doing it. However, it's possible that some paint programs may do it automatically, without telling you it's been done. This will make for smaller files, but information has been lost. When you read it back in, you will only have 246 different colors in the image, regardless of how many where there originally. If you read the PNG back in, the image will be exactly as you saved it. (Unless you had all sorts of complicated layers, in which case you need an even heavier file format.)

      PNG can save images in 8-bit format, in which case a good implementation will give you an image about the same size or a bit smaller than a GIF image. But they don't have to. GIF images have to be saved that way. Naturally, saving an image in 24-bit format will create a larger file than saving one in 8-bit format. (And, it may be different by more than a factor of 3, for reasons having to do with the compression algorithm.)

      Before comparing the merits of image formats looking just at the file sizes saved, you have to make sure you understand what is being saved.

      JPG is a whole 'nuther ball of wax. That's a 24-bit image format, but it's lossy. That's why they can be so small. But, again, if you read the image back in, it won't be exactly the same; some colors will have been modified slightly. (How much depends on the quality setting you used when saving the JPEG image.) If you're expecting to read and write an image repeatedly, JPEG is a bad format to use, as each time you read and write it, more information gets lost. In that case, you're much better off using PNG images.

      -Rob

  5. A minor 'hack' get's fuPNG to work in IE though... by Anonymous Coward · · Score: 5, Informative

    I have an include file tricking the transparancy into working here , but this geezer has done it a more elegant way...

    Until IE gets a major update it's the only way to ensure that your PNG stuff works cross-browser. And with PNG's superior colour depth and transpancy there really is no reason to NOT at least toy with using PNG's a little any more...

  6. Except, of course... by Gordonjcp · · Score: 5, Informative

    MNG files, which are animated PNGs.

  7. Re:here's hoping. by SirPrize · · Score: 5, Interesting

    I was wondering about this just two or three weeks ago, and tested with Mozilla and IE 6. Both of them can display PNG files, but it's only Mozilla that could render the 256-level alpha channel properly. Made for some very neat effects. IE didn't manage the transparency at all. :-(

  8. Part of why PNG hasn't been a big hit by jht · · Score: 5, Insightful

    GIF and JPG each do something quite well. GIF is well-suited for the rendering of static elements with a relatively small palette, like webpage design elements. It doesn't support photo-realistic images, but that's OK - a GIF can make a very small, efficient file that can load quickly. And it's been supported since the earliest days of the Internet.

    JPG compliments GIF by providing a way to display high-quality photo images, and you can control the size of the rendered file by deciding how much you're willing to discard. Again, it's supported by every editor and browser, and it's been around since the beginnning.

    PNG is a superior format to GIF from a technical perspective, and it's not encumbered by the LZW patent. However, from the perspective of most mainstream users, it doesn't solve a problem that actually affects them (they don't know or care about the Unisys patent issue), it isn't perfectly supported by all mainstream browsers and servers in use today, and it's a johnnie-come-lately to the standards wars.

    Like it or not (I think it kinda sucks), most web developers seem to do things one of three ways: if they need small static elements they use GIF, for photos they use JPG, and if they need fancy-schmancy stuff they use Flash. And nobody worries whether or not platforms other than Windows with the latest IE can render their site, anyway. So maybe PNG will slowly become more common - it is a better format for the most part than GIF is, and pretty much all current browsers and servers (going forward - not some of the older versions that are still in use) support it pretty well out of the box. Really, what matters most is the bottom line (especially once the LZW patent is dead) - can PNG produce a better browsing experience for a site's users? If it can, it'll get used. If not, then it's dead.

    --
    -- Josh Turiel
    "2. Do not eat iPod Shuffle."
  9. It's all about consumers. by Vandil+X · · Score: 5, Interesting

    Back in the day, JPGs were known for better compression, but with graphical loss. GIFs were known for preserving appearance, but with less compression than JPG.

    Then PNG comes in...
    - Open Source/Open Standard: cool
    - Lots of options of graphic artists: cool
    - even less compression: suckage, but whatever, people who really care about their net experience these days have broadband

    PNG may be superior, but it suffers from being obscure and being too technically oriented. I remember when Animated GIFs were tough to create without a "wizard". I seriously doubt your average consumer will care about the added layers and alpha "stuff" that's supported by the PNG format.

    Kind of like how Firebird may be technically superior to, say, Internet Explorer, but very few people know of Firebird, and few among those who do know about it would know how to use all its features. IE just "works" for them.

    PNG rocks, but until the likes of many Photo CD "developing" companies and other consumer-oriented image business start using the PNG format, people will still only know a world of GIFs, JPGs, and BMPs.

    --
    Up, Up, Down, Down, Left, Right, Left, Right, B, A, START
  10. ought to be enough by gylle · · Score: 5, Funny

    One bit, that ought to be enough for anybody... :-)

  11. PNGs will always be larger than GIFs... by J_DarkElf · · Score: 5, Informative

    ... if saved as truecolour images. What really killed PNG, imnsho, was that the first graphics programs that implemented it simply did not allow users to create indexed PNG files. An 8-bit PNG image is smaller than an 8-bit GIF.

    What many people also seem to forget, is that there is no excuse not to safe your PNG image with maximum compression once you are done editing: there will be no image quality loss.

    And of course anyone seriously creating PNG images cannot do without PNGCrush, which can shave off every single bit of bloat. A crushed PNG image will look just as good as the original, but will be only a fraction of its size, and will be a lot smaller than a GIF would (1).

    1: But not smaller than the JPEG. Lossless compression cannot compete with JPEG's lossy compression, and JPEG is still the format of choice for photographic images. For everything else you can and should use PNG.

  12. Re:not yet... by archen · · Score: 5, Insightful

    That's only sort of correct. A gif can ONLY do transparency. A PNG allows up to 254 levels of partial transparency per channel, and can have multiple channels.

    You want to know what REALLY held PNG back? It was Internet Explorer that STILL doesn't do the transparency right. More eople would start using the format right now if the implementation could do what the spec specifies. You see people all the time finding clever ways to make an image look like it blends into the background - which can be a pain in the ass to line up correctly. Imagine if the images could actually do partial transparency... that would make things easier woudn't it? Oh well, it's still a good lossless algorithm to cart images around with - I use it all the time for personal use and on my website.

  13. Damn Microsoft anyway. by Millennium · · Score: 5, Insightful

    I wonder if Microsoft's halfhearted support of PNG is deliberate. To be honest, it probably is, in an attempt to undermine open standards.

    Ahem. Anyway, PNG is a format which would be superior to GIF in every aspect. Just a few problems...

    1) Photoshop's PNG support sucks. It is entirely due to Photoshop that we have this insipid misconception that PNG is larger than GIF; if Photoshop would only compress PNG's decently, people would realize that this is false. Because unfortunately, most people are too lazy to use an optimizer along the lines of pngcrush.

    2) IE/Windows' PNG support is awful. As I said, I believe that this is deliberate on Microsoft's part, given that they already have good PNG-handling code (in their AlphaImageLoader filter) and they simply refuse to use it as their default. Now, it is possible to use JavaScript -the scourge of the Net normally, but this is one of those points where it can be genuinely useful- to make IE apply the AlphaImageLoader filter to PNG images, but no one's managed to make a complete drop-in replacement that will apply to all PNG images im a page yet. It can be done, but it hasn't been done yet.

    3) MNG support is nonexistent. Even Mozilla, the only browser which ever supported MNG, has removed it. This is a great shame.

    Now, in the meantime, there actually is one use for images which PNG is ideally suited for, and where the transparency problems of IE/Win are not an issue: screenshots. The compression is good enough that particularly when dealing with computer-generated images, the file size isn't that much greater than JPEG, but there is no loss in image quality, which is especially important when grabbing screenshots of games or video. Screenshots are not transparent, as a rule, so IE/Windows has no problems. Unfortunately, it seems that this use of PNG has yet to be discovered by the mainstream.

    PNG may also be good for certain types of wallpapeers, such as most computer-generated graphics or hand-drawn animation. Colors in these generally aren't as complex as they are in photographs, and the lossless compression of PNG works well under those conditions. Combine this with the fact that JPEG (the current de facto standard for wallpapers) has an inexplicable and yet undeniable hatred for the color red, and you have something which can better preserve these types of images. Worth considering, anyway.

  14. Slashdot by Mr_Silver · · Score: 5, Interesting
    Maybe the answer to whether it will fail or not lies in possibly the largest geek site on the web?

    wget http://www.slashdot.org
    14:12:33 (30.08 KB/s) - `index.html' saved [39023]
    grep -i "\.png" index.html | wc -l
    0
    grep -i "\.gif" index.html | wc -l
    32

    Food for thought.

    --
    Avantslash - View Slashdot cleanly on your mobile phone.
  15. Re:problems with PNG by Fweeky · · Score: 5, Informative
    large file size- much larger than gif or jpg

    Not really. Some encoders are pretty poor, but an 8 bit PNG can easily rival, if not beat it's gif counterpart.

    Let's pick a quick example:
    -rw-r--r-- 1 freaky None 27382 Jun 9 10:12 states_imgmap.gif
    -rw-r--r-- 1 freaky None 23176 Jun 9 13:28 states_imgmap.png
    -rw-r--r-- 1 freaky None 22619 Jun 9 13:29 states_imgmap_pngcrush.png
    -rw-r--r-- 1 freaky None 21404 Jun 9 13:31 states_imgmap_pngout.png
    The .png is saved from Paint Shop Pro 7, _pngcrush.png using bog-standard pngcrush (which was, btw, identical to pngcrush -brute), , and _pngout.png using pngout.

    If you think this is too simple an image, let's try a screengrab of my desktop, reduced to 256 colours. Feeling lucky?
    -rw-r--r-- 1 freaky None 342508 May 31 02:22 grab_orig.png
    -rw-r--r-- 1 freaky None 136461 Jun 9 13:41 grab.gif
    -rw-r--r-- 1 freaky None 97538 Jun 9 13:40 grab.png
    -rw-r--r-- 1 freaky None 95336 Jun 9 13:42 grab_pngcrush.png
    -rw-r--r-- 1 freaky None 87168 Jun 9 13:44 grab_pngout.png
    Same deal as above. The original is a 24bit pngcrushed file. None were saved as interlaced/progressive, nor with any transparency.

    I dunno about you, but PNG looks pretty good to me.

    Remember that most PNG's are likely to be 24 bits, as opposed to GIF's maximum of 8, and can even include an extra 8 bits of alpha transparency.

    poor standardization

    What? There's at least one free high quality reference implementation anyone's welcome to use (even Microsoft), the full specification's there for anyone to read, there's a W3C recommendation that's actively maintained. What more standardization do you need?

    Yes, IE doesn't support alpha transparency (something GIF doesn't even have the potential to do; PNG's 8 bit alpha channel is as big as GIF's entire range!), but for general use PNG's a perfect replacement for GIF.

    JPEG can beat both, but only if you don't mind it dropping image quality to do so; not something you want to do generally.

    little exposure

    So what? Most users can just double click on the image file (who's file extension Windows helpfully hides by default) and won't notice the difference. And if some so called "web developer" hasn't heard of it, well, sucks to be him and his clients.
  16. Two solutions for IE 6 PNG color mismatch by yerricde · · Score: 5, Informative

    What you're seeing is probably gamma correction. Try saving the PNG image without a gamma chunk (GIMP's Save As... dialog can do this), and your image's #660000 will match your page's #660000.

    If it's not gamma, then it's probably differences in dithering. In high-color mode, some web browsers use different dithering algorithms on flat rectangles (e.g. backgrounds) vs. images. If this is your problem, the problem should show up with GIF images as well. Here, the best policy is to use a binary-transparent PNG, masking out what touches the edges and matches the background. (IE supports binary transparency in indexed images, just not alpha.)

    --
    Will I retire or break 10K?