Tuxedo on wrote...
| I have a simple shell procedure that batch converts original jpeg's in=20
| various sizes into thumbnail copies maximum 75 pixels in height:
|
| for i in *.jpg
| do convert -quality 70 -geometry x75 $i ../img/`basename $i .jpg`.jpg;
| done
|
| I'd like it that when a resulting thumb becomes less than 100 pixels=20
| wide to add padding on left and right in some solid color, making the=20
| jpeg including the solid area exactly 100 pixels wide.
|
| If however a resulting thumb becomes wider than 100 pixels, I would=20
| then then like it cropped on the left and right edges so it becomes=20
| exactly 100 pixels wide.
|
| This is as if placing the resulting 75 pixes tall image in the center=20
| of a canvas which is exactly 100x75 pixels, and cropping the resulting=20
| thumb only if necessary.
|
| Exactly how can this be done? Which Image Magick methods and tools are=20
| suitable for this? Any examples would be greatly appreciated.
|
See IM Examples, Thumbnails, Padding Out Images...
http://www.imagemagick.org/Usage/thumbnails/#pad
It gives about 4 different techniques in various ways, depending on your
version on IM.
Anthony Thyssen ( System Programmer ) <[EMAIL PROTECTED]>
-----------------------------------------------------------------------------
My girlfriend's just an object to me. Unfortunately, there is some
information hiding, but thankfully, she's fairly encapsulated, nicely
modular, and has a very well defined interface!
-- Frank Fabbrocino <[EMAIL PROTECTED]>
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users