JPEG image compression vs PNG
-
I created a sample blowup of parts of an image showing file sizes vs image quality using PNG and JPG.
png vs jpeg compression - blown up 6X
(The images have been blown up 6X so you can see the artifacts better)
(The numbers at the top of the JPEG images is the quality factor 60, 80 or 100 (max))The KB sizes are for a 480 x 405 image.
Even at 100 quality (the highest available, JPG still adds artifacts to the image.
So, I would use JPEG for casual uploads to forums, etc. But plan on using PNG for top quality images.
-
Yea. I always use PNG as it does a good job at loss-less compression. I'm not happy with JPEGs. Only use JPEG for posting on the web.
What I see too often is images saved as JPEG that's opened, edited and saved again and again degrading the image more and more each time.
-
Don't know if you've got V-ray, but I'd suggest you render something with it then export it to JPG as well as PNG and start laughing at the results I always export PNG but if JPG is needed I change it in Photoshop [100%, with no notable quality loss]
-
The compression artifacts are the most prominent in images like Al posted, with large areas of uniform colour. IMO photographs can be relatively safely stored in JPG if the quality setting is kept high, but things like SU renders begin to degrade fast. This aspect of the JPG format is something that every user should be aware of. Initially, compressing photographs is what the format was designed for.
Anssi
-
@al hart said:
Even at 100 quality (the highest available, JPG still adds artifacts to the image.
When I compare your 100% jpg to the png I'm not seeing any added artifacts. It appears identical. (Identical other than appearing more washed out. Since your frame is also washed out I assume that faded look isn't a characteristic of the jpg).
I also note that both jpgs & png's (and other image formats) will look different depending on what software you are using to view them. For instance not all web browsers display jpgs or png's identically. Al if you are using 'Paint' to judge these things I'd question that. Instead why not use Internet Explorer like the vast majority of people do?
Regards, Ross
-
@anssi said:
The compression artifacts are the most prominent in images like Al posted, with large areas of uniform colour. IMO photographs can be relatively safely stored in JPG if the quality setting is kept high, but things like SU renders begin to degrade fast. This aspect of the JPG format is something that every user should be aware of. Initially, compressing photographs is what the format was designed for.
Yes. When people ask me when to use JPEG and when to use PNG I tell them to use PNG for graphics and JPEG for photos. (But always make a point that whenever they make a JPEG that they keep a copy of the original version when they edit it.)
@ross macintosh said:
Instead why not use Internet Explorer like the vast majority of people do?
Doesn't windows come setup with the Image Viewer as the default application for PNG, GIF and JPEG?
-
What are your guys' opinions on png vs tiff then? I've been using png's for awhile but someone mentioned that they preferred tif's because you can associate a particular color profile w/ the image.
-Brodie
-
@ross macintosh said:
When I compare your 100% jpg to the png I'm not seeing any added artifacts. It appears identical. (Identical other than appearing more washed out. Since your frame is also washed out I assume that faded look isn't a characteristic of the jpg).
I also note that both jpgs & png's (and other image formats) will look different depending on what software you are using to view them. For instance not all web browsers display jpgs or png's identically. Al if you are using 'Paint' to judge these things I'd question that. Instead why not use Internet Explorer like the vast majority of people do?
Regards, Ross
The differences are almost impossible to see. The JPEG has some very light differences.
I blow them up in Paint, because Paint preserves each pixel when you zoom in - so you can see what the actual pixels look like. Other programs sooth out the image when expanding it - which makes it look better, but makes it harder to examine the underlying technology.
The 100% JPEG is probably very good - except, as some have noted, it you edit it and save it as a JPEG again - then the compressions starts to catch up with you.
The client who started this discussion was saving a JPEG at medium resolution and then expanding it. He solved most of his problem by rendering to a higher resolution in the first place. But I added a JPEG compression factor to our image save routine. (SketchUp already has one.) I made this post, because I think people should be aware of the differences and also, have an idea of the trade off between quality and compression.
-
@unknownuser said:
What are your guys' opinions on png vs tiff then?
-BrodieTiff has a lot of options - it can have layers, multiple alpha channels etc - almost as in a PSD, and it has several file compression options. Generally with a larger filesize than PNG. The range of options also creates problems, like applications not supporting all of them (especially all the compression options). Both the formats are lossless. I think PNG only supports the RGB colourspace, but using CMYK is a job for printing professionals, with its own pitfalls (and a smaller colour gamut than RGB). If you don't have a specific reason to use Tiff, you can very well stick to PNG.
Anssi
-
Also TIF's are not supported by web browsers so you cannot usae them on websites. They are really for professionals working on them like Anssi says.
-
I generally use jpg for textures...like stone or wood grain. These are effectively photos; and jpg is a reasonable format for "busy" images like that, as most artifacting is lost in the detail. It needs to be at compression level 7 at the very least.
I only use jpg in these instances because it generally leads to a lower file size...especially when many such images might be embedded in a skp file.If I was using an image with lot of flat colour...especially one with leaves against a flat background, as in Al's example, I'd definitely go for png. Not only will it give a cleaner image with no loss of detail, but on a limited colour palette (especially items like logos or shop signage) it will likely also be a smaller file size than a jpg (even a jpg saved at level 7).
Both png and tiff can result in surprisingly small file sizes when used for graphic images like signs or logos. In fact I've made very large B/W (black and white) tiffs and pngs which have barely made it into double figures of kilobytes when saved out of PS with LZW compression.
This png...saved from a vector image I'm working on had to be reduced to fit the forum limits. However it was exported from corel at full A4 size (that's over 3000 pixels high...with all the resulting sharpness of detail) and was an amazingly small 18k in size. The tiff was larger, but even that was only 69k...2/3 the size of the equivalent level 7 jpg.
Advertisement