creating smallest filesize

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
jenik

creating smallest filesize

Post by jenik »

Hi Guys,

I have trouble with resizing small thumbnail of bibberst images for my web:

exammple: http://fototest.mracek.org/list.php?addr=Screensawer

The thumbnail have approximately 20-30KB !! Is very big !
Photoshop make 6KB pictore. This is very good.
Can you help me, what I make bad ??

You can downalod this image : http://fototest.mracek.org/Screensawer/ ... G_0024.jpg
Image
23KB and compres using imagemagic.

My command line is:
convert -verbose -quality 75 -density 72 -depth 8 -resize 159x159 -gravity Center -crop 106x106+0+0 {} small/{} | echo {}
for example.

Thank you for any idea !

Jan
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: creating smallest filesize

Post by fmw42 »

IM 6.6.3.10 Q16 (HDRI) Mac OSX tiger


convert IMG_0024.jpg -thumbnail 159x159 \
> -gravity Center -crop 106x106+0+0 +repage \
> -density 72 -quality 75 -depth 8 IMG_0024_thumb.jpg

identify IMG_0024_thumb.jpg
IMG_0024_thumb.jpg JPEG 106x106 106x106+0+0 8-bit DirectClass 2.88KB 0.000u 0:00.019

2KB file size

see correct syntax at http://www.imagemagick.org/Usage/basics/#cmdline
jenik

Re: creating smallest filesize

Post by jenik »

dear fmw42,

wow, your tip help me a lot !
I looked to many pages at last 2 days and this option I never found.
Thank you very much.
regards, Jan
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: creating smallest filesize

Post by fmw42 »

Part of your problem may have been syntax order. Part was not getting rid of the headers and profiles (which you could do with -strip -resize rather than -thumbnail) and part was not adding +repage to remove the virtual canvas.

see

http://www.imagemagick.org/Usage/basics/#cmdline
http://www.imagemagick.org/Usage/crop/#crop_repage
http://www.imagemagick.org/script/comma ... #thumbnail
Post Reply