I have many images, each roughly 10000 x 40 pixels, visualizing graphs that are mostly chains with a few spurs and other "decorations." (They're made by piping OpenFST's fstdraw through Graphviz's dot).
From the command line, how can I automatically brute-force rearrange one of these skinny images to readably fit on a 1920x1080 screen? For instance, split the image into pieces at most 1920 pixels long, and then stack them vertically.
Something using ImageMagick's convert -crop in a loop?
Here's what fails:
Replacing
dotwith one of its sistersneato,fdp, etc. At leastfdpoutputs a non-skinny image, but only because the skinny graph randomly twists and overlaps like a frickin' chromosome. The image is still mostly white, the labels are unreadably tiny, and the structure is just a squiggle.Adding the option
ratio=1todot's input merely pads 10000x40 to 10000x10000.