title: How can the png lossless format have different quality?
body: <p>So I just wanted to ask this question because there is a quality slider for png in Adobe Photoshop.</p>
  <p>Now the reason why I find this very confusing is I know that PNG is a lossless format.</p>
  <p>I'm not sure what is used to measure objective quality, by that I mean how much information is contained in images. I'm assuming it's either dpi or bit depth or file size for the same format?</p>
  <p>Now, I know that the same lossless compression for the same image can have varying quality (bit depth and dpi).</p>
  <p>This is because you can do an in between step and encode it into a lossy format like jpg, before converting back into a lossless format like png.</p>
  <p>For example, we have a picture of some dice taken by a camera in a lossless png format it's the original quality let's say 360dpi horizontal and vertical resolution and 24 bit depth.</p>
  <p>Then we can encode it into jpg (which is using lossy compression) and presumably the quality would go down slightly from averaging pixels, as it is lossy compression and it would lower the quality to something like 200dpi horizontal and vertical resolution and 12 bit depth.</p>
  <p>Then we encode that back into png again (lossless compression) and the final quality would be 200dpi horizontal and vertical resolution and 12 bit depth.</p>
  <p>So now we have two pngs for the same image which are in a lossless format, the original one and our one that was encoded from a jpg, that have different quality.</p>
  <p>The point I'm trying to make is that I think this is why two images using lossless compression can have differing quality, even though lossless compression does not remove any information, because one of the lossless compression images could have just been encoded from a lossy format. Information can be removed from lossless formats by encoding to and from a lossy format.</p>
  <p>So now back to the question, is this why Photoshop has a quality slider for PNG images?</p>
  <p>For qualities below 100% say 80%, is Photoshop encoding into something lossy like jpg and then back into the lossless png so that the files can have different quality and thus, a different file size for the same image?</p>
  <p>I've also read something on wikipedia about PNG being able to perform lossy compression as well, so is that what is happening instead?
  <a href="https://en.wikipedia.org/wiki/Portable_Network_Graphics#Lossy_PNG_compression" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Portable_Network_Graphics#Lossy_PNG_compression</a></p>
  <p>I'm just confused about it.</p>