Is there a way to rotate an image based upon a mapping in ImageMagick? The problem is similar to displacement mapping however instead of warping & morphing the shape based upon the luma/chroma in a map I want to rotate an image based upon the map.
For instance: If I had a pattern, then applied a chroma/luma map shape to it, it would rotate the pattern and output it based upon the luma/chroma difference from the midpoint (50%).
Like so:
My task is to create a fairly complex set of shapes and map a pattern to them at different angles respective of their chroma/luma.
Would this be some kind of custom plugin I'd have to write or is there a simple way to to this in IM 6?
Thanks very much!
ImageMagick does not come with the functionality you want builtin, but thanks to the
-fx
argument you can write your own.The following command will rotate the source image clockwise by the applied mask:
Fill the rotation map with
#202020
to rotate by 45 degrees for example:Or do sillier stuff (this is fun to play with, actually):
Caveats: