Programatically create little planet / tiny planets from 360 photos

This content was originally posted to the Trek View blog on 2020-06-19. Some of the information found in it may now be outdated.

Prep

I’ll use the image GSAF5431.JPG (5760x2880) to demonstrate

Using pure imagemagick (easier, worse output)

Install imagemagick.

magick GSAF5431.JPG -distort Arc 360 GSAF5431-magick-tinyplanet.jpg

Produces an image 4714x4714;

Note that the drawback to polar coordinate technique (distort Arc) is that the centre of the image becomes squashed inwards.

Using Fred imagemagick scripts (one additional step required, better output)

Download the shell script here.

sh tinyplanet GSAF5431.JPG GSAF5431-freds-magick.jpg

Produces an image 2882x2882;

See the man (me) in the middle is now fully visible, and less distorted.