526
Applications / Re: PMView - colour vibrancy gone after save?
« on: November 16, 2020, 02:37:53 pm »
I reached out to Peter Nielsen - the author of PMView - regarding this. We exchanged a couple of emails, I researched the different formats in parallel to understand this better. In the end, I felt like Peter's final email pretty much summed up the issue very nicely. I asked him to OK me posting his response to the list here, he agreed.
I am satisfied with this explanation, the key there being the extremely small number of colours in the sample images I encountered the issue with.
Thanks everyone,
-Dariusz
Quote
Subject: Re: PMView - image colour vibrancy gone after save
To: Dariusz Piatkowski
From: Peter Nielsen
Date: Sun, 15 Nov 2020 14:20:55 -0500
Hi Dariusz,
PNG can use a palette (color lookup table) or true color values. In 8-bit mode, a 256 entry palette will be used. GIF always uses a palette, even for gray scale images.
JPEG can only use true color values. You need to read an article or technical paper to understand how it works, but in short, the procedure affects pixel data and reduces information.
Images with sharp contrast (like computer generated images) are generally not suited for JPEG because you will see artifacts because of the lossy algorith,. Also, even more important if you don't have many colors: JPEG is always true color (24 bits for each pixel), it does not have a palette. If you have an image with 256 colors, it can be stored in 8 bits per pixel. If you only have 8 colors, you only need 3 bits per pixel, etc. PNG and GIF may produce smaller images than JPEG in this case, while keeping the image unaltered.
>So am I understanding correctly that due to JPEG's algorithm and compression processing, the colours >eventually arrived at are the post-compression values and therefore this is why they do NOT match those >of the originals?
Yes. The JPEG algorithm is *extremely* unsuitable for computer generated images with "on/off contrast". This is where the algorithm performs the worst. JPEG is good for photographic images but should generally be avoided for any computer generated data.
>Is this taking place because the original used so few colours to start off with?
No. It's because of the sharp pixel-to-pixel contrast in the data. If I recall correctly, JPEG stores data in 8x8 blocks. If you resize the file by 8 times, and then save as JPEG you can expect a better looking result.
Thanks,
Peter
I am satisfied with this explanation, the key there being the extremely small number of colours in the sample images I encountered the issue with.
Thanks everyone,
-Dariusz