I have a list of MANY questions regarding ImageMagick and was wondering if anyone could recommend a good book that goes over the basics. I am not a programmer, I am not skilled with the command line but I am not afraid of it either. I have used imagemagick a bit and find it very helpful. I know that I am only scratching the surface of what can be done with this tool and would like to explore more. I have many questions and I am sure that a good reference book would go a long way toward answering them.
One such question is this: I have a folder with about 10,000 images of different orientations (profile, landscape, 192x128, 499x500, etc). I need to create 60x60 thumbnails so the images all have to be resized so that the shortest side is 60 and then cropped so that the longer side is now 60. It is not important how the cropping is done, I would prefer that it crop from the center, cropping equal amounts from the top and bottom or left and right (does that even make sense?). I would also love to add slightly rounded corners.
Any thoughts on where I might find a good tutorial for this and better yet, a good beginners reference book for ImageMagick as a whole?
Thanks,
Todd
Good intro book to ImageMagick?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Good intro book to ImageMagick?
All kinds of examples at http://www.imagemagick.org/Usage/
see resizing and cutting and bordering links
for resizing the smaller dimension use -resize or -thumbnail and use the ^ option.
see http://www.imagemagick.org/script/comma ... ptions.php
especially -resize
see resizing and cutting and bordering links
for resizing the smaller dimension use -resize or -thumbnail and use the ^ option.
see http://www.imagemagick.org/script/comma ... ptions.php
especially -resize
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Good intro book to ImageMagick?
Two books are listed and linked on http://www.imagemagick.org/script/sitemap.php under Getting Help or at http://www.imagemagick.org/script/index.php
Re: Good intro book to ImageMagick?
I appreciate the advise regarding using the ^ option, but it does not seem to be working. I have a bunch of images at 420x279 and I would like them all to be 60x60 thumbnails; since I do not want a top/bottom or left/right border filling in the shorter side I would need the image cropped. I am not really concerned with how the image is cropped, cropping from the center would be fine. When I run:
The images fit in the 60x60 constraint; however, there are borders on the short side (which I was expecting. If I run:
I get:
This seems to be the command that I need although I obviously have the syntax wrong. Does the ^ option work with -thumbnail? I got the same error there also.
Thanks again for the help,
Todd
Code: Select all
mogrify -path /home/tparks/Desktop/images/thumbnails -thumbnail 60x60 '*.JPG'
Code: Select all
mogrify -path /home/tparks/Desktop/images/thumbnails -resize 60x60^ '*.JPG'
Code: Select all
mogrify: invalid argument for option `60x60^': -resize.
Thanks again for the help,
Todd
Re: Good intro book to ImageMagick?
1. I read the Packt book and found it interesting although the code examples contain a lot of errors.
2. ^ may not work depending on you Imagemagick version and what system etc. you are using.
Post more information on how you are running the code and what version you are using.
2. ^ may not work depending on you Imagemagick version and what system etc. you are using.
Post more information on how you are running the code and what version you are using.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Good intro book to ImageMagick?
For thumbnails see IM Examples on Thumbnails. It goes through all this.
http://www.imagemagick.org/Usage/thumbnails/
the -thumbnail operator is exactly like -resize but with some extra stuff to make it work better for generating SMALL thumbnail images.
http://www.imagemagick.org/Usage/thumbnails/
the -thumbnail operator is exactly like -resize but with some extra stuff to make it work better for generating SMALL thumbnail images.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/