Hello!
I want to crop a part of an image and after that resize the cropped part of the original image.
i tried the following:
convert -crop 640x269+0+0 -geometry 585
so get 640x269 of the original image and resize to 585 width.
BUT: the resize will be executed before the crop. so it first resizes the original image and than crops the part of the resized.
How can it be achieved to first crop and after the crop resize the cropped part? (within one command if possible)
many thanks
Resize after crop
Re: Resize after crop
This should work:
Code: Select all
convert input -crop 640x269+0+0 +repage -resize x585 +repage output
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Resize after crop
Specifically, you should specify your input image FIRST.
Also I do not recommend the use of -geometry for resizing. Use -resize instead, same arguments.
Also I do not recommend the use of -geometry for resizing. Use -resize instead, same arguments.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Resize after crop
many thanks. that worked perfectly. My problem was that i used it within typo3 library and the typo3 lib function produces the convert command in the follwoing order:
convert params INPUT FRAME OURPUT
and with this order it was not possible.
convert params INPUT FRAME OURPUT
and with this order it was not possible.