Create an Anaglyph Image

Problem

You want to create an anaglyph image from a left eye image and a right eye image.

Solution

Anaglyph images are easy to create in Draft.

import Draft
leftEyeImage = Draft.Image.ReadFromFile( "left.jpg" )
rightEyeImage = Draft.Image.ReadFromFile( "right.jpg" )
anaglyphImage = Draft.Image.Anaglyph( leftEyeImage, rightEyeImage, "LSA" )

Discussion

Anaglyph images are composed of two images, the left eye image and the right eye image. The last setting is the anaglyph type. In the above example we used LSA type anaglyph image but we also could have used PS type anaglyph image.

See Also

Draft.Image.Anaglyph()