Ugly Hedgehog - Photography Forum
Home Active Topics Newest Pictures Search Login Register
UHH Cutting room
PNG vs JPG
Aug 21, 2019 11:01:56   #
Rongnongno Loc: FL
 
As I am always checking stuff I wanted to check the difference between a JPG and a PNG image.

Both save are 8 bit. To avoid too much compression artifact I used 'best quality'. This led to much larger file than the PNG!!! Yet they do not match.

If you flip them there seem to be no difference yet...

The last image is the difference between the two.

(software used PS CC)

-

PNG file
PNG file...
(Download)

JPG file
JPG file...
(Download)

Difference saved as PNG
Difference saved as PNG...
(Download)

Reply
Aug 21, 2019 11:17:10   #
Longshadow Loc: Audubon, PA, United States
 
Interesting.
I downloaded each to a new tab and kept switching between them.
No apparent discernible difference on my system.
I'll save space and continue to use JPEGs.
Ever so slight microscopic difference in the difference image.

Reply
Aug 21, 2019 11:25:28   #
Rongnongno Loc: FL
 
Making the difference more visible...

PNG-8

-


(Download)

Reply
 
 
Aug 21, 2019 11:35:37   #
bleirer
 
I believe png can maintain transparency but jpeg can't. Useful if you use it in web design or print design and you want the background color to be visible.

Reply
Aug 21, 2019 11:51:27   #
Rongnongno Loc: FL
 
bleirer wrote:
I believe png can maintain transparency but jpeg can't. Useful if you use it in web design or print design and you want the background color to be visible.


It does. I switched it off when exporting. PNG can also be exported at a much greater bit depth than 8 bit. For this to be valid I used 8 bit otherwise the two would not be comparable.

sRGB is used as UHH messes with the thumbnail displayed if you use RGB.

Reply
Aug 21, 2019 12:18:03   #
Longshadow Loc: Audubon, PA, United States
 
Rongnongno wrote:
Making the difference more visible...

PNG-8

-


Not enough for me to worry about.
Neat information!

Reply
Aug 21, 2019 12:41:18   #
Rongnongno Loc: FL
 
Longshadow wrote:
Not enough for me to worry about.
Neat information!


It does not worry me either when this is the first generation and saved as 'fine'. When importing a JPG in PS CC I usually use 16 bit then, after edit export as PNG-8 to avoid the cumulative compression artifacts.

Note that compressing the color depth can lead to banding so the 16 bit depends on the subject. Going 16 bit the reducing to an 8 bit will create banding in areas that have a slight difference (sky by example). In this case I just keep the 8 bit....

Reply
 
 
Aug 21, 2019 12:48:25   #
JD750 Loc: SoCal
 
Rongnongno wrote:
As I am always checking stuff I wanted to check the difference between a JPG and a PNG image.

Both save are 8 bit. To avoid too much compression artifact I used 'best quality'. This led to much larger file than the PNG!!! Yet they do not match.

If you flip them there seem to be no difference yet...

The last image is the difference between the two.

(software used PS CC)

-


Interesting. My limited knowledge is that PNG supports transparency, whereas JPG does not. So PNG is good format for use as logos, watermarks, for use in PS or other image editors where transparency matters. I use PNG at work frequently for making compilations of graphics for presentations. Most of these are vector graphics not bit-map images.

I wasn't aware that UHH supported PNG for uploading. I queried Admin about the upload format compatibility and this was the reply:
"I don't remember what I coded, so it's safe to just use JPG. And it's 20MB limit. Thumbnails are 600x800 max. Same for PM and posts."

Reply
Aug 21, 2019 12:51:47   #
Rongnongno Loc: FL
 
JD750 wrote:
Interesting. My limited knowledge is that PNG supports transparency, whereas JPG does not. So PNG is good format for use as logos, watermarks, for use in PS or other image editors where transparency matters. I use PNG at work frequently for making compilations of graphics for presentations. Most of these are vector graphics not bit-map images.

I wasn't aware that UHH supported PNG for uploading. I queried Admin about the upload format compatibility and this was the reply:
"I don't remember what I coded, so it's safe to just use JPG. And it's 20MB limit. Thumbnails are 600x800 max. Same for PM and posts."
Interesting. My limited knowledge is that PNG sup... (show quote)


I post PNG on regular basis. When UHH creates the thumbnail there is a known issue with the color space - any format -.

Reply
Aug 21, 2019 13:13:54   #
Longshadow Loc: Audubon, PA, United States
 
Ysarex wrote:
It certainly isn't a color space: https://en.wikipedia.org/wiki/RGB_color_model

Joe


Being a color model doesn't make it a format for images, regardless of how they may be converted for display.

Reply
Aug 21, 2019 14:09:12   #
artBob Loc: Near Chicago
 
Rongnongno wrote:
As I am always checking stuff I wanted to check the difference between a JPG and a PNG image.

Both save are 8 bit. To avoid too much compression artifact I used 'best quality'. This led to much larger file than the PNG!!! Yet they do not match.

If you flip them there seem to be no difference yet...

The last image is the difference between the two.

(software used PS CC)

-

A very important issue seems to have been ignored, and limited parameters by Rongnorngno followed by some snakiness about the points of comparing jpg and png didn't help. Loss of information is the issue.

From Google: "PNG format is a lossless compression file format....JPG format is a lossy compressed file format."

So PNG should be the preference for photographers. However, ever since the perspective fiasco on UHH, where posters were quoting this and that, with no one doing the actual suggested experiments that proved the words false, I see if the words actually play out in the real world.

I took a photo that I had saved as psd (Photoshop), and re-saved it as a maximum quality jpg and as a png. (True, png was twice as large.) Then I blew up a section of each. However, the png had richer color, especially in the warm part of the spectrum. It also was very slightly less noisy. (I looked at each at 400% and 700% in Photoshop).

There was not so much difference that I couldn't adjust the jpg if needed. Also, you have to factor in other parameters such as monitor correctness, Photoshop algorithms, and who knows what else. However, I have been leaning towards png ever since I learned it was not lossy a while back. I will keep my experiment in mind, and for professional submissions, etc, I will use psd (Photoshop), tif, or png.

Reply
 
 
Aug 21, 2019 17:01:14   #
TriX Loc: Raleigh, NC
 
bleirer wrote:
I believe png can maintain transparency but jpeg can't. Useful if you use it in web design or print design and you want the background color to be visible.


Exactly - one of the reasons to use the PNG format.

Reply
Aug 21, 2019 17:29:44   #
rebride
 
RGB Image Formats
In addition to the 24-bit-per-pixel RGB/BGR image formats, the Intel IPP color conversion functions support 32-bit-per-pixel RGB/BGR formats, which include three RGB channels plus alpha channel. For 24-bit formats, each color is one byte, every pixel is three bytes. For 32-bit formats, each color is one byte and alpha component is one byte, which yields four bytes per pixel. Memory layout for these formats is given in Table “Pixel-Order Image Formats”.

For 16-bit formats, every pixel is two bytes and each color occupies a specified number of bits. The figure below shows all the supported 16-bit-per-pixel formats and their memory layout (bit order):

Reply
If you want to reply, then register here. Registration is free and your account is created instantly, so you can post right away.
UHH Cutting room
UglyHedgehog.com - Forum
Copyright 2011-2024 Ugly Hedgehog, Inc.