PHP Classes
Icontem

File: example.php


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Stefan Saftescu  >  Stereo Anaglyph Images  >  example.php  
File: example.php
Role: Example script
Content type: text/plain
Description: The example file.
Class: Stereo Anaglyph Images
Generate a stereo image from two source images
 

Contents

Class file image Download
<?
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>";
}
?>

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products