JPEG, high quality or higher quality?

Here everybody can post his problems with PhotoLine
borgo1971
Mitglied
Posts: 134
Joined: Thu 11 Sep 2008 21:03
Location: Tolmezzo (UD) Italia

JPEG, high quality or higher quality?

Post by borgo1971 »

What is the difference, and in which case should I prefer one over the other? I mean, if someone wants to not exceed in file size, is it better uncheck "High Quality" checkbox or lower Quality slider to get the same file size? Could it be better lower Quality slider until a certain value, and if size remains to big, uncheck "High Quality" before lower further the Quality slider? Or the choice depends from image kind? How do these quality settings affect the images?
Schermata 2023-01-20 alle 13.45.06.jpg
You do not have the required permissions to view the files attached to this post.
bkh
Betatester
Posts: 3674
Joined: Thu 26 Nov 2009 22:59

Re: JPEG, high quality or higher quality?

Post by bkh »

“High quality” turns off chroma subsampling. Makes sense for graphics (avoids colour fringes) but is not that useful for photos because most digital image sensors have Bayer filters.
User avatar
shijan
Mitglied
Posts: 1598
Joined: Mon 23 Dec 2019 15:21
Location: Ukraine

Re: JPEG, high quality or higher quality?

Post by shijan »

"High Quality" is useful for any image. It is better always turn it ON.
Disabled "High Quality" option will reduce chroma sampling and create ugly halo artifacts at colors edges even if slider quality set to 100%.
Image
Image
PhotoLine UI Icons Customization Project: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302
borgo1971
Mitglied
Posts: 134
Joined: Thu 11 Sep 2008 21:03
Location: Tolmezzo (UD) Italia

Re: JPEG, high quality or higher quality?

Post by borgo1971 »

bkh wrote: Fri 20 Jan 2023 15:38 “High quality” turns off chroma subsampling. Makes sense for graphics (avoids colour fringes) but is not that useful for photos because most digital image sensors have Bayer filters.
Do you mean “High quality” turns off... if unchecked? And if I understand correctly, the gist of the speech would be to check it for photos and uncheck it for graphics?
borgo1971
Mitglied
Posts: 134
Joined: Thu 11 Sep 2008 21:03
Location: Tolmezzo (UD) Italia

Re: JPEG, high quality or higher quality?

Post by borgo1971 »

shijan wrote: Fri 20 Jan 2023 16:38 It is better always turn it ON.
OK, this is a little clearer... :D
User avatar
Hoogo
Betatester
Posts: 4039
Joined: Sun 03 Jul 2005 13:35
Location: Mülheim/Ruhr

Re: JPEG, high quality or higher quality?

Post by Hoogo »

Subsampling is a lot like "average color" of 2 adjacent pixels.
Try this in web export. It shows the side effects of average colors, and some ringing in the bare areas if you zoom.
You will hardly find such colors in a photo, unless you add some colorful text to it.
Web export.png
You do not have the required permissions to view the files attached to this post.
----------------
Herr Doktor, ich bin mir ganz sicher, ich habe Atom! /Doctor, doctor, I'm sure, I've got atoms!
borgo1971
Mitglied
Posts: 134
Joined: Thu 11 Sep 2008 21:03
Location: Tolmezzo (UD) Italia

Re: JPEG, high quality or higher quality?

Post by borgo1971 »

Hoogo wrote: Fri 20 Jan 2023 18:26 Try this in web export.
Thanks for the sample. It clears much... but I still have a doubt: in witch case has it sense disable "High Quality"? Playing with your sample seems none...
User avatar
shijan
Mitglied
Posts: 1598
Joined: Mon 23 Dec 2019 15:21
Location: Ukraine

Re: JPEG, high quality or higher quality?

Post by shijan »

borgo1971 wrote: Sat 21 Jan 2023 16:35 but I still have a doubt: in witch case has it sense disable "High Quality"?
In case if you want smaller possible sized jpeg with poor quality and unpredictable artifacts between colors. In most apps this option always enabled and hidden and it is impossible to turn it off.
PhotoLine UI Icons Customization Project: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302
User avatar
russellcottrell
Mitglied
Posts: 254
Joined: Sat 26 Jul 2014 10:13
Location: California

Re: JPEG, high quality or higher quality?

Post by russellcottrell »

borgo1971 wrote: Sat 21 Jan 2023 16:35 Thanks for the sample. It clears much... but I still have a doubt: in witch case has it sense disable "High Quality"? Playing with your sample seems none...
jpg compression is intended for continuous-tone images. They are encoded in the YCbCr color space, which is kind of like a linear version of Lab (simpler math). Remember that the visual impression of sharpness comes almost entirely from the luminance component of an image, so one can often get away with lesser resolution in the color channels (chroma subsampling). This results in smaller file sizes for low-priority images such as thumbnails, or any time that smaller file size is a priority. Sharp-edged graphics should really be saved as pngs or gifs; but if you have to use jpg, subsampling will blur the edges as in the sample.

So to answer your original question: for big pretty pictures or graphics, check High Quality; otherwise leave it off. Then lower the Quallity slider until compression artifacts become unacceptable.
User avatar
Hoogo
Betatester
Posts: 4039
Joined: Sun 03 Jul 2005 13:35
Location: Mülheim/Ruhr

Re: JPEG, high quality or higher quality?

Post by Hoogo »

borgo1971 wrote: Sat 21 Jan 2023 16:35Thanks for the sample. It clears much... but I still have a doubt: in witch case has it sense disable "High Quality"? Playing with your sample seems none...
That sample was totally artificial, I knew that single pixels of opposite color would cause an obvious problem. But It's quite hard to find such a situation in a real photo.

This is a small crop from a photo, still somewhat artificial, as I sharpened and resized to 50%.
If you zoom to 2000% and switch the topmost layer on and off again, you can find some blinking pixels.When you watch that for a while, you may notice that the version with subsampling is a little less saturated here and there, a few green/red/green combos are replaced by just one average color - and that's all.
When I view at 100%, I can't see any difference.
And if I hadn't resized, the picture would be more blurry, colors would change more softly, and the effect would be even smaller.
Subsampling.png
I disable subsampling if I have added some graphic to a photo, like arrows, red text or something like that.
Iirc, in PS compression levels 1-5 are with subsampling, and levels 6-10 are without. At least it was that way 10 years ago.
And it's not simply an on/off thing, subsampling can have more options. You can have full, half or even quarter resolution, in X or/and Y direction.
You do not have the required permissions to view the files attached to this post.
----------------
Herr Doktor, ich bin mir ganz sicher, ich habe Atom! /Doctor, doctor, I'm sure, I've got atoms!
JanH
Mitglied
Posts: 75
Joined: Sun 01 Dec 2019 20:19

Re: JPEG, high quality or higher quality?

Post by JanH »

Re chroma subsampling, there's also an adjacent issue I've recently stumbled across: Namely libjpeg 7 and newer (the library currently in use by Photoline) use a different algorithm for chroma downsampling (while saving an image), as well as especially for upsampling (when opening/decoding an image saved with chroma subsampling).

While the libjpeg developer claims that the new algorithm is mathematically more beautiful and therefore to be preferred, the issue with it is that now (with 4:2:0 subsampling, i.e. a factor of 2 both horizontally and vertically) each subsampled 8x8 chroma block is upsampled back up to 16x16 individually and in isolation, without taking the contents of any of the adjacent chroma blocks into account at all.

The result of that is that you now get additional chroma discontinuities between individual 16x16 blocks in the final decoded image, which become especially noticeable in picture areas that are otherwise fairly smooth (i.e. no big luma discontinuities between adjacent 8x8 blocks, which at lower quality levels are of course unavoidable with JPEG).

While the absolute magnitude of those artefacts isn't extremely large, I still find them to occasionally be noticeable, especially when the source image is of limited resolution and so you have to zoom in a bit, and/or in conjunction with certain artistic image editing workflows, which unfortunately seem to amplify the magnitude of those chroma discontinuities somewhat. So personally I'd still prefer the old chroma upsampling used by libjpeg 6b (which Photoline used to use previously, quite a few versions back), or still in use by libjpeg-turbo.
User avatar
russellcottrell
Mitglied
Posts: 254
Joined: Sat 26 Jul 2014 10:13
Location: California

Re: JPEG, high quality or higher quality?

Post by russellcottrell »

JanH wrote: Sun 22 Jan 2023 13:24 in conjunction with certain artistic image editing workflows
Not trying to be critical, but . . . are you sure you want to use jpgs in an artistic workflow? There is only so much you can do to them no matter how good they are. If you want smooth skies, for example, that you can do major edits to, especially things like histogram eq, you need uncompressed 16-bit up until the very end, when you can maybe get away with distributing high-quality jpgs as a final product.
JanH
Mitglied
Posts: 75
Joined: Sun 01 Dec 2019 20:19

Re: JPEG, high quality or higher quality?

Post by JanH »

I'm aware of that, and better quality images (in the sense of technical image quality) are of course always nicer to work with, but for my specific use case I can't really be all that choosy in that regard.

So while the luma blockiness of JPEG is unavoidable at lower quality levels, it'd be nice if the JPEG decoder didn't also introduce additional chroma blockiness on top (which seems to affect even source images with otherwise quite high JPEG quality levels and little JPEG artefacts luma-wise).
bruce1951
Mitglied
Posts: 416
Joined: Sat 23 Apr 2016 17:03

Re: JPEG, high quality or higher quality?

Post by bruce1951 »

Just re- the jpeg for end use and artistic output. While technically more data, ie larger hi res file, is 'better' it depends on what the end goal is.

I shoot NEFs at their highest setting in my camera. Convert to the highest quality tiffs. Then 'play' with them in PL. The final layers of 'play' are almost always jepgs. So it depends. I always wonder about the constant pursuit of 'perfection' when in reality 99% of the time the average person doesn't know nor care. (I believe starting with the highest quality allows me to drop in quality. It's hard to do it the other way upwards).

FWIW I have had a number of 'artistic' jepg images on covers of internationally renowned magazines. The magazines aren't about photography or art but the editors chose to use my images because they think they appeal to their readers.

I'm all for seeking 'perfection'. But I think us photo 'nerds' over think it at times. :shock: