# Batch polar coordinate conversion

I need to convert many files of the same size to polar projections. This is easy to do in GIMP with the Polar Coordinates plugin (Filters > Distorts > Polar Coordinates). However, I'm not sure how to either automate or batch this process.

I know that it is possible to script the automation and there is a commonly suggested batch processing plug-in called BIMP. However, both options call the "plug-in-polar-coords" procedure which does not act the same way in script as it does in the GIMP GUI. Below is an example:

I need to go from files that look like this (courtesy of Flickr user gadl (Alexandre Duret-Lutz) under CC BY-NC-SA):

...to images that look like this:

Which I've done with these settings in GIMP GUI:

Now I need to figure out how to do this with multiple images. I tried to use BIMP with the manipulation "plug-in-polar-coords" but it does not provide an option to map the image to a circle as in the Polar Coordinates window (i.e. the "To polar" radio button).

And outputs files that look like this:

Any thoughts on how to do this? I would prefer solutions in GIMP but will also accept solutions in Inkscape.

The plug-ins are mostly implementing the Gimp 2.8 GUI. You would just need to set circle depth to 100% and "Polar to rectangular" to "False"

Demonstration: in the Gimp 2.8 UI I get the same output as you with these parameters:

And to get the picture you want I change to these:

To be more complete, using in 2.10 the same API as BIMP:

• Have you actually tried this? For me, it does not produce a circularized image. – et is Sep 24 '20 at 12:47
• I don't use BIMP but it works if I use the same parameters on my Gimp 2.8 copy, and your screenshot doesn't show that you are using these values. See enhanced answer – xenoid Sep 24 '20 at 15:20

So I know next to nothing about Gimp, but you could do this in Imagemagick, which as long as you're able to install, should be as easy as copy&pasting the code into the command line and pressing enter.

cd "path to your input folder"
mkdir "../output"

mogrify \
-path "../output" \
-rotate '180' \
+distort Polar 0 \
-virtual-pixel 'horizontal-tile' \
-background 'black' \
-quality 100 \
-format jpg *


Explanations

• I use imagemagick in my website for basic image upload resizing, I had no idea it could do anything that fancy! I will have to look at that plugin more and see what else it can do. – Alith7 Sep 24 '20 at 13:58