I'm a brand new user to this program, and could use some help.
I'm already downloading a series of radar data files from the National Weather Service, merging them to a standard background, then using an AVI constuction program to make a simple loop of about 25 frames.
I'm using a command line within a batch file to merge the two graphics files, then saving them under another name. Works fine.
The problem is, the graphics files I'm downloading are 650X550, and I need to crop them down to 640X480. I would prefer to do this from the center of the picture but I'll take whatever I can get.
On a secondary note, once I get this going, I'll want to crop to an even smaller section of the center of the frames, then save it as 640X480.
I'll be glad to study up on this, but so far the documentation has confused me as all I can figure out how to do is to resize, keeping the aspect ratio, which won't work for my application.
Thanks!
ed
Cropping and not resizing
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00
Re: Cropping and not resizing
to crop the centre, try this:
Pete
Code: Select all
convert input_file -gravity center -crop 640x480+0+0 +repage output_file
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
See my message in this topic for a link to a zip of all the files.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Cropping and not resizing
For beginners, one really good resource is Anthony's examples at:
http://www.imagemagick.org/Usage/
http://www.imagemagick.org/Usage/reference.html
in addition to the IM page at
http://www.imagemagick.org/script/comma ... ptions.php
For crop specific, see http://www.imagemagick.org/Usage/crop/#crop
I also have some tidbits and scripts at
http://www.fmwconcepts.com/imagemagick/index.html
http://www.fmwconcepts.com/imagemagick/ ... /index.php
with some crop examples at:
http://www.fmwconcepts.com/imagemagick/ ... .php#crop1
http://www.fmwconcepts.com/imagemagick/ ... .php#crop2
http://www.imagemagick.org/Usage/
http://www.imagemagick.org/Usage/reference.html
in addition to the IM page at
http://www.imagemagick.org/script/comma ... ptions.php
For crop specific, see http://www.imagemagick.org/Usage/crop/#crop
I also have some tidbits and scripts at
http://www.fmwconcepts.com/imagemagick/index.html
http://www.fmwconcepts.com/imagemagick/ ... /index.php
with some crop examples at:
http://www.fmwconcepts.com/imagemagick/ ... .php#crop1
http://www.fmwconcepts.com/imagemagick/ ... .php#crop2
Re: Cropping and not resizing
Thanks for the suggestions. I'll check up on it. The command line above isn't causing my file to save properly. It's not leaving anything when I run it. I double checked all the parameters, but something isn't working right.
Thanks again.
Thanks again.
Re: Cropping and not resizing
Got it!
Had an error in my directory command.
Thanks again.
Had an error in my directory command.
Thanks again.