unexpected default quality in imagemagick

Replies:

Parents:

  • None.
After posting to my travel blog [1] yesterday for the first time
in a while I checked the total size of the images I included
inline and found it to be a whopping 6 MB; I investigated why and
found that the quality setting on all my image variants
(*-med.jpg *-sm.jpg etc) was way too high: 99% or 100% or so.

I generate these variants using a couple additional scripts [2]
that use ImageMagick's convert program to do the actual conversion,
and I expected its default quality level to be reasonable but after
checking the documentation I see the quality level is based on
the quality of the input image, which is apparently pretty high
when shooting with canon's superfine level of compression.

I updated make_variant [2] to use more sensible quality levels,
and modified it to strip image metadata from the smallest
variants (*-sm/tn/sq.jpg files), preserving only the date/time
fields and adding copyright and comments fields a la:

   Copyright 2008 Gerald Oskoboiny, http://impressive.net/photos

   For more info about this image, licensing and technical details, see:
   http://impressive.net/people/gerald/2008/10/30/18-14-21-sm.html

These changes combined make my *sq.jpg images 75% smaller than
before, and reduced the size of the images inlined in my recent
blog post from 6 MB to 1.6 MB.

I can't believe I didn't notice this quality setting thing before...
I thought the file sizes were that big due to embedded metadata.

[1] http://impressive.net/people/gerald/blog/
[2] http://impressive.net/people/gerald/software/photo/source/make_variants
   http://impressive.net/people/gerald/software/photo/source/make_variant
   (no longer usable as-is by others because it now has a bunch
   of stuff like my name and URIs hardcoded... if anyone else uses
   this let me know and I'll add some config options)

--
Gerald Oskoboiny <[email protected]>
http://impressive.net/people/gerald/

Re: unexpected default quality in imagemagick

Replies:

Parents:

On Saturday 08 November 2008, Gerald Oskoboiny wrote:
> [1] http://impressive.net/people/gerald/blog/
> [2] http://impressive.net/people/gerald/software/photo/source/make_variants

This URL is 404 .

These are the options I use to generate Web images and thumbnails:

for f in *.jpg;
do
  nice convert -strip -resize "700x600>" \
  -quality 70 \
  -comment "%c Copyright 1996-2008 http://goatee.net/" -antialias -pointsize 12\
  -font 'helvetica' \
  -fill '#999999' -gravity SouthEast \
  -draw 'text 10,10 " 2008 http://goatee.net/"' \
  $f ./images/$f
  nice convert -strip -resize "160x120" -quality 60  -resize "160x120"  $f ./images/thumbs/$f;
done

Re: unexpected default quality in imagemagick

Replies:

  • None.

Parents:

* Joseph Reagle <[email protected]> [2008-11-10 08:28-0500]
> On Saturday 08 November 2008, Gerald Oskoboiny wrote:
> > [2] http://impressive.net/people/gerald/software/photo/source/make_variants
>
> This URL is 404 .

oops, sorry, those should have been:

[2] http://impressive.net/software/photo/source/make_variants
   http://impressive.net/software/photo/source/make_variant

(As a rule I always cut and paste URIs to avoid this problem, but
the networking here sucks so I skipped it this time.)

> These are the options I use to generate Web images and thumbnails:

I use another script [3] to add a visible copyright notice in
some cases, e.g. for uploading to facebook; sample output:
http://www.facebook.com/album.php?aid=180212&l=39387&id=858660153

My text is slightly more obnoxious than yours because I want it
to be legible even if the images are scaled down a bit.

I have another script that does bulk uploads to facebook [4];
it calls add_watermark before uploading.

[3] http://impressive.net/software/photo/source/add_watermark
[4] http://impressive.net/people/gerald/2008/03/upload_to_facebook
   http://www.facebook.com/apps/application.php?id=11891229337

--
Gerald Oskoboiny <[email protected]>
http://impressive.net/people/gerald/

HURL: fogo mailing list archives, maintained by Gerald Oskoboiny