...

View Full Version : PNG Now?



Joseph Witchard
11-29-2009, 03:53 AM
I had read in a book that using PNGs instead of GIFs or JPGs was not recommended. However, the book was published in 2004 (a long time ago). If I remember correctly, the only browser that had problems with PNG files was IE6. How much of a risk would I be taking if I started to phase PNGs into my site?

oesxyl
11-29-2009, 10:34 AM
I had read in a book that using PNGs instead of GIFs or JPGs was not recommended. However, the book was published in 2004 (a long time ago). If I remember correctly, the only browser that had problems with PNG files was IE6. How much of a risk would I be taking if I started to phase PNGs into my site?
png has bigger size then gif and jpg. The problem with IE can be solved, it can use transparence and usualy is recommended because it's free, :)
The decision depend on what you think that is important. I'm not sure what's mean that gif and jpeg are not "free",:).
loading time for a site is important for me and if I need transparence I use it else I use jpg, or gif if I need animation.

best regards

VIPStephan
11-29-2009, 11:53 AM
png has bigger size then gif and jpg.

This is a highly unprecise statement. Under what circumstances has PNG a bigger size than GIF and JPG?

The first thing one needs to do to determine what file type to use is to look what kind of graphic it is and what itís used for. For photos (or complicated images with millions of colors) JPEG would be the preferred file type because its compression ratio is best for these types of images.

Note that JPEG is a lossy format so some graphical information (detail, if you will) is lost in the image which is barely noticeable in photos but wouldnít be feasible in graphics where precision is important.

For such graphics PNG was developed as ďopen standardĒ, as a replacement of GIF which is subject to license restricitons as it is a proprietary format. Furthermore, PNG has more options (8, 24, and 32 bit graphics which corresponds to graphics with 256 colors (with index transparency), millions of colors, and millions of colors with alpha transparency) and has a better compression than GIF in bigger files.

Itís true that for like 5◊5 px images GIF is smaller but this difference is really negligible at this size. If graphics are a bit larger then PNG is definitely better suited. Wikipedia has a lot of info about these file formats and the background thereof.

Iíve moved towards not using GIF anymore because PNG can do the same things and better (for example, in Fireworks you can export 8 bit PNG with alpha transparency which also works better in IE than 32 bit alpha PNGs in some cases) except for image animations, of course, but I barely make use of this anyway.

oesxyl
11-29-2009, 01:29 PM
This is a highly unprecise statement. Under what circumstances has PNG a bigger size than GIF and JPG?

The first thing one needs to do to determine what file type to use is to look what kind of graphic it is and what itís used for. For photos (or complicated images with millions of colors) JPEG would be the preferred file type because its compression ratio is best for these types of images.

Note that JPEG is a lossy format so some graphical information (detail, if you will) is lost in the image which is barely noticeable in photos but wouldnít be feasible in graphics where precision is important.


For such graphics PNG was developed as ďopen standardĒ, as a replacement of GIF which is subject to license restricitons as it is a proprietary format.
maybe you can make some light and explain what's your benefit that is a open standard.


Furthermore, PNG has more options (8, 24, and 32 bit graphics which corresponds to graphics with 256 colors (with index transparency), millions of colors, and millions of colors with alpha transparency) and has a better compression than GIF in bigger files.

Itís true that for like 5◊5 px images GIF is smaller but this difference is really negligible at this size. If graphics are a bit larger then PNG is definitely better suited. Wikipedia has a lot of info about these file formats and the background thereof.


Iíve moved towards not using GIF anymore because PNG can do the same things and better (for example, in Fireworks you can export 8 bit PNG with alpha transparency which also works better in IE than 32 bit alpha PNGs in some cases) except for image animations, of course, but I barely make use of this anyway.
I don't understand, jpeg have a better compression ratio, gif is smaller in some cases but doesn't matter that you can use few hundred in a page and my statement is still highly unprecise?

best regards

drhowarddrfine
11-29-2009, 02:23 PM
png has bigger size then gif and jpg.
Yes, that's not true. PNG will always be smaller than jpg because jpg is used to compress a wider range of colors and gray scales but jpg will do a better job on things like photos of real images but png will do better on generated art.

PNG can beat GIF, too, if properly compressed. A lot of image compression software does not fully utilize PNG compression (GIMP does, PHotoshop does not) but png will still run neck/neck with gif.

oesxyl
11-29-2009, 02:28 PM
Yes, that's not true. PNG will always be smaller than jpg because jpg is used to compress a wider range of colors and gray scales but jpg will do a better job on things like photos of real images but png will do better on generated art.

PNG can beat GIF, too, if properly compressed. A lot of image compression software does not fully utilize PNG compression (GIMP does, PHotoshop does not) but png will still run neck/neck with gif.
give me an example, same picture in all three formats, optimized all, when png is smaller, I'm just curios.

best regards

drhowarddrfine
11-29-2009, 04:36 PM
Oh, don't make me work. The fact you are asking this question tells me you might be trying to compare file size without regard to image quality. Particularly jpeg vs png. You cannot as they are not used for the same thing and any attempt at comparison is moot since they are not to be used for the same thing as I said above.

Apostropartheid
11-29-2009, 08:27 PM
See attached. I had these on hand. PNG is smaller, even without proper compression algorithms.

oesxyl
11-30-2009, 12:45 AM
See attached. I had these on hand. PNG is smaller, even without proper compression algorithms.
use proper compression and let's see if you can make it smaller then a jpeg. I just convert it, I didn't touch anything what could change image quality like palete or quality factor.

best regards

drhowarddrfine
11-30-2009, 03:27 AM
I remember having these battles something over 5 years ago. Those were the days but I thought they went away.

_Aerospace_Eng_
11-30-2009, 08:13 AM
use proper compression and let's see if you can make it smaller then a jpeg. I just convert it, I didn't touch anything what could change image quality like palete or quality factor.

best regards

Are you even looking at the quality? Look at the artifacts around the letters. You don't see many if any on the png. You do seem some on the gif as well.

The only issue I have with png other than the IE6 alphatransparency thing is the slightly darker color that all versions of IE use on pngs. This is due to the PNG gamma that IE reads.

http://morris-photographics.com/photoshop/articles/png-gamma.html
http://www.biorust.com/tutorials/detail/231/en/

VIPStephan
11-30-2009, 11:36 AM
maybe you can make some light and explain what's your benefit that is a open standard.

Well, I’m not sure if “open standard” is the correct term but that was what came into my mind at first. I’ll explain what I mean:

Basically the GIF format belongs to a privately owned company. If this company decides to prohibit the use of graphics in its own format then you can’t do anything about it other than deleting your graphics that are GIF. And all programs that can create GIF images and are not authorized by this company will have to remove the functionality to export GIF files, etc.. For this reason PNG was developed, to have a widely supported graphic format that is open for anyone to use.

Kinda for the same reasons other open file formats have been developed such as OGG and SVG – and PDF has been converted into an open standard, too, after it was proprietary to Adobe.

oesxyl
11-30-2009, 12:11 PM
Are you even looking at the quality? Look at the artifacts around the letters. You don't see many if any on the png. You do seem some on the gif as well.
never mind, it's already a flame I don't want to continue.

best regards

oesxyl
11-30-2009, 12:50 PM
Well, Iím not sure if ďopen standardĒ is the correct term but that was what came into my mind at first. Iíll explain what I mean:

Basically the GIF format belongs to a privately owned company. If this company decides to prohibit the use of graphics in its own format then you canít do anything about it other than deleting your graphics that are GIF. And all programs that can create GIF images and are not authorized by this company will have to remove the functionality to export GIF files, etc.. For this reason PNG was developed, to have a widely supported graphic format that is open for anyone to use.
it's a long story about Unisys, it's patent for LZW and the war with CompuServ, gif was in the middle and Thomas Boutel start with this idea.
But all this is not important, we just use a picture in a format processed by some software, no more no less.
There is another story about let's support open standard, free software, open source and so on because we want a better world, and we don't want global warming or dislike microsoft. :)


Kinda for the same reasons other open file formats have been developed such as OGG and SVG Ė and PDF has been converted into an open standard, too, after it was proprietary to Adobe.
I have nothing against open software, open source, fsf and nothing against png, :)
The authors said that jpeg is smaller, and gif is 5-25% bigger then png.
This 5-25% is a statistic results my statement is based on my experience, :). In few years I had a single case when a jpg was smaller then it's png version.

best regards

Apostropartheid
11-30-2009, 04:33 PM
I think patents on GIF has expired in most countries now anyway. The JPEG has much lower quality level, as seen by the artifacts on the images. JPEG is lossy, so PNG is unlikely to match it in terms of compression.

Joseph Witchard
12-01-2009, 07:30 AM
*looks over all the posts*

So the overall opinion is to use it despite the IE6 risk? Or not? What am I doing here?:p

VIPStephan
12-01-2009, 09:27 AM
Yes, definitely use it! IE 6 has no problems with PNG except for 32 bit alpha transparency which can also be overcome with a workaround (http://24ways.org/2007/supersleight-transparent-png-in-ie6). However if you use Fireworks to export your images you can use 8 bit PNG with alpha transparency which will effectively be displayed as index transparency in IE 6. But many times you won’t even need alpha transparency or real index transparency will do anyway.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum