One line of code
For an example of when programming can be a pain in the ass. I spent about three hours today coming up with this one line of code:
convert -resize 310x155 -size 310x155 +swap -gravity center -composite start.jpg background.gif finish.jpg
That line will automatically resize an image to fit inside a 310 pixel wide by 155 pixel high image area with a background image as padding.
It's simple now that I have it, but it was hard to find documentation and examples to get to the end result.
As an example, here's a starting image:
- TODO: Find and replace this image: Player Sample Start - http://www.alanwsmith.com/blog/wp-content/uploads/plr-sample-start.jpg "Player Sample Start"
And after the conversion with a simple black background:
- TODO: Find and replace this image: Player Sample Finish - http://www.alanwsmith.com/blog/wp-content/uploads/plr-sample-finish.jpg "Player Sample Finish"