-shave and aspect ratio
Posted: 2018-06-08T15:01:37-07:00
Hello ImageMagic Community,
I'm here with a silly question, fore sure answered already somewhere, sorry for asking again, I cannot find a working solution.
I'm using the package ImageMagick-7.0.7-38-Q16-x64-dll.exe on a Win10Pro-x64.
I cannot manage to have -shave option to preserve original image aspect ratio.
I want to crop a border around the image of a certain number of pixels, I want to specify how may pixel to remove for width (or height) and I want ImageMagik to calculate how many pixel to remove for height (or width).
I'm using the following command line:
convert orig.jpg -shave 50 shaved.jpg
With an orig.jpg of 8920x3222, I always obtain a shaved.jpg = 8820x3122 which is a crop of -100x-100 which is not preserving the aspect ratio.
I would like to obtain either 8820x3186 (crop of -100x-36) or 8643x3122 (crop of -277x-100)
Whatever I've tried I always get the same crop for width and height which alter the aspect ratio.
I would appreciate your patient help.
Kinds Regards,
EFE.
I'm here with a silly question, fore sure answered already somewhere, sorry for asking again, I cannot find a working solution.
I'm using the package ImageMagick-7.0.7-38-Q16-x64-dll.exe on a Win10Pro-x64.
I cannot manage to have -shave option to preserve original image aspect ratio.
I want to crop a border around the image of a certain number of pixels, I want to specify how may pixel to remove for width (or height) and I want ImageMagik to calculate how many pixel to remove for height (or width).
I'm using the following command line:
convert orig.jpg -shave 50 shaved.jpg
With an orig.jpg of 8920x3222, I always obtain a shaved.jpg = 8820x3122 which is a crop of -100x-100 which is not preserving the aspect ratio.
I would like to obtain either 8820x3186 (crop of -100x-36) or 8643x3122 (crop of -277x-100)
Whatever I've tried I always get the same crop for width and height which alter the aspect ratio.
I would appreciate your patient help.
Kinds Regards,
EFE.