Location: PHPKode > scripts > Stereo Anaglyph Images > stereo-anaglyph-images/example.php
<?
require_once("stereo.class.php");
$instance = new StereoImage();
$instance->setImages("left.jpg", "right.jpg"); 
//the left image is the image that is seen by the eye with the red lens (usualy the left eye)
//the right image is the image that is seen by the eye with the blue lens (usualy the right eye)
$instance->loadImages();
//it takes about 13 seconds for a 1 MP JPEG image to be processed and about 33 seconds for a 2.5 MP PNG image to be processed
$stereoIMG = & $instance->createStereoImage();
if($stereoIMG)
{
	//header("Content-type: image/png");
	imagepng($stereoIMG, "stereo.png");
	@imagedestroy($stereoIMG);
} else {
	foreach($instance->errors as $error) echo $error . "<br>";
}
?>
Return current item: Stereo Anaglyph Images