Search code examples
imagemagick

How can I complete a full circle polar distort with ImageMagick CLI?


I am using ImageMagick (Windows v7.1.1-15) CLI and want to create a polar image from a rectangular map image.

Here is the command I'm using, but you'll see that it is missing a small arc. Any recommendations to create a complete polar distort?

magick convert cart.jpg -virtual-pixel HorizontalTile -background Black -distort Polar 0  polar.jpg

Rectangle Polar

I tried to adjust the start and end angle, but did not get the complete polar distort as expected.


Solution

  • You have a white border and a black outline. If you remove them, you get closer in Imagemagick. Adjust as desired

    Input:

    enter image description here

    magick map.jpg -fuzz 25% -trim +repage -shave 2x2 +repage -virtual-pixel HorizontalTile  -background Black   -distort Polar 0   polar_map.jpg
    

    enter image description here

    In IM 7, use magick, not magick convert.