- ImageMagick-7.0.6-0-Q16-x64 - Windows 10
What is the best way to process an animated gif to produce a 3d anaglyph? My current multi-step process works but I think it may have redundancies / processor-intensive. I'm looking to simplify the code if possible:
1. magick convert "filepath[0-2]" -sigmoidal-contrast 10,25% -coalesce filename.png
(description - above line of code splits .gif into frames, processes each frame and saves into separate folder as .png file)
2. magick convert filename-0.png -channel r -separate -roll +20+0 ( +channel filename-0.png -separate -delete -3 ) +channel -combine filename-0.png
(description - above line of code processes first frame into anaglyph and overwrites itself)
3. magick convert filename-1.png -channel r -separate -roll +20+0 ( +channel filename-1.png -separate -delete -3 ) +channel -combine filename-0.png
(description - above line of code processes second frame into anaglyph and overwrites itself)
4. magick convert filename-2.png -channel r -separate -roll +20+0 ( +channel filename-2.png -separate -delete -3 ) +channel -combine filename-0.png
(description - above line of code processes third frame into anaglyph and overwrites itself)
5. magick convert -delay 15 filename-0.png filename-1.png filename-2.png filename-1.png -loop 0 filename.gif
(description - above line of code reassembles frames 0,1,2,1 into a looping boomerang animation with a 15/100 sec timing and saves as .gif)
Haha, there's gotta be an easier way!
Is it possible to use either the above code or the 'composite <filepath> -stereo +x+y' code to process each frame without separating the gif and then reassemble back into an animation?
Animated Anaglyph
-
- Posts: 6
- Joined: 2017-06-23T22:07:21-07:00
- Authentication code: 1151
Animated Anaglyph
Last edited by cantilever on 2017-06-24T10:51:16-07:00, edited 1 time in total.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Animated Anaglyph
I have moved this post to the Users forum, since it is about the use of ImageMagick and not esoteric image processing.