Rotate / wrap image around a circle ( center ) ?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
myicq
Posts: 29
Joined: 2012-04-11T04:23:21-07:00
Authentication code: 8675308

Rotate / wrap image around a circle ( center ) ?

Post by myicq »

Given that I have an image on a file, what would be a strategy to wrap that image around the center of a circle ?

Example: I have an image with text "Circumference", and would like a result like this

http://mypages.iit.edu/~smart/nortber/image001.gif

The actual application is not text, but can be different things.

If possible I would like to use both left and right rotation, and specify start / end angle.

I know I need some kind of distortion to the image, but can't figure out which one.

Thanks for any input and help.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Rotate / wrap image around a circle ( center ) ?

Post by snibgo »

In the example you give, each letter is placed undistorted at the appropriate position and angle. You could do this with annotate, for each letter separately. Or with SVG.

For more general distortions of images into arcs, see http://www.imagemagick.org/Usage/distor ... r_distorts
snibgo's IM pages: im.snibgo.com
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Rotate / wrap image around a circle ( center ) ?

Post by Bonzo »

Correct me if I am wrong but I think the OP wants the blue arrow as well. arc or polar may do what you want?

An example from my website I did a few years ago:

Image

Code: Select all

<?php  
$cmd = "$input -matte -virtual-pixel transparent".  
" -distort polar \"100,20 133,100 180,270\" ";  
exec("convert $cmd polar.png"); 
  ?> 
  
As snibgo said check out Anthony's site: http://www.imagemagick.org/Usage
Post Reply