Hi there,
I use the following code to rotat a gif image:
convert imageframe.gif -background none -rotate $rotation -transparent white overlay_images/tmpImages/rotation_{$tempimage}_{$i}.gif"
Now what i do in short, i make 4 frames with this and then merge the 4 on a certain background and then merge the whole into one animated gif and the result you wil get is :
non rotated animation on a background:
http://fotobling.fotopocket.nl/view.php?id=42
rotated using imagemagick on a background:
http://fotobling.fotopocket.nl/view.php?id=41
As you can see the product quality of the rotated version is lower then without a rotated gif it seems that the palletes of the 4 merged gifs are different somehow, is there some method i can use to stop the pixels from changing color ?
Thanks in advance!
Merging rotated gif onto background gives color differences
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Merging rotated gif onto background gives color differences
Use a common colortable with or without dithering via -map
see http://www.imagemagick.org/Usage/quantize/#map
see http://www.imagemagick.org/Usage/quantize/#map
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Merging rotated gif onto background gives color differences
rotateing does produce a much larger color map. That is the nature of any image distortion be it rotates or resizes. You will need to
fix the color name if that is what you need.
fix the color name if that is what you need.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Merging rotated gif onto background gives color differences
How would i change the color name 'automated' ?
If you take a look at http://fotobling.fotopocket.nl visitors can upload a picture and add the animated gifs on top of it, in a flash environment, when they hit save the image should be created (rotating any rotated gifs, then merging it all together into a animated version)
Is there a way to get all the colors the same for each frame? maybe get the colortable for the first frame, and then add it to the next frame ?
If you take a look at http://fotobling.fotopocket.nl visitors can upload a picture and add the animated gifs on top of it, in a flash environment, when they hit save the image should be created (rotating any rotated gifs, then merging it all together into a animated version)
Is there a way to get all the colors the same for each frame? maybe get the colortable for the first frame, and then add it to the next frame ?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Merging rotated gif onto background gives color differences
fommes wrote:How would i change the color name 'automated' ?
If you take a look at http://fotobling.fotopocket.nl visitors can upload a picture and add the animated gifs on top of it, in a flash environment, when they hit save the image should be created (rotating any rotated gifs, then merging it all together into a animated version)
Is there a way to get all the colors the same for each frame? maybe get the colortable for the first frame, and then add it to the next frame ?
see -map and related discussion
http://www.imagemagick.org/Usage/quantize/#map
The first image can be the colortable for all the rest of the image when using -map
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Merging rotated gif onto background gives color differences
Especially note +map for animations. That will ensure a command global color map is used rather thna individual (slightly different) local color maps, even for the same given color map.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Merging rotated gif onto background gives color differences
Thanks alot fmw42 and anthony i'll try it today!
Re: Merging rotated gif onto background gives color differences
Hi!
I got it working now, i -map the rotated gif with the colortable of the original version of the gif, then i merge it onto the background
result:
http://fotobling.fotopocket.nl/view.php?id=58
Thanks for all the help!
I got it working now, i -map the rotated gif with the colortable of the original version of the gif, then i merge it onto the background
result:
http://fotobling.fotopocket.nl/view.php?id=58
Thanks for all the help!