I got roped into doing the Twitter side of this, using a bunch of images the communications team got from the national LWV.
The problem is, the images are square, 1500x1500 pixels. Turns out Twitter won't display square images: according to most references I found, it crops any image you tweet to 600x335 (16:9).
So here I have all these images that don't make sense when people see them on their Twitter stream. So how do I add black borders so they'll be the right size to make Twitter happy?
I certainly don't want to edit 31 images (plus I expect there are eventually 31 more coming that will have Spanish captions).
Fortunately, there's ImageMagick. Here's how you convert a square image to some other size, filling the extra space with black:
convert -background black -gravity center input-image.jpg -resize 600x335 -extent 600x335 output-image.jpg
Thank goodness for labor saving command-line apps!
[ 14:13 Sep 17, 2020 More tech | permalink to this entry | ]