Using -extent with set amount
Posted: 2012-11-16T03:59:18-07:00
I'm trying to use the extent command to increase the canvas height by a set amount, when the image height is variable.
The below would ideally increase the canvas height by 100 pixels each time regardless of the original height of the image:
convert in.jpg -resize 595 -extent 595x([Photo.PixelYDimension]+100) out.jpg
The [Photo.PixelYDimension] is part of the program I'm using, which will correctly retrieve the height of the image. The above command will shift the image 100 pixels left. Is there a clever way to use brackets for this or a workaround?
Any help much appreciated.
The below would ideally increase the canvas height by 100 pixels each time regardless of the original height of the image:
convert in.jpg -resize 595 -extent 595x([Photo.PixelYDimension]+100) out.jpg
The [Photo.PixelYDimension] is part of the program I'm using, which will correctly retrieve the height of the image. The above command will shift the image 100 pixels left. Is there a clever way to use brackets for this or a workaround?
Any help much appreciated.