Page 1 of 1

Make image border based on other image using trim?

Posted: 2016-06-10T10:00:00-07:00
by coolperez8
I have two images, one is the original image with a border, and the other is an edited version of the image with the border removed using the -trim command. What I want to do is find the trim settings for the original image (assuming that after the trim it will be the same as the edited version.) and reverse apply them to the modified image. I should end up with a version of the modified image using the border that the original image has, properly positioned and everything.

Re: Make image border based on other image using trim?

Posted: 2016-06-10T10:04:18-07:00
by snibgo
I'm not sure I understand. If you have an image, you can find what it would trim to:

Code: Select all

convert -format %@ info:
The output is in the form WxH+X+Y, which you can use in a "-crop" on the untrimmed image.