cvs: pecl /imagick/examples set_image_comment.php

From: Date: Thu, 18 Sep 2003 17:44:34 +0000
Subject: cvs: pecl /imagick/examples set_image_comment.php
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-446@lists.php.net to get a copy of this message
mcmontero Thu Sep 18 13:44:34 2003 EDT Added files: /pecl/imagick/examples set_image_comment.php Log: Added for testing and education. Index: pecl/imagick/examples/set_image_comment.php +++ pecl/imagick/examples/set_image_comment.php <? $handle = imagick_readimage( "./image.jpg" ) ; if ( imagick_iserror( $handle ) ) { $reason = imagick_failedreason( $handle ) ; $description = imagick_faileddescription( $handle ) ; print "handle failed!<BR>\nReason: $reason<BR>\nDescription: $description<BR>\n" ; exit ; } // // When setting a comment, you should clear it first then reset it. // Just adding a comment will append to any existing comment - which // might not be what you want. // imagick_set_image_comment( $handle, NULL ) ; imagick_set_image_comment( $handle, "Hello World!" ) ; if ( !imagick_writeimage( $handle, "./new_image.jpg" ) ) { $reason = imagick_failedreason( $handle ) ; $description = imagick_faileddescription( $handle ) ; print "magick_writeimage() failed<BR>\nReason: $reason<BR>\nDescription: $description<BR>\n" ; exit ; } header( "Location: images_jpg.html" ) ; ?>

« previous php.pecl.cvs (#446) next »