PDA

View Full Version : What's the obsession with PNG?



GFree
February 15th, 2007, 03:03 AM
Now don't get me wrong, I like using the PNG file format for my images due to their lossless nature. The only problem is, despite the high level of compression they can achieve, they're still a lot larger than JPG. Even though they're fine for modern storage medias, I find this constitutes an issue when it comes to sticking images on the web. It's a waste of bandwidth/time when a lower-compression reasonably high quality JPG will suffice.

I've also noticed that whenever you go to a forum which has the typical "Post your desktop" thread, if they're of Windows desktops, they're virtually always JPG snaps. But here, and for most Linux users elsewhere, they like using the larger filesized PNGs. Why do Linux uses sway to PNG? There's gotta be a reason.


Anyways. :popcorn:

PatrickMay16
February 15th, 2007, 03:15 AM
It's probably because the screenshot tools for the KDE and gnome desktops default to PNG, and nobody thinks to change it. Which results in people posting 1280x1024 png screenshots with detailed wallpaper, etc, reaching 1MB or even more.

Paerez
February 15th, 2007, 03:18 AM
PNG preserves sharp edges in images, vs jpg which gets blurry for images with text in them. PNG can (and will) be larger, but it is also higher quality. In the era of broadband a higher quality image may beat out filesize.

PNG was created as a patent-free competitor to GIF, not to compete with jpeg.

More info here:
http://en.wikipedia.org/wiki/Png

corstar
February 15th, 2007, 03:18 AM
Why do Linux uses sway to PNG? There's gotta be a reason.


Anyways. :popcorn:

Yeah, OSS!

Baelfael
February 15th, 2007, 03:24 AM
I love using PNG files. Especially when working with transparent graphics. It gives more transparency and just a cleaner look.

GFree
February 15th, 2007, 03:28 AM
Ok, so it's basically three things:

* Superior image quality
* Default for many Linux apps
* Open Source
* Broadband negates size

Make sense I suppose. Apart from desktop screenies and the occasional avatar I still don't see much net penetration of the format though. Has IE7 fixed the transparency bug present in IE6?

Baelfael
February 15th, 2007, 03:34 AM
Ok, so it's basically three things:

* Superior image quality
* Default for many Linux apps
* Open Source
* Broadband negates size

Make sense I suppose. Apart from desktop screenies and the occasional avatar I still don't see much net penetration of the format though. Has IE7 fixed the transparency bug present in IE6?
I hope it did, or else IE users must hate Ubuntu forums. XD

FyreBrand
February 15th, 2007, 03:40 AM
Ok, so it's basically three things:

* Superior image quality
* Default for many Linux apps
* Open Source
* Broadband negates size

Make sense I suppose. Apart from desktop screenies and the occasional avatar I still don't see much net penetration of the format though. Has IE7 fixed the transparency bug present in IE6?It is a highly configurable image format.

-Can keep colors in a palette or drop them to make a file smaller.
-Supports multiple bit depths (kind of related to the palette
-Supports alpha transparency (jpeg doesn't)

The file size isn't always larger, but it depends on the graphic. PNG isn't really a replacement for JPEG, but is a useful format for for instances when JPEG is weak. They really complement each other. A classic JPEG strength is a photoimage quality graphic at a smaller size something that can be achieved in a PNG, but it takes a lot of work and still the file size might not be as small.

You can read a lot about the strengths and weakness of the PNG format at their site: PNG (Portable Network Graphics) (http://www.libpng.org/pub/png/). There is some really interesting information there.

corstar
February 15th, 2007, 03:42 AM
I hope it did, or else IE users must hate Ubuntu forums. XD

Care factor for IE users? ZERO. (imo)

Baelfael
February 15th, 2007, 03:45 AM
Care factor for IE users? ZERO. (imo)
I agree, I hate IE. Firefox for me all the way baby, but a lot of people use IE, and that doesn't help when you're trying to get people to join your forums that uses a lot of PNG files.

FuturePilot
February 15th, 2007, 03:54 AM
PNG can preserve the quality of an image. Converting to a JPG can sometimes cause distortion. By default Gnome saves screen shots in PNG format. It can also handle transparency.

GFree
February 15th, 2007, 03:57 AM
I am aware of all the nice features about PNG. I'm actually focusing on the use of large PNGs on the Internet, for purposes that don't require such levels of quality. Not everyone in the world has broadband, and for those that do, not everyone has access to the faster forms of BB.

Different formats for different purposes.

SunnyRabbiera
February 15th, 2007, 04:20 AM
Well if you know how to you can get jpg's to look pretty clean, perhaps just as clean as PNG's
but PNG has a lot less chance of messing up.
But GIF seems not to be as much of a big deal as it used to be as GIF is now practically as free as a bird now as the licence crap is gone

Nikron
February 15th, 2007, 04:30 AM
At this point, I think's more of the server's fault for having bad bandwidth for most of the sites I visit. For their sake, .jpg is usually better.

muguwmp67
February 15th, 2007, 04:33 AM
Different formats for different purposes.

Thats the key. It seems like many web designers don't understand that most Internet users are still using dial up. Lossless formats are useful for many applications, but I don't think they're the best way to go. If you were developing a real estate database and were storing house photographs in it, it would be rather foolish to store them all as 1600x1200 .png's

SunnyRabbiera
February 15th, 2007, 04:44 AM
Thats why I like the gimp and photoshop, they handle jpgs pretty well if you know how to tune them right.
I have found ways to make jpg's small but not make them messy, though it is with mixed results.

Pikestaff
February 15th, 2007, 05:40 AM
In general I definitely prefer PNG over JPG for the quality... I'm not huge into making graphics or anything but the quality is so much better. On the other hand, I understand that large PNGs often take forever to load... so if I am going to be displaying a large picture online, I always use JPG.

graigsmith
February 15th, 2007, 07:28 AM
actually PNG files can be just as compressed as jpgs. any time you are working with flat raster graphics. it compresses alot. if you want to take a screenshot of a mostly solid colored page. the file size will be tiny. but if you add alot of details it takes up more data.

weatherman
February 15th, 2007, 08:53 AM
jpg? png? the future is svg :guitar:

rai4shu2
February 15th, 2007, 09:45 AM
SVG is nicer than PNG for sure, but it will take even more bandwidth.

Here's a good rule of thumb for casual posting in your gallery:

- color = jpg
- grayscale = png
- just lines = svg

Mathiasdm
February 15th, 2007, 09:57 AM
jpg? png? the future is svg :guitar:
All 3 have their uses ;)

SVG would be a disaster for a photo, but is great for desktop icons.

TLE
February 15th, 2007, 10:06 AM
It's appels and oranges. JPEG is designed to compress REAL PICTURES. It uses the fact that nature, as in a picture of your aunt, doesn't have any sharp edges(and does in fact mainly consist of slowly varying transitions) and so that is worked into the interpolation algorithm. So for almost all REAL PICTURES jpeg will do very nice because well the tool fit the job. PNG is lossless and so for almost all of these REAL PICTURES will be a serious overkill(and also would be quite huge) but it can be necessary to use for something like screen shots because the are indeed not REAL PICTURES. They contain sharp edges not found in nature and so these can't very well be handled by JPEG.

DirtDawg
February 15th, 2007, 10:07 AM
JPG's and PNG's/GIF's are not really comparable. Ye Olde Apples 'n' Oranges.

If you're saving any kind of picture with large, flat areas of color (like a cartoon, for example), you most definitely want to use PNGs/GIFs. The reason being, if you use a JPEG for that kind of image, you're liable to end up with wierd, blotchy areas that just don't look good. In addition, JPEGs do not support transparency or animation as mentioned before.

However, JPEGs can use more than 256 colors (the limit for GIFs), and are perfect for anything with large ranges of color, like photographic images. With their limited pallete, GIFs can make these same images look pretty bad.

So it's really very simple:
Flat or limited colors/ transparency/ animation = PNG/GIF
Photographic images/ images with lots of color = JPEG

I'm not sure about SVG yet. I believe they are used for vector graphics. Very tiny, but limited usage (for now). In addition, last I checked, SVG browser plug-ins were an Adobe product, and I already feel people give them too much power (i.e. Flash). Has this changed, because widely supported, open-source SVG browser support would be sweet?

Of course, there's also the fact that lots of people don't know what they're doing and will just throw an image on the net willy-nilly without being bothered with nuances like file-types. It's likely dial-up users suffer quite a bit from this.

DirtDawg
February 15th, 2007, 10:08 AM
It's appels and oranges.

Jinx!

EDIT: Oops, you're from Copenhagen. You may not be aware that, in America, if two people say the same thing at the same time, you try to be the first person to say "jinx!" afterwards. It's sort of a game.

Hmm. I just realized Americans are weird.

TLE
February 15th, 2007, 10:25 AM
Jinx!

EDIT: Oops, you're from Copenhagen. You may not be aware that, in America, if two people say the same thing at the same time, you try to be the first person to say "jinx!" afterwards. It's sort of a game.

Hmm. I just realized Americans are weird.

Oh I didn't know that, but I just saw both massages so you win anyway ;) Anyway I'm just glad someone agrees with me.

grte
February 16th, 2007, 10:42 AM
There are actually situations where a png can achieve much better compression than a jpeg. Images with a lot of solid colour, sharp edges, text, that sort of thing. For example, here are some shots of a console at resolution 1024x768:

The png weighs in at 36 kb:
http://img100.imageshack.us/img100/6974/consolescreenshot160207nk6.th.png (http://img100.imageshack.us/my.php?image=consolescreenshot160207nk6.png)

The jpeg weighs in at a hefty 298 kb:
http://img329.imageshack.us/img329/4868/consolescreenshot160207qu2.th.jpg (http://img329.imageshack.us/my.php?image=consolescreenshot160207qu2.jpg)

And the gif is comparable with the png at 31 kb, with the disadvantage that it doesn't do alpha and can handle fewer colours:
http://img154.imageshack.us/img154/9765/consolescreenshot160207ls6.th.gif (http://img154.imageshack.us/my.php?image=consolescreenshot160207ls6.gif)

This is also true of other images such as web ui graphics, line art, and various other things.

mcduck
February 16th, 2007, 11:15 AM
I'm not sure about SVG yet. I believe they are used for vector graphics. Very tiny, but limited usage (for now). In addition, last I checked, SVG browser plug-ins were an Adobe product, and I already feel people give them too much power (i.e. Flash). Has this changed, because widely supported, open-source SVG browser support would be sweet?


Firefox supports SVG images by default, as does Safari if I remember right. It's also part of the web standard. (and widely usable on Gnome desktop at least)

Anyway,I don't understand where so many people have got this idea that PNG would be just a replacement for GIF.. It handles gradient colors and such just like JPG does, but doesn't do that much artifacts in the image. Also PNG image with the same quality that JPG has is often smaller in file size. On top of that PNG handles full alpha-channel transparency which is often very useful feature. Even more so if IE7 really supports transparent PNG images like they promised.

The biggest setback with PNG is that it doesn't support color profiles and so doesn't fit for print use. But for desktop and web graphics it's great.

I suppose the real problem is that people just don't bother to compress their images before uploading them to the Net.

edit: It also depends on the picture. For photographs JPG can do smaller files, but for desktop screenshots PNG keeps text readable and graphics clean. hers's a nice example image from wikipedia: http://en.wikipedia.org/wiki/Image:Comparison_of_JPEG_and_PNG.png

saulgoode
February 16th, 2007, 12:21 PM
grte,

PNG also supports Indexed color mode and though the conversion from RGB to Indexed might lead to a loss in quality, this is not always true. The screenshot you provided, for example, could be saved as an Indexed PNG image and only require 20kb of disk space.

Onyros
February 16th, 2007, 01:57 PM
Oh I didn't know that, but I just saw both massages so you win anyway ;) Anyway I'm just glad someone agrees with me.Oh my... this has turned into a strange thread...

I'll go out on a limb and say both Americans and the Danes are strange people! :P

Regarding the topic, if it wasn't for bad browser support PNG would totally trash GIF, for a couple of good reasons...

PNG generally compresses better than GIF (try it out for yourself on the GIMP)

Also, unlike GIF, PNG supports variable transparency (through the usage of alpha channels), image brightness control and colour correction, plus I believe the way PNG handles interlacing is also superior to GIF's.

So... it would be a no-brainer. I once learned the hardest way about IE's lack of support for PNG. I made a vital mistake in web coding/design: I didn't give it a final try in Redmond's browser. I had created a somewhat cool site that had a dock, pretty much like Mac OS X's dock (with the fish-eye effect and all), which semi-transparent icons handled the navigation through the site. I was fine and dandy going to show off the site to this customer in his own computer... He only had IE installed and didn't want Firefox or Opera in his setup. You can imagine the horrific result. :P

ComplexNumber
February 16th, 2007, 03:29 PM
Now don't get me wrong, I like using the PNG file format for my images due to their lossless nature. The only problem is, despite the high level of compression they can achieve, they're still a lot larger than JPG. Even though they're fine for modern storage medias, I find this constitutes an issue when it comes to sticking images on the web. It's a waste of bandwidth/time when a lower-compression reasonably high quality JPG will suffice.

I've also noticed that whenever you go to a forum which has the typical "Post your desktop" thread, if they're of Windows desktops, they're virtually always JPG snaps. But here, and for most Linux users elsewhere, they like using the larger filesized PNGs. Why do Linux uses sway to PNG? There's gotta be a reason.


Anyways. :popcorn:
i tend to use png for my wallpaper because i discovered one of the drawbacks of jpg several months ago. i had been editing(resizing, cropping, and getting rid of the ugly 'watermark' so that i could use it as wallpaper) a jpg vector that i'd got from deviantart, when i noticed that some of the colours seemed to run. it really ruined the wallpaper. however, when i tried the same editing on a png (after converting it to from a jpg to a png), the colour running didn't happen. the effect can be seen in the screenshot (the 1st is a jpg and the 2nd is a png). note how the 'side effect' doesn't happen on png's.

IYY
February 16th, 2007, 08:31 PM
JPG is a format designed for photographs and artwork, where it's the curves, shapes and colours that are important. PNG, on the other hand, is for images where every pixel counts. Since screenshots represent a digital desktop, drawn on a per-pixel basis, PNG is a far better choice.

In simpler words: JPG is blurry.

Mateo
February 16th, 2007, 08:38 PM
i've run websites so I feel bad about uploading 800kb images onto ubuntuforums. so i convert to jpg (and reduce the resolution) before uploading. PNG is pretty but beefy.

lapsey
February 16th, 2007, 08:58 PM
I love lossless compresssion, unlimited palettes AND transparency.

You can't say all that for jpg or gif.

IMO its the only choice for archival purposes, but JPG and GIF are still perfect for the web.

DirtDawg
February 16th, 2007, 09:42 PM
I love lossless compresssion, unlimited palettes AND transparency.

You can't say all that for jpg or gif.

IMO its the only choice for archival purposes, but JPG and GIF are still perfect for the web.

I thought PNG had a 256 palette limit?

EDIT: I posted something else, but I read your post wrong, so erased it. :D

scooper86
February 16th, 2007, 11:25 PM
we are the knights that say PNG!

mcduck
February 17th, 2007, 09:59 AM
I thought PNG had a 256 palette limit?

EDIT: I posted something else, but I read your post wrong, so erased it. :D

That's GIF. PNG can actually do 64-bit colors (16 bits/color channel + 16 bits for alpha)..

But to get smaller files you can use indexed colors with PNG (and most people won't find any use for more than 32 bits..