Rotating changes colors

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
clownpleco

Rotating changes colors

Post by clownpleco »

I have a very simple 5 color gif file. I want to create 360 images (using -rotate {values of 0 to 360). Most of the rotations average out some of the pixels. I need to keep the same pixel values, even if data is lost or duplicated.

I've tried several options, and I'll be honest, I don't understand the following web page (using affline or fx):

http://www.cit.gu.edu.au/~anthony/graph ... ition_maps

Is there a concrete example telling me how to do this???

Thanks

Rick
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Post by Bonzo »

If you are using php you could use the example code on this page and see what happens http://www.rubblewebs.co.uk/imagemagick/animation.php
This actualy creating an animation but you could modify the code. Also the center point of the image moves; if you look back over my posts you should see a reply from anthony about this.

NOTE: THIS CODE COULD SLOW DOWN THE SERVER SPECIALY IF YOU ARE GENERATING 360 IMAGES.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

For rotated images you the last example in the section on rotate.
http://www.cit.gu.edu.au/~anthony/graph ... ts/#rotate

Don't use distortion images unless you are doing something more complex.

I used this same technique in a script demonstrated and linked to in the last section on the distorts page. It generates an animation ,but you could have it save multiple images instead too.
http://www.cit.gu.edu.au/~anthony/graph ... animations
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply