-gravity Centre -crop 100x100 no output
Posted: 2017-06-02T22:14:12-07:00
Hi all
I have hundreds of images from time lapse astronomy of Jupiter that I have rotated by different angles to correct for telescope rotation. They are saved as tifs but have different canvas sizes depending on how much they are rotated. Now all I need to do is crop a rectangle from the middle of each to make into a video of Jupiters moons and red spot moving. I have a vbs script that has successfully used IM to rotate the 700 or so images the correct amount but I cannot get the cropping to work properly.
I am using 64 bit windows 10 with ImageMagick 7.0.5-7 x64 2017-05-20
I have experimented with the syntax from the windows command line: (in.tif is a 3508x4492 image)
magick C:\IMtest\in.tif -crop 1280x720 C:\IMtest\out.tif
crops ok but of course gets the top left corner of the original image
What I want is
magick C:\IMtest\in.tif -gravity Center -crop 1280x720 C:\IMtest\out.tif
but I still get the top left corner of the image. -gravity Centre has no effect on the crop.
What am I doing wrong?
Bob
I have hundreds of images from time lapse astronomy of Jupiter that I have rotated by different angles to correct for telescope rotation. They are saved as tifs but have different canvas sizes depending on how much they are rotated. Now all I need to do is crop a rectangle from the middle of each to make into a video of Jupiters moons and red spot moving. I have a vbs script that has successfully used IM to rotate the 700 or so images the correct amount but I cannot get the cropping to work properly.
I am using 64 bit windows 10 with ImageMagick 7.0.5-7 x64 2017-05-20
I have experimented with the syntax from the windows command line: (in.tif is a 3508x4492 image)
magick C:\IMtest\in.tif -crop 1280x720 C:\IMtest\out.tif
crops ok but of course gets the top left corner of the original image
What I want is
magick C:\IMtest\in.tif -gravity Center -crop 1280x720 C:\IMtest\out.tif
but I still get the top left corner of the image. -gravity Centre has no effect on the crop.
What am I doing wrong?
Bob