Page 1 of 1
Posted: 2006-12-02T13:34:23-07:00
by Bonzo
The way I do it is:
Code: Select all
exec("/usr/local/bin/convert cmyk.tif -colorspace gray gray.tif ");
Some php examples at
www.rubblewebs.co.uk/imagemagick
Posted: 2006-12-05T12:27:41-07:00
by Bonzo
I found you can use relative paths OK rather than absolute ones. Also I have found that using ../../www/ etc. causes a problem as ImageMagick interperates it as something else.
If you want to use something like ../../www/ put it into a variable instead and use the variable in the exe comand.
Code: Select all
$image_in = "../../var/www/test1.jpg ";
$image_out = "../../var/www/test2.jpg";
exec("/usr/bin/convert $image_in $image_out");
If the code is in the same directory this should work.
Code: Select all
exec("/usr/bin/convert test1.jpg test2.jpg");
Posted: 2006-12-19T22:56:25-07:00
by anthony
I thing the original user may have been taking about the "imagick" PECL interface not the command line.
The Only example I have however is just a basic load and output version
Code: Select all
<?
$handle = imagick_readimage( getcwd() . "/animated.gif" ) ;
if ( imagick_iserror( $handle ) )
{
$reason = imagick_failedreason( $handle ) ;
$description = imagick_faileddescription( $handle ) ;
print "handle failed!<BR>\nReason: $reason<BR>\nDescription: description<BR>\n" ;
exit ;
}
print "Number of frames in image: " . imagick_getlistsize( $handle ) . "<BR>\n" ;
?>
Posted: 2006-12-19T23:18:37-07:00
by monsters
not be a jerk, this section is for magickwand questions, your questions are just imagemagick + php questions
hope you found your answers though.