Jpeg compression: turn off sampling for better quality

You think you have found a bug ? You've got a suggestion to modify PhotoFiltre ? /
Ĉu vi opinias vi trovis malbonadĵon ? Ĉu vi havas sugeston por modifi PhotoFiltre ?

Modérateur : Modérateurs

Corak
Nouveau(elle)|Nouveau|Nouvelle
Nouveau(elle)|Nouveau|Nouvelle
Messages : 13
Inscription : 29 janv. 2012 18:24
Version de PhotoFiltre : 7
Système d'exploitation : Microsoft Windows XP SP3
Processeur : AMD64 3200+
Mémoire RAM : 762mb

Jpeg compression: turn off sampling for better quality

Message par Corak »

Again, creating separate thread about JPEG compression, because the subj really deserves it.
About Jpeg compression used by library you are using in Photofiltre now
.
It uses by default YUV 122 component sampling, It's fast, the result jpeg file will be smaller, BUT IT'S too lossy for colors (especially red ones), as result - the image will be much blurry and lost many details. So even 100% quality in this mode - great loss of true colors. I myself use only AcdSee v3.0 for Jpeg compression, There I can chose the YUV better compressions method - YUV111. So If I chose 100% quality - The result photo should have NO changes at all.
Image
Antonio, I recommend you to replace the Jpeg library you are using (OR if there are YUV 111 sampling option - to add it as option when compression percents asked)... If there are no such funtion - it's better to find another Jpeg compressor library.
Here you can look for example of compression quality loss:
http://coraksoft1.narod.ru/temp/YUV111/15okubok.png
(Original lossless Image in PNG)

http://coraksoft1.narod.ru/temp/YUV111/ ... yuv122.jpg
(Compressed 90% with YUV122 sampling, great loss of colors, 30% less file size, some blurring)

http://coraksoft1.narod.ru/temp/YUV111/ ... yuv111.jpg
(Compressed 90% with YUV111 sampling, no loss of colors)

Found some thread about this:
http://www.breezesysforum.co.uk/forum/a ... t-114.html
So real deal I think is to turn off downsampling in jpeg method.

Here's also (Jpeg sub sampling / chroma sub-sampling):
http://www.cerious.com/help8sp1/jpeg_sub_sampling.html
http://users.wfu.edu/matthews/misc/jpg_ ... maSub.html
http://www.ece.ucdavis.edu/cerl/Reliabl ... /jpeg.html
Antonio
Administrateur(trice)|Administrateur|Administratrice
Administrateur(trice)|Administrateur|Administratrice
Messages : 12739
Inscription : 28 oct. 2003 22:49
Contact :

Re: Jpeg compression: turn off sampling for better quality

Message par Antonio »

I use Delphi 7 (pascal) and lot of open source lib are C or C++. For JPEG, I use the native Jpeg.dcu lib and this option is not available
Corak
Nouveau(elle)|Nouveau|Nouvelle
Nouveau(elle)|Nouveau|Nouvelle
Messages : 13
Inscription : 29 janv. 2012 18:24
Version de PhotoFiltre : 7
Système d'exploitation : Microsoft Windows XP SP3
Processeur : AMD64 3200+
Mémoire RAM : 762mb

Re: Jpeg compression: turn off sampling for better quality

Message par Corak »

Antonio a écrit :I use Delphi 7 (pascal) and lot of open source lib are C or C++. For JPEG, I use the native Jpeg.dcu lib and this option is not available
Here's alternative, found there downsample option, and seems it can be disabled:
http://www.dev-center.de/header/libjpeg
http://files.opengl24.de/header/libJPEG.zip
Antonio
Administrateur(trice)|Administrateur|Administratrice
Administrateur(trice)|Administrateur|Administratrice
Messages : 12739
Inscription : 28 oct. 2003 22:49
Contact :

Re: Jpeg compression: turn off sampling for better quality

Message par Antonio »

thanks, i will test this lib (but not this month :oops: )
Corak
Nouveau(elle)|Nouveau|Nouvelle
Nouveau(elle)|Nouveau|Nouvelle
Messages : 13
Inscription : 29 janv. 2012 18:24
Version de PhotoFiltre : 7
Système d'exploitation : Microsoft Windows XP SP3
Processeur : AMD64 3200+
Mémoire RAM : 762mb

Re: Jpeg compression: turn off sampling for better quality

Message par Corak »

Thanks anyway! ^_^ You are the Best! You made Most useful photoeditor in the world :3

Also found better version option of libjpeg (libjpeg turbo - fastest optimized version of it):
https://code.google.com/p/delphi-libjpeg-turbo/
https://delphi-libjpeg-turbo.googlecode ... gTurbo.zip
Répondre