imagick help needed

From: Date: Wed, 16 Apr 2003 12:08:17 +0000
Subject: imagick help needed
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4875@lists.php.net to get a copy of this message
Hi there, could you please help, I have a requirement to allow my users to view the latest weather information for the UK. unfortunately this information is only alaivable as a FAX or a TIF. Fine, I thought PHP_imagick could deal with this. the problem I have is that the paer documentation doesn't seem to match the project example files. For example in the convert1.php example file: <? $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 ; } if ( !imagick_writeimage( $handle, "./new_image.gif" ) ) { $reason = imagick_failedreason( $handle ) ; $description = imagick_faileddescription( $handle ) ; print "imagick_writeimage() failed<BR>\nReason: $reason<BR>\nDescription: $description<BR>\n" ; exit ; } print "Done!<BR>\n" ; ?> There is made use of a imagick_readimage() command/method but the documentation shows imagick_read() and the correct method there is also no mention of the imagick_create() mathod in the example files, although it appears in the documentation. when I try the methods used in the documentation i get syntax errors ( unknown method ). I reveted to trying to use imagick_readimage() but this method doesn't seem to support readinga file from a URL, unlike the other. My requirements are fairly simple: 1) Read the image from ftp://weather.noaa.gov/fax/PPVA.TIF [ This will always bee the same location.]. 2) Rotate the image 90 degress anti-clockwise. [not required for 'Printer Freindly' version]. 3) Scale the image if required to fit on a 800x600 monitor [notrequired for 'Printer Freindly' version]. 4) Convert the image to JPG. 5) Dump the image to the browser. I was wondering if you could show me a code snippet that would work for this. ? Please There are a number of other files requireing this same conversion but 'Fix One - Fix All'. Finally, is it possible to use a variable in place of the litteral string in the read methods. This would enable me to store the filenames in a database and to serve them via php_imagick from there.

« previous php.pear.general (#4875) next »