-
-
$image = new Imagick('cyclops.png');
$clone = $image->clone();
- $clone = $image->fximage('p{0,0}');
- $image->compositeImage($clone,imagick::COMPOSITE_DIFFERENCE,0,0);
- $image->modulateImage( 100, 0, 0);
- header( 'Content-Type: image/{$image->getImageFormat()}' );
- echo $image->getImageBlob( );
writeImage('difference.png');
- $image->clear();
- $image->destroy();
- ?>
-
Copy the code
Source image:
Rendering (generated grayscale difference picture):
|