Re: [Gimp-user] Why does saves as JPG default to quality 85?

2012-03-24 Thread Liam R E Quin
On Fri, 2012-03-23 at 17:17 +0100, Olivier wrote:
> The quality rate of JPEG is not a percentage, simply a rate between 0 and 100.

A number in the range 0 to 100 is actually by definition a
percentage ;-)

GIMP tries to detect the compression that was used for the original
image and uses those settings if they're known.

The GIMP numbers are *not* the same as for PhotoShop - 75% in gimp is
not the same as 75% in photoshop.

> To my knowledge, the suggested quality rate is a part of the
> photograph. My camera suggests 90, my daughter's camera suggests 93,
> and I always decrease it to 85, or export to PNG.

I get 97% suggested with my Canon EOS camera.

You should always save to a lossless format such as PNG if you might
need to work on the image again in the future - every time you load and
save a JPEG file the quality is reduced and information is lost.

Liam

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/

___
gimp-user-list mailing list
gimp-user-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] Why does saves as JPG default to quality 85?

2012-03-24 Thread Olivier
2012/3/23 Liam R E Quin :
> On Fri, 2012-03-23 at 21:52 +0100, Olivier wrote:
>
>> Considering the quality rating in JPEG as a percentage would mean that
>> a quality equal to 100 would be perfect, i.e. no loss at all.
> Nonsense. A "quality" of 100% means you have chosen 100 out of a
> possible 100. "per cent" means "out of 100" in Latin. It says nothing
> about secondary values. A value of 75% means 75% of the way from 0 to
> the maximum allowed value of 100. I agree that popular usage is to infer
> more than is stated from such an assertion. Note that in general (but
> not in this case) percentages can be greater than 100.

A percentage is a way of expressing a ratio. 20% means the same as
20/100 or 1/5. It's used to express how large/small one quantity is,
relative to another quantity. Here, what is the other quantity?

In degrees centigrade, the temperature of liquid water ranges from 0
to 100. Does that mean that water at a temperature of 30 degrees is
30%? 30% of what?

Notice that most descriptions of the quality factor of JPEG carefully
avoid speaking of percentages. See for example
http://docs.gimp.org/2.8/en/gimp-images-out.html#idp11992944 or
http://en.wikipedia.org/wiki/JPEG.

-- 
Olivier Lecarme
___
gimp-user-list mailing list
gimp-user-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] Why does saves as JPG default to quality 85?

2012-03-23 Thread Ofnuts

On 03/24/2012 12:50 AM, Patrick Shanahan wrote:

* Ofnuts  [01-01-70 12:34]:

On 03/23/2012 09:20 PM, Liam R E Quin wrote:

every time you load and
save a JPEG file the quality is reduced and information is lost.

Not true... if nothing changes the algorithm is stable (decoded values get
re-encoded to the same values). You lose quality if you recompute something
different; changed settings, changed pixel values, changed 8x8 boundaries
(image crop).

Well, it is true and very easily proven.

Open a jpg file and save it.  Then open the just saved file and save it
again at the save compression level.  Then do a diff or simply check the
file sizes

I wrote this Perl script a while ago:

--
# Runs successive JPEG saves on an image to evaluate JPEG losses
# Author: Ofnuts


$dotradius=2;
$defaultsteps=10;
$defaultquality=92; # default quality for "convert"

$steps=$defaultsteps;
$quality=$defaultquality;
$dotcolor="white\n"; # change this if the top of the image is too clear

$argc=@ARGV;
usage() if ($argc > 2);
if ($argc>1)
{
$steps=$ARGV[1];
usage() if ($steps!~/^\d{1,3}$/);
}
if ($argc>0)
{
$quality=$ARGV[0];
usage() if ($quality!~/^(\d{1,2}|100)$/);
}

print "Running $steps steps at JPEG quality $quality\n";

for ($step=0;$step<$steps;$step++)
{
$in=substr("000".$step,-3);
$out=substr("000".($step+1),-3);

# dot coordinates
$cxc=2*$dotradius*($step+1);
$cxr=$cxc+$dotradius;
$cyc=$cyr=$dotradius*2;

print "Step ".($step+1)." of $steps\n";
system("convert step$in.jpg -fill white -draw \"circle 
$cxc,$cyc,$cxr,$cyr\" step$out.png");

system("convert step$out.png -quality $quality step$out.jpg");
unlink("step$out.png");
system("compare step000.jpg step$out.jpg diff0-$out.jpg");
system("compare step001.jpg step$out.jpg diff1-$out.jpg");
}

sub usage {
print "\n";
print "Usage: $0 [quality [steps]]\n";
print "\n";
print "Where:\n";
print "   - 'quality' is the quality factor of the JPEG 
compression \n";

print "  (1-100, 100 is best, default is $defaultquality)\n";
print "   - 'steps' is the number of successive steps to 
perform\n";

print " (default is $defaultsteps)\n";
print "\n";
print "Produces:\n";
print "   - successive saves of a JPEG image to test JPEG-induced 
losses.\n";
print "   - compare images with the original file and the 1st JPEG 
save.\n";

print "\n";
print "Starts from a 'step000.jpg' file in the current directory.\n";
exit 1;
}
-

My observations & conclusions were:

I wrote this short utility to check the usual claim that JPEG image 
quality degrades with the successive saves.


This utility saves an image multiple times, each time after making a 
minor and very localized change to it. To avoid suspecting that 
"convert" does it cleverly to minimize losses, the image is saved to a 
lossless format (PNG) and then converted from PNG to JPEG. The resulting 
image is then compared with the original image (diff0-*), and with the 
result of the first step (diff1-*) (red pixels are the changed pixels).


Now for the interesting part. This dispels some misunderstanding:

-  In all cases, most of the damage occurs on the 1st save. The 
subsequent saves show very little difference with the first step, even 
at very low quality settings. Save steps beyond the third do not add any 
loss... The JPEG algorithm is "stable", and the decoded values 
eventually get re-encoded the very same way.


- The amount of "damage" is very low at reasonable quality settings (75 
or above). To get an experimental "feel":


 -- load the original image and the result of any step in a photo 
editing software that support layers

 -- obtain the "difference" between the two layers
 -- the resulting image seems a very uniform black to the naked eye
 -- use a "treshold" transform and lower the treshold value until 
recognizable pattersn appear (besides the marker dots at top left)
 -- At 90 quality, using the result of the 10th step, the first white 
pixel shows up at 20 (artefact at lower border due to picture height not 
a multiple of 8), the first pixel in the image a 11.
 -- At 75 quality, the difference produces a recognizable ghost of the 
linnet. The treshold method shows that most differences are below 20.


Disclaimers:

- Global image changes (white balance, contrast, colors) are a whole 
different matter, not adressed here (though, IMHO, the problem with JPEG 
in these operations is more the 8-bit-per-channel limit it puts on the 
picture that in turn leads to a comb-like histogram)


- The original JPEG uses 1:1:1 subsampling and so does 'convert' by default.

-- Unless reproduced by different means, these results only apply when 
the same software is used throughout.


-

My step000.jpg is here: http://i.imgur.com/iWwXP.jpg


Re: [Gimp-user] Why does saves as JPG default to quality 85?

2012-03-23 Thread Patrick Shanahan
* Ofnuts  [01-01-70 12:34]:
> On 03/23/2012 09:20 PM, Liam R E Quin wrote:
> >every time you load and
> >save a JPEG file the quality is reduced and information is lost.
> Not true... if nothing changes the algorithm is stable (decoded values get
> re-encoded to the same values). You lose quality if you recompute something
> different; changed settings, changed pixel values, changed 8x8 boundaries
> (image crop).

Well, it is true and very easily proven.

Open a jpg file and save it.  Then open the just saved file and save it
again at the save compression level.  Then do a diff or simply check the
file sizes.

-- 
(paka)Patrick Shanahan   Plainfield, Indiana, USA  HOG # US1244711
http://wahoo.no-ip.orgPhoto Album: http://wahoo.no-ip.org/gallery2
http://en.opensuse.org   openSUSE Community Member
Registered Linux User #207535@ http://linuxcounter.net
___
gimp-user-list mailing list
gimp-user-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] Why does saves as JPG default to quality 85?

2012-03-23 Thread Ofnuts

On 03/23/2012 09:20 PM, Liam R E Quin wrote:

every time you load and
save a JPEG file the quality is reduced and information is lost.
Not true... if nothing changes the algorithm is stable (decoded values 
get re-encoded to the same values). You lose quality if you recompute 
something different; changed settings, changed pixel values, changed 8x8 
boundaries (image crop).

___
gimp-user-list mailing list
gimp-user-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] Why does saves as JPG default to quality 85?

2012-03-23 Thread Owen

> I've noticed that every time I save an image in GIMP as JPG the
> quality
> slider bar defaults to 85. Even though I keep changing it to 75. If
> this
> numeric value is a Photoshop equivalent like other GIMP features, then
> 85
> is probably a wasted effort. The research* I'm aware of* (note
> emphasis)
> says that the quality in JPG images saved at a level above 75 is
> "theoretical." In other words, the increased quality is there in
> technical
> terms, but imperceptible to the human eye. Comments?



Maybe this manual entry would help.

http://docs.gimp.org/2.8/en/gimp-images-out.html#gimp-using-fileformats-export-dialog



 --
Owen

___
gimp-user-list mailing list
gimp-user-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] Why does saves as JPG default to quality 85?

2012-03-23 Thread Mark Bourne

Keith Purtell wrote:

I suppose the reason I didn't go the preview route is that I'm a bit
annoyed that GIMP doesn't remember that I've changed that setting to 75
every single time I've made a JPG. Now that you suggest it, I could run
a test and see if GIMP's apparent 85 default really does/doesn't make a
significant difference in file size compared to the number I prefer. If
the two yield similar results, I can just accept the fact that GIMP
won't adapt to a user's work pattern (g, don't like that idea) and
let it save all JPG files at 85.
Keith


On GIMP 2.6.10 on Windows, I see two buttons near the bottom of the 
dialogue where the JPEG quality is set - "Load Defaults" and "Save 
Defaults". If I set the quality to 75% and click "Save Defaults", that 
comes up as the default next time I go to save a new JPEG. If working on 
an existing file, the dialogue initially shows the settings used when 
that file was last saved, but clicking "Load Defaults" quickly restores 
the saved default settings (75%). Those buttons presumably save and 
restore the "Advanced Options" as well, but I haven't looked in that 
much detail.


Mark.

___
gimp-user-list mailing list
gimp-user-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] Why does saves as JPG default to quality 85?

2012-03-23 Thread Chris Mohler
On Fri, Mar 23, 2012 at 4:31 PM, Liam R E Quin  wrote:
> Maybe it would be less confusing to make the numbers go from 0 to 255 or
> something. Then 255 would be 100% of the allowed value.

I can hear the wailing and gnashing of users now: "I followed the
tutorial exactly and saved the final JPEG at 85 quality but now it
looks terrible!!!1!" ;)

And then the brains exploding when explaining that 85 is 33% of 255.

Chris
___
gimp-user-list mailing list
gimp-user-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] Why does saves as JPG default to quality 85?

2012-03-23 Thread Keith Purtell
I suppose the reason I didn't go the preview route is that I'm a bit
annoyed that GIMP doesn't remember that I've changed that setting to 75
every single time I've made a JPG. Now that you suggest it, I could run a
test and see if GIMP's apparent 85 default really does/doesn't make a
significant difference in file size compared to the number I prefer. If the
two yield similar results, I can just accept the fact that GIMP won't adapt
to a user's work pattern (g, don't like that idea) and let it save all
JPG files at 85.

Keith

(PS Cool sig)

On Fri, Mar 23, 2012 at 4:34 PM, Johnny Rosenberg wrote:

>
> Why not just look at the preview yourself and make your own opinion?
>
> My experience is that at high numbers (maybe 90 and above, depends on
> the image), every little change means a big change in file size but a
> little visible change in the image. On the other hand, at low numbers,
> say 50 or lower, this also depends on the image, every little change
> means a big change in image quality but only a little change in file
> size. Just fiddle with the numbers yourself, looking at the preview at
> a reasonable zoom level, and you will get close to the optimal
> compromise between file size and image quality.
>
>
> Kind regards
>
> Johnny Rosenberg
> ジョニー・ローゼンバーグ
>
>
___
gimp-user-list mailing list
gimp-user-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] Why does saves as JPG default to quality 85?

2012-03-23 Thread Liam R E Quin
On Fri, 2012-03-23 at 21:52 +0100, Olivier wrote:

> Considering the quality rating in JPEG as a percentage would mean that
> a quality equal to 100 would be perfect, i.e. no loss at all.
Nonsense. A "quality" of 100% means you have chosen 100 out of a
possible 100. "per cent" means "out of 100" in Latin. It says nothing
about secondary values. A value of 75% means 75% of the way from 0 to
the maximum allowed value of 100. I agree that popular usage is to infer
more than is stated from such an assertion. Note that in general (but
not in this case) percentages can be greater than 100.

Yes, many people recommend 85% but 85% in gimp (or 85, if you prefer) is
not at all the same as 85% in PhotoShop.

Maybe it would be less confusing to make the numbers go from 0 to 255 or
something. Then 255 would be 100% of the allowed value.

Best,

Liam

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org

___
gimp-user-list mailing list
gimp-user-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] Why does saves as JPG default to quality 85?

2012-03-23 Thread Olivier
2012/3/23 Liam R E Quin :
> On Fri, 2012-03-23 at 17:17 +0100, Olivier wrote:
>> The quality rate of JPEG is not a percentage, simply a rate between 0 and 
>> 100.
>
> A number in the range 0 to 100 is actually by definition a
> percentage ;-)

That's a weird definition of a percentage!

Considering the quality rating in JPEG as a percentage would mean that
a quality equal to 100 would be perfect, i.e. no loss at all.
Unfortunately, 100 means "very good", and 90 means "very good" too.
None of them is perfect, and the size of the file increases much
faster than the quality. This explains why many people recommend 85,
which is a good compromise.

Olivier Lecarme
___
gimp-user-list mailing list
gimp-user-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] Why does saves as JPG default to quality 85?

2012-03-23 Thread Liam R E Quin
On Fri, 2012-03-23 at 17:17 +0100, Olivier wrote:
> The quality rate of JPEG is not a percentage, simply a rate between 0 and 100.

A number in the range 0 to 100 is actually by definition a
percentage ;-)

GIMP tries to detect the compression that was used for the original
image and uses those settings if they're known.

The GIMP numbers are *not* the same as for PhotoShop - 75% in gimp is
not the same as 75% in photoshop.

> To my knowledge, the suggested quality rate is a part of the
> photograph. My camera suggests 90, my daughter's camera suggests 93,
> and I always decrease it to 85, or export to PNG.

I get 97% suggested with my Canon EOS camera.

You should always save to a lossless format such as PNG if you might
need to work on the image again in the future - every time you load and
save a JPEG file the quality is reduced and information is lost.

Liam

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org

___
gimp-user-list mailing list
gimp-user-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] Why does saves as JPG default to quality 85?

2012-03-23 Thread Olivier
The quality rate of JPEG is not a percentage, simply a rate between 0 and 100.

To my knowledge, the suggested quality rate is a part of the
photograph. My camera suggests 90, my daughter's camera suggests 93,
and I always decrease it to 85, or export to PNG.

Olivier Lecarme
___
gimp-user-list mailing list
gimp-user-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] Why does saves as JPG default to quality 85?

2012-03-23 Thread Steve Kinney
On 03/23/2012 10:39 AM, Keith Purtell wrote:

> I've noticed that every time I save an image in GIMP as JPG the
> quality slider bar defaults to 85. Even though I keep changing it to
> 75. 

That's odd.  Every version of the GIMP I have ever used defaulted to
the legacy Photoshop value of "75" for JPG save quality.  I usually
use 85%.  Prompted by your comments I went looking through the
config files of my local installation and did not find a variable
that I could tweak to change the default from 75 5o 85.

> If this numeric value is a Photoshop equivalent like other GIMP
> features, then 85 is probably a wasted effort. The research*I'm
> aware of* (note emphasis) says that the quality in JPG images saved
> at a level above 75 is "theoretical." In other words, the increased
> quality is there in technical terms, but imperceptible to the human
> eye. Comments?

The compression artifacts in JPG images saved at quality 100 are
usually not visible in images viewed at 1:1 scale.  At 50, they are
usually very obvious.  Between these values, a lot depends on the
content of the image.  A cloudscape or misty forest scene may look
OK at lower values, but an image with lots of strong, adjacent
contrasts eg sharp edges, shows lots of visible artifacts at higher
compression rates.  Over the years I have settled on 85 as my own
preferred compression setting for most JPG images.

Lossy compression is a trade off between resolution and file size.
Like the default 75 DPI resolution GIMP inherits from Photoshop, the
JPG quality setting of 75 is a legacy of obsolete technology - 75
DPI monitors hooked to computers with dial up network connections
and 500 MB hard drives.  Today the vast majority of monitors have 96
DPI resolution, nearly all network connections are at least 128
kbps, and it's hard to buy a hard drive with less than 100 GB of
storage.  To me it makes sense to adjust media files that live in
this environment accordingly.

75 DPI resolution is "only a suggestion" and does not degrade an
image, but lower JPG quality settings do make a real difference.
Information is lost and artifacts are introduced.  In many instances
the difference between JPG quality of 75 and 85 is visible on modern
monitors.  The savings in file size between JPG quality of 85 and 75
is not large enough, IMO, to justify the small but visible loss of
resolution.  YMMV and lots of people are perfectly happy with the
default setting of 75 for web images.

:o)

Steve




___
gimp-user-list mailing list
gimp-user-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] Why does saves as JPG default to quality 85?

2012-03-23 Thread phanisvara das
On Fri, 23 Mar 2012 20:09:37 +0530, Keith Purtell   
wrote:



I've noticed that every time I save an image in GIMP as JPG the quality
slider bar defaults to 85. Even though I keep changing it to 75. If this
numeric value is a Photoshop equivalent like other GIMP features, then 85
is probably a wasted effort. The research* I'm aware of* (note emphasis)
says that the quality in JPG images saved at a level above 75 is
"theoretical." In other words, the increased quality is there in  
technical

terms, but imperceptible to the human eye. Comments?



i don't get 85% as default every time. in my observation, the default  
changes with the image, i.e., lots of detail or lots of same or similar  
colors, etc.


when i prepare a jpg for the web, i go down with the quality until i see a  
real difference at 100% zoom; often that's only a fraction of the default  
setting. on the other hand, if the jpg is intended for printing by  
someone, i usually leave the default, which often is above 90% with my  
images.


--
phani.
___
gimp-user-list mailing list
gimp-user-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-user-list


[Gimp-user] Why does saves as JPG default to quality 85?

2012-03-23 Thread Keith Purtell
I've noticed that every time I save an image in GIMP as JPG the quality
slider bar defaults to 85. Even though I keep changing it to 75. If this
numeric value is a Photoshop equivalent like other GIMP features, then 85
is probably a wasted effort. The research* I'm aware of* (note emphasis)
says that the quality in JPG images saved at a level above 75 is
"theoretical." In other words, the increased quality is there in technical
terms, but imperceptible to the human eye. Comments?

Keith
___
gimp-user-list mailing list
gimp-user-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-user-list