I know that this is a complete noob question, but bear with me... I am learning
If I save a PNG file as interlaced will quality be sacrificed compared to a non interlaced version? I tested and sizes are different for the same pixel depth and same width/height.
What about progressive jpeg versus regular? The sizes are also different...
Thanks.
Newbie doubts about png and jpeg
Moderators: XnTriq, helmut, xnview
-
- Author of XnView
- Posts: 44470
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Newbie doubts about png and jpeg
PNG is a lossless format even if you use interlaced and different compression value.beto wrote:I know that this is a complete noob question, but bear with me... I am learning
If I save a PNG file as interlaced will quality be sacrificed compared to a non interlaced version? I tested and sizes are different for the same pixel depth and same width/height.
What about progressive jpeg versus regular? The sizes are also different...
JPEG is a lossy format progressive or not.
Pierre.
Sorry, I wasn't very clear...
What I meant is comparing PNG interlaced versus PNG non-interlaced and JPEG progressive versus JPEG non-progressive using the same image source.
From your reply I understand that for PNG I will be able to restore the original image source losslessly no matter if I compressed it with PNG interlaced or PNG non-interlaced. Is this correct? The doubt arised because compressing the same image source with PNG interlaced gave me smaller file sizes than compressing it with PNG non-interlaced for the same compression level...
Regarding JPEG what I wanted to know is if JPEG progressive is "more lossy" than JPEG non-progressive for the same image source.
Thank you for your replies.
What I meant is comparing PNG interlaced versus PNG non-interlaced and JPEG progressive versus JPEG non-progressive using the same image source.
From your reply I understand that for PNG I will be able to restore the original image source losslessly no matter if I compressed it with PNG interlaced or PNG non-interlaced. Is this correct? The doubt arised because compressing the same image source with PNG interlaced gave me smaller file sizes than compressing it with PNG non-interlaced for the same compression level...
Regarding JPEG what I wanted to know is if JPEG progressive is "more lossy" than JPEG non-progressive for the same image source.
Thank you for your replies.
-
- Posts: 3
- Joined: Tue Apr 12, 2005 12:29 am
-
- Author of XnView
- Posts: 44470
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Data can perhaps be compressed more when interlaced, but it's lossy.Anonymous wrote:From your reply I understand that for PNG I will be able to restore the original image source losslessly no matter if I compressed it with PNG interlaced or PNG non-interlaced. Is this correct? The doubt arised because compressing the same image source with PNG interlaced gave me smaller file sizes than compressing it with PNG non-interlaced for the same compression level...
No it's the same. Progressive jpeg write original picture + pictures at different resolution.Regarding JPEG what I wanted to know is if JPEG progressive is "more lossy" than JPEG non-progressive for the same image source.
Pierre.
-
- Posts: 3
- Joined: Tue Apr 12, 2005 12:29 am
-
- Posts: 884
- Joined: Sun Apr 10, 2005 4:29 pm
1) PNGs are always lossLESS, regardless of interlaced or not. In most cases, interlacing will increase the filesize, but in some it may reduce it. Interlacing saves the file in a slightly different fashion than non-interlacing and thus results in a different filesize, but it does not change the fact that PNG is lossless. An interlaced PNG and a non-interlaced PNG created from the same source image will be pixel-perfect identical to each other.
(Note: There are some experimental "lossy" png compressors floating around, but these still save lossless files. The loss in these so-called "lossy" PNGs is done before actually creating the file.)
2) The same is essentially true for progressive/non-progressive JPGs. There is no increased loss regardless whether you save the image as progressive or non-progressive. Again, the difference lies only in how the program layers the data within the image file. This results in a different filesize, but no difference within the visible image. Progressive JPGs differ from interlaced PNGs in that a progressive JPG is usually smaller than a non-progressive one. (Unless you are dealing with a very large image, then the non-progressive will usually be smaller.)
In short, the only difference between interlaced/progressive and non-interlaced/non-progressive images is how they display as they're loading, and a minor difference in filesize. Quality is not affected one way or the other.
(Note: There are some experimental "lossy" png compressors floating around, but these still save lossless files. The loss in these so-called "lossy" PNGs is done before actually creating the file.)
2) The same is essentially true for progressive/non-progressive JPGs. There is no increased loss regardless whether you save the image as progressive or non-progressive. Again, the difference lies only in how the program layers the data within the image file. This results in a different filesize, but no difference within the visible image. Progressive JPGs differ from interlaced PNGs in that a progressive JPG is usually smaller than a non-progressive one. (Unless you are dealing with a very large image, then the non-progressive will usually be smaller.)
In short, the only difference between interlaced/progressive and non-interlaced/non-progressive images is how they display as they're loading, and a minor difference in filesize. Quality is not affected one way or the other.
-
- Author of XnView
- Posts: 44470
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France