Centering Content when filling whitespace in image.
Posted: 2012-08-24T14:49:57-07:00
So i have a set of chess pieces I'm pulling out of a modeling application.
I'd like to be able to crop them into their individual chess pieces.
Because they aren't sized uniformly, its difficult to crop with image magick and get the size of each image perfectly.
The images come out to about 105x140, which i have to resize to 160x160. (not stretching the image, just filling in the area, similar to Canvas in photoshop)
Anyways, I'm trying to see if I can center the content inside of the image when I fill in this area to make it 160x160.
Tried the -gravity center but that doesn't see to be the exact thing I need.
Any thoughts, I might have to rethink this approach :-\
I'd like to be able to crop them into their individual chess pieces.
Because they aren't sized uniformly, its difficult to crop with image magick and get the size of each image perfectly.
The images come out to about 105x140, which i have to resize to 160x160. (not stretching the image, just filling in the area, similar to Canvas in photoshop)
Anyways, I'm trying to see if I can center the content inside of the image when I fill in this area to make it 160x160.
Tried the -gravity center but that doesn't see to be the exact thing I need.
Any thoughts, I might have to rethink this approach :-\