What would it look like to visualize a day of media trends around the world, combining the thematic trend analysis infographics for 50 television news channels into a single montage that makes it clear which shared stories are dominating headlines across countries and which local stories are garnering the most attention in each country? Here we use Gemini 3.1 to quickly interactively generate the ImageMagick command line code to turn a directory of infographics into just such a montage (medium resolution montage / high resolution montage).
Below you can see the sequence of prompts used to generate the montage:
i have a directory of jpg images named "20260316.CHANNELNAME.cover.jpg". i want to make a collage image of them in a grid that features the "CHANNELNAME" part of their filename in text above each. show me a simple way to do this in debian on the command line ... i don't want a script, i just want a couple of one-liners ... perfect. add a command that checks the number of images and makes a grid that has equal number of rows and columns. also, make the background black and white channel name text
Which ultimately yielded the following code:
rm collage.jpg
n=$(ls -1 *.jpg | wc -l | awk '{s=sqrt($1); print (s==int(s)) ? s : int(s)+1}'); time montage $(ls *.jpg | awk -F'.' '{print "-label", $2, $0}') -background black -fill white -pointsize 18 -geometry 1000x+15+15 -tile ${n}x${n} collage.jpg
gcloud storage cp ./collage.jpg gs://[MYBUCKET]
You can view the medium-resolution montage where each poster has been reduced to 500 pixels tall or the high-resolution montage where they are each 1000 pixels tall.
