I'm looking for a command line program that will perform resizing, etc. on an image.
The only program I know of which does that is Image Magick. It does pretty much anything. The only drawback is that it's incredibly buggy, with the bugs changing with just about every minor version. This makes it very difficult to write software (e.g. scripts) which use IM as the underlieing image processor. See my http://volker.orcon.net.nz/soft/makeimage script for creating and handling archives of images, as well as processing previously archived images for inclusion in documents. It would do exactly what you're looking for. Read the script itself for some mimmicky which you have to expect with different versions of IM... in case you don't have one which works with makeimage, there's one which will in the same place, and you can install it anywhere where it doesn't interfere with the one you might already have. Please let me know any comments you'd like to make...
If you just add a ! after the geometry specification it will, thusly: for image in *.jpg; do
convert $image -geometry 160x120! thumb-$image
This would be a bad thing to do as the appended ! changes the aspect ratio of the image, which is hardly ever something you'd want. If you need an image of a certain size, crop it properly, don't just make it look crappy by jamming the aspect ratio into something. The above makeimage shows how to generate thumbnail-indices of a pile of given images even if they have any size you like. Volker
On Wed, 24 Jan 2001, Volker wrote:
If you just add a ! after the geometry specification it will, thusly: for image in *.jpg; do convert $image -geometry 160x120! thumb-$image This would be a bad thing to do as the appended ! changes the aspect ratio of the image, which is hardly ever something you'd want.
What does the ! do in the above example? Thanks. *************************************************** Powered by SuSE Linux 7.0 Professional KMail 1.0.29.2 Bryan S. Tyson bryantyson@earthlink.net ***************************************************
"Bryan S. Tyson" wrote:
On Wed, 24 Jan 2001, Volker wrote:
If you just add a ! after the geometry specification it will, thusly: for image in *.jpg; do convert $image -geometry 160x120! thumb-$image This would be a bad thing to do as the appended ! changes the aspect ratio of the image, which is hardly ever something you'd want.
This will stretch/squeeze the width to 160 pixels and the height to 120 pixels exactly, even if the image was in a 'portrait' orientation, resulting in a distorted image. If the ! is left out, then the image is scaled *into* a region of that size, making it as large as possible, while still fitting entirely within the specified region, maintaining the aspect ratio. Sorry that isn't very clear ;-) Thanks again to everyone who replied, Chris -- __ _ -o)/ / (_)__ __ ____ __ Chris Reeves /\\ /__/ / _ \/ // /\ \/ / ICQ# 22219005 _\_v __/_/_//_/\_,_/ /_/\_\
participants (3)
-
Bryan S. Tyson
-
Chris Reeves
-
Volker Kuhlmann