[PHP] Imagick morphImages
HI, *Imagick::morphImages* ( int $number_frames ) http://php.net/manual/en/imagick.morphimages.php Would someone please reply with how to add the two images for this? None of the search results come back with anything other than the auto-generated info on the imagick class. Many Thanks! -- Leonard Burton, N9URK leonardbur...@gmail.com The prolonged evacuation would have dramatically affected the survivability of the occupants.
FW: [PHP] Imagick morphImages
I found the following code here: https://gist.github.com/mywebpower/1035026 It appears 2 years old though ... ?php /** * GD+Imagick = morphing * * @param string $fromPath * @param string $toPath * @param string $outPath * @param integer $frame OPTIONAL * @param integer $delay OPTIONAL */ function morph($fromPath, $toPath, $outPath, $frame=10, $delay=1) { $im = new Imagick(); $gf = imagecreatefromjpeg($fromPath); $gt = imagecreatefromjpeg($toPath); $sz = getimagesize($toPath); $wkImg = '__work__.jpg'; for($i=1; $i=$frame; $i++) { imagecopymerge($gf, $gt, 0,0, 0,0, $sz[0],$sz[1], (100/$frame)*$i); imagejpeg($gf, $wkImg); $tmp = new Imagick($wkImg); $tmp-setFormat('gif'); $tmp-setImageDelay($delay*100); $im-addImage($tmp); $tmp-destroy(); unlink($wkImg); } $im-writeImages($outPath, true); $im-destroy(); imagedestroy($gf); imagedestroy($gt); } // ex morph('a.jpg', 'b.jpg', 'out.gif', 10, 0.1); ? Hope it helps, Jen -Original Message- From: Leonard Burton [mailto:leonardbur...@gmail.com] Sent: Monday, March 11, 2013 1:26 PM To: php-general@lists.php.net Subject: [PHP] Imagick morphImages HI, *Imagick::morphImages* ( int $number_frames ) http://php.net/manual/en/imagick.morphimages.php Would someone please reply with how to add the two images for this? None of the search results come back with anything other than the auto-generated info on the imagick class. Many Thanks! -- Leonard Burton, N9URK leonardbur...@gmail.com The prolonged evacuation would have dramatically affected the survivability of the occupants. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Imagick::newPseudoImage function
Anyone out there using the Imagick::newPseudoImage function to create radial gradient images? The documentation at http://us.php.net/manual/en/function.imagick-newpseudoimage.php is lacking. When I try using Imagick::newPseudoImage to create a radial gradient, this error appears in the Apache HTTP error log: PHP Fatal error: Uncaught exception 'ImagickException' with message 'Unable to create new pseudo image: radial-gradient:#FF-#FF' in /var/www/html/energy/scripts/rg.php:6\nStack trace:\n#0 /var/www/html/energy/scripts/rg.php(6): Imagick-newpseudoimage(150, 150, 'radial-gradient...')\n#1 {main}\n thrown in /var/www/html/energy/scripts/rg.php on line 6 According to http://www.imagemagick.org/script/formats.php (search for radial): RADIAL_GRADIENT...Gradual radial passing from one shade to another...Returns a rendered radial gradient image using the specified image size. Specify the desired shading as part of the filename (e.g. radial-gradient:red-blue or radial-gradient:#F00-#00F). Yes, I've tried using RADIAL_GRADIENT instead of radial-gradient and every other combination I could think of. My PHP Script: ?php // Create a new imagick object. $image = new Imagick(); // A new image with radial gradient fading from red to white, 150 by 150 pixels. $image-newPseudoImage(150,150,'radial-gradient:#FF-#FF'); // Set the image format to PNG. $image-setImageFormat('png'); // Output the image. header(Content-Type: image/png); echo $image; ? PHP: 5.1.6 OS: RHEL 5 Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Imagick question
Brady Mitchell wrote: I'm sure it can be done, but without seeing your code we can't really help. Easily solved. From the PHP manual (http://www.php.net/manual/en/function.imagick-roundcorners.php): ?php $image = new Imagick(); $image-newPseudoImage(100, 100, magick:rose); $image-setImageFormat(png); $image-roundCorners(5,3); $image-writeImage(rounded.png); ? That produces a nice transparent cornered image, as it should. However, try saving it as a JEPG instead. Set the image format to 'jpeg' and write it out as 'rounded.jpg' and you'll notice the corners are now black. I know JPEG doesn't support transparency, that's fine. What I want is to change the black to white instead. -- A -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Imagick question
On Thu, 2009-11-05 at 12:22 -0700, Ashley M. Kirchner wrote: Brady Mitchell wrote: I'm sure it can be done, but without seeing your code we can't really help. Easily solved. From the PHP manual (http://www.php.net/manual/en/function.imagick-roundcorners.php): ?php $image = new Imagick(); $image-newPseudoImage(100, 100, magick:rose); $image-setImageFormat(png); $image-roundCorners(5,3); $image-writeImage(rounded.png); ? That produces a nice transparent cornered image, as it should. However, try saving it as a JEPG instead. Set the image format to 'jpeg' and write it out as 'rounded.jpg' and you'll notice the corners are now black. I know JPEG doesn't support transparency, that's fine. What I want is to change the black to white instead. -- A Fill the background with white before you create the corners. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Imagick question
Ashley Sheridan wrote: Fill the background with white before you create the corners. Well, I tried that, with no luck. This is my actual code: $width = 150; $height = 150; $im = new Imagick('original/' . $filename); $im-thumbnailImage($width, $height, true); $im-sharpenImage(50, 1); $im-setImageBackgroundColor('white'); $im-roundCorners(5, 5, 7); $im-setImageFormat('jpeg'); $im-writeImage('thumbnail/' . $filename); $im-clear(); $im-destroy(); -- H | It's not a bug - it's an undocumented feature. + Ashley M. Kirchner mailto:ash...@pcraft.com . 303.442.6410 x130 IT Director / SysAdmin. 800.441.3873 x130 Photo Craft Imaging . 2901 55th Street http://www.pcraft.com . . .. Boulder, CO 80301, U.S.A. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Imagick-setImageFormat()
Hello all. I'm pretty new to Imagick. I'm merely attempting the examples on the PHP site (http://php.net/manual/en/imagick.examples-1.php), but I'm having some issues. I'm attempting the reflection of an image example and when I attempt to: $canvas-setImageFormat(png); I get an error that reads: Fatal error: Uncaught exception 'ImagickException' in /home/www/pc4/ image.php:67 Stack trace: #0 /home/www/pc4/image.php(67): Imagick- setimageformat('png') #1 {main} thrown in /home/www/pc4/image.php on line 67 Note that I CAN do this: $canvas-setImageFormat(gif); I'm running Fedora Core 8. My first thought was that my machine doesn't support PNG. So I checked for libpng, and it's there and up to date. I've looked at my http error logs and I've google'd to no avail. Do you have any thoughts on why I can't use the png format? Thanks in advance, ~Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] imagick raises error
Hi, Currently I'm reading below page: http://www.imagemagick.org/Usage/api/#php When I tried imagick example of it, php raised error about function : Imagick::readimage() . Fatal error: Non-static method Imagick::readimage() cannot be called statically in /usr/local/www/apache22/data/php/im/imagick_hello.php on line 2 I don't know what is the cause. How can I solve this? I'm running latest IM 6.4.7 with imagick 2.2.1, php 5.2.8 in Freebsd 7.0, all built from ports. Thanks and regards, below is whole example of above site: ?php $handle = imagick_readimage( getcwd() . image.jpg ); if ( imagick_iserror( $handle ) ) { $reason = imagick_failedreason( $handle ) ; $description = imagick_faileddescription( $handle ) ; print Handle Read failed!BR\n; print Reason: $reasonBR\n; print Description: $descriptionBR\n; exit ; } header( Content-type: . imagick_getmimetype( $handle ) ); print imagick_image2blob( $handle ); ? -- View this message in context: http://www.nabble.com/imagick-raises-error-tp21088873p21088873.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] imagick raises error
vuthecuong schreef: Hi, Currently I'm reading below page: http://www.imagemagick.org/Usage/api/#php When I tried imagick example of it, php raised error about function : Imagick::readimage() . Fatal error: Non-static method Imagick::readimage() cannot be called statically in /usr/local/www/apache22/data/php/im/imagick_hello.php on line 2 it looks like there was a functional interface as well as an OO interface for imagick ... the functions themselves seem to live on but the underlying extension only seems to work via OO interface. the docs only describe an OO interface for imagick extension: http://php.net/manual/en/book.imagick.php see the user notes on this page for an example on how to use the OO interface: http://php.net/manual/en/function.imagick-readimage.php I don't know what is the cause. How can I solve this? I'm running latest IM 6.4.7 with imagick 2.2.1, php 5.2.8 in Freebsd 7.0, all built from ports. Thanks and regards, below is whole example of above site: ?php $handle = imagick_readimage( getcwd() . image.jpg ); if ( imagick_iserror( $handle ) ) { $reason = imagick_failedreason( $handle ) ; $description = imagick_faileddescription( $handle ) ; print Handle Read failed!BR\n; print Reason: $reasonBR\n; print Description: $descriptionBR\n; exit ; } header( Content-type: . imagick_getmimetype( $handle ) ); print imagick_image2blob( $handle ); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] IMagick confusion
This code (invoked by an IMG tag on a page) will return the image which is then displayed: ?php $picture = $_GET['PICTURE']; /* need to get filetype from querystring picture= */ header('Content-type: image/jpg'); $image = new IMagick($picture); echo $image; ? ... but this code does not (even when the value of $orientation is 1): ?php $picture = $_GET['PICTURE']; /* need to get filetype from querystring picture= */ header('Content-type: image/jpg'); $image = new IMagick($picture); $orientation = $image-getImageProperty(exif:Orientation) switch($orientation) { case 1: /* normal */ break; case 2: /* mirror */ break; case 3: /* 180 anti-clockwise */ break; case 4: /* mirror + 180 anti-clockwise */ break; case 5: /* mirror + 90 anti-clockwise */ break; case 6: /* 90 anti-clockwise */ break; case 7: /* mirror + 270 anti-clockwise */ break; case 8: /* 270 anti-clockwise */ $image-rotateImage(new ImagickPixel(), 90); break; case default: break; } echo $image; ? I'm confused. Can someone please shed light on what's happening? Thanks, Stan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] IMagick confusion
First of all .. always be careful with tainted data. Like when you $picture = $_GET['PICTURE']; be aware that this could be a security risk one day an ImageMagick exploid is circulating. At the first glance I saw a syntactical thingy that might cause problems .. case default: break; In PHP switch for default this way ... switch ($statement) { case 1: // do something break; default: //do something else } then you forgot a semicolon $orientation = $image-getImageProperty(exif:Orientation); // --- ; added after that I got your script running. Note: At least turn error reporting on during debugging etc. All error-reporting behavior can be modified at any level, so if you are on a shared host or otherwise unable to make changes to files such as php.ini, httpd.conf, or .htaccess, simply ... ini_set('error_reporting', E_ALL | E_STRICT); ini_set('display_errors', 'OFF'); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Imagick installation issue
Ok, I was having trouble posting to the 'php-general@lists.php.net' mailing list directly. All my posts are bounced. I found this forum and so I will continue here since I still have had no luck and my entire project hangs on some sort of graphic support. The server admin told me GD support is not possible at this point so I am trying to install imagick on the server. Regrading imagemagick-dev. I am not sure what that is. I haven't seen any info on it while researching imagemagick. In regards to ImageMagick itself, I did the following... tar xvfz ImageMagick.tar.gz cd ImageMagick-6.4.1 ./configure make make install /usr/local/bin/convert logo: logo.gif logo.gif is created This is how I created imagick (instructions from http://us.php.net/manual/en/install.pecl.phpize.php)... cd imagick-2.1.1 phpize ./configure make make install I didn't see anything that set off a red flag in the the output messages, but then again I didn't understand 1/2 of the output messages. Other than a lack of errors, I am not sure what to expect from make. bornplaydie-2 wrote: I am trying to install ImageMagick and Imagick on my server. I am running the following... Apache version 1.3.37 (Unix) PHP version 5.2.1 I have installed the following... ImageMagick 6.4.1 Imagick 2.1.1 I ran the convert logo test for ImageMagick and it works fine. However imagick.so will not load. I confirmed the so file is in the correct extensions dir specified by extension_dir in php.ini. I also confirmed this is the correct php.ini file. My php test file looks like this... if (!extension_loaded('imagick')) { dl(imagick.so); if (!extension_loaded('imagick')) { echo PHP IMagick will not load!; exit; } } $image = new Imagick('test.jpg'); $image-thumbnailImage(100, 0); $image-writeImage('test-thumb.jpg'); header(Location: test.html); /* display the thumbnail */ But I get the following error... Warning: dl() [function.dl http://pimpmysnaps.com/function.dl]: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/imagick.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/imagick.so: undefined symbol: zend_ce_iterator in /home/pimpms/public_html/test.php on line 4 PHP IMagick will not load! This is the output for ldd -r for imagick.so. There are a number of dependencies that I don't recognize and I think there may be other packages that need to be installed. undefined symbol: zend_ce_iterator (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: core_globals (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: executor_globals (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: zval_add_ref (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: OnUpdateBool (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: zend_hash_internal_pointer_reset_ex ... (and the list goes on) Any help would be appreciated. Thanks, Mark _ It’s easy to add contacts from Facebook and other social sites through Windows Live™ Messenger. Learn how. https://www.invite2messenger.net/im/?source=TXT_EML_WLH_LearnHow -- View this message in context: http://www.nabble.com/Imagick-installation-issue-tp17711827p18029226.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Imagick installation issue
BornPlayDie wrote: Yes, I forgot to mention, I did restart apache. Date: Sat, 7 Jun 2008 20:21:26 -0400 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [PHP] Imagick installation issue CC: php-general@lists.php.net On 6/7/08, BornPlayDie [EMAIL PROTECTED] wrote: I am trying to install ImageMagick and Imagick on my server. I am running the following... Apache version 1.3.37 (Unix) PHP version 5.2.1 I have installed the following... ImageMagick 6.4.1 Imagick 2.1.1 I ran the convert logo test for ImageMagick and it works fine. However imagick.so will not load. I confirmed the so file is in the correct extensions dir specified by extension_dir in php.ini. I also confirmed this is the correct php.ini file. My php test file looks like this... if (!extension_loaded('imagick')) { dl(imagick.so); if (!extension_loaded('imagick')) { echo PHP IMagick will not load!; exit; } } $image = new Imagick('test.jpg'); $image-thumbnailImage(100, 0); $image-writeImage('test-thumb.jpg'); header(Location: test.html); /* display the thumbnail */ But I get the following error... Warning: dl() [function.dl http://pimpmysnaps.com/function.dl]: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/imagick.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/imagick.so: undefined symbol: zend_ce_iterator in /home/pimpms/public_html/test.php on line 4 PHP IMagick will not load! This is the output for ldd -r for imagick.so. There are a number of dependencies that I don't recognize and I think there may be other packages that need to be installed. undefined symbol: zend_ce_iterator (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: core_globals (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: executor_globals (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: zval_add_ref (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: OnUpdateBool (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: zend_hash_internal_pointer_reset_ex ... (and the list goes on) Any help would be appreciated. Thanks, Mark _ It's easy to add contacts from Facebook and other social sites through Windows Live™ Messenger. Learn how. https://www.invite2messenger.net/im/?source=TXT_EML_WLH_LearnHow Have you tried restarting apache? its usually required if you've made changes What system are you on? Don't they have a package manager (apt, yum, ports, etc...)? This should take care of all dependencies. -Shawn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Imagick installation issue
This is the output for ldd -r for imagick.so. There are a number of dependencies that I don't recognize and I think there may be other packages that need to be installed. undefined symbol: zend_ce_iterator (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: core_globals (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: executor_globals (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: zval_add_ref (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: OnUpdateBool (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) How did you create the imagick.so file? Did you reconfigure php? What configure command (and arguments) did you use? Did you get any errors when you ran configure or make? Normally when you try to build a module like this you need the -dev or -devel or -headers package (ie imagemagick-dev or -devel or -headers depending on how they decided to name it). Do you have that installed? -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Imagick installation issue
I am trying to install ImageMagick and Imagick on my server. I am running the following... Apache version 1.3.37 (Unix) PHP version 5.2.1 I have installed the following... ImageMagick 6.4.1 Imagick 2.1.1 I ran the convert logo test for ImageMagick and it works fine. However imagick.so will not load. I confirmed the so file is in the correct extensions dir specified by extension_dir in php.ini. I also confirmed this is the correct php.ini file. My php test file looks like this... if (!extension_loaded('imagick')) { dl(imagick.so); if (!extension_loaded('imagick')) { echo PHP IMagick will not load!; exit; } } $image = new Imagick('test.jpg'); $image-thumbnailImage(100, 0); $image-writeImage('test-thumb.jpg'); header(Location: test.html); /* display the thumbnail */ But I get the following error... Warning: dl() [function.dl http://pimpmysnaps.com/function.dl]: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/imagick.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/imagick.so: undefined symbol: zend_ce_iterator in /home/pimpms/public_html/test.php on line 4 PHP IMagick will not load! This is the output for ldd -r for imagick.so. There are a number of dependencies that I don't recognize and I think there may be other packages that need to be installed. undefined symbol: zend_ce_iterator (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: core_globals (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: executor_globals (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: zval_add_ref (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: OnUpdateBool (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: zend_hash_internal_pointer_reset_ex ... (and the list goes on) Any help would be appreciated. Thanks, Mark _ It’s easy to add contacts from Facebook and other social sites through Windows Live™ Messenger. Learn how. https://www.invite2messenger.net/im/?source=TXT_EML_WLH_LearnHow
Re: [PHP] Imagick installation issue
On 6/7/08, BornPlayDie [EMAIL PROTECTED] wrote: I am trying to install ImageMagick and Imagick on my server. I am running the following... Apache version 1.3.37 (Unix) PHP version 5.2.1 I have installed the following... ImageMagick 6.4.1 Imagick 2.1.1 I ran the convert logo test for ImageMagick and it works fine. However imagick.so will not load. I confirmed the so file is in the correct extensions dir specified by extension_dir in php.ini. I also confirmed this is the correct php.ini file. My php test file looks like this... if (!extension_loaded('imagick')) { dl(imagick.so); if (!extension_loaded('imagick')) { echo PHP IMagick will not load!; exit; } } $image = new Imagick('test.jpg'); $image-thumbnailImage(100, 0); $image-writeImage('test-thumb.jpg'); header(Location: test.html); /* display the thumbnail */ But I get the following error... Warning: dl() [function.dl http://pimpmysnaps.com/function.dl]: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/imagick.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/imagick.so: undefined symbol: zend_ce_iterator in /home/pimpms/public_html/test.php on line 4 PHP IMagick will not load! This is the output for ldd -r for imagick.so. There are a number of dependencies that I don't recognize and I think there may be other packages that need to be installed. undefined symbol: zend_ce_iterator (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: core_globals (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: executor_globals (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: zval_add_ref (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: OnUpdateBool (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: zend_hash_internal_pointer_reset_ex ... (and the list goes on) Any help would be appreciated. Thanks, Mark _ It's easy to add contacts from Facebook and other social sites through Windows Live™ Messenger. Learn how. https://www.invite2messenger.net/im/?source=TXT_EML_WLH_LearnHow Have you tried restarting apache? its usually required if you've made changes -- Bastien Cat, the other other white meat
RE: [PHP] Imagick installation issue
Yes, I forgot to mention, I did restart apache. Date: Sat, 7 Jun 2008 20:21:26 -0400 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [PHP] Imagick installation issue CC: php-general@lists.php.net On 6/7/08, BornPlayDie [EMAIL PROTECTED] wrote: I am trying to install ImageMagick and Imagick on my server. I am running the following... Apache version 1.3.37 (Unix) PHP version 5.2.1 I have installed the following... ImageMagick 6.4.1 Imagick 2.1.1 I ran the convert logo test for ImageMagick and it works fine. However imagick.so will not load. I confirmed the so file is in the correct extensions dir specified by extension_dir in php.ini. I also confirmed this is the correct php.ini file. My php test file looks like this... if (!extension_loaded('imagick')) { dl(imagick.so); if (!extension_loaded('imagick')) { echo PHP IMagick will not load!; exit; } } $image = new Imagick('test.jpg'); $image-thumbnailImage(100, 0); $image-writeImage('test-thumb.jpg'); header(Location: test.html); /* display the thumbnail */ But I get the following error... Warning: dl() [function.dl http://pimpmysnaps.com/function.dl]: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/imagick.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/imagick.so: undefined symbol: zend_ce_iterator in /home/pimpms/public_html/test.php on line 4 PHP IMagick will not load! This is the output for ldd -r for imagick.so. There are a number of dependencies that I don't recognize and I think there may be other packages that need to be installed. undefined symbol: zend_ce_iterator (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: core_globals (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: executor_globals (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: zval_add_ref (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: OnUpdateBool (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick.so) undefined symbol: zend_hash_internal_pointer_reset_ex ... (and the list goes on) Any help would be appreciated. Thanks, Mark _ It's easy to add contacts from Facebook and other social sites through Windows Live™ Messenger. Learn how. https://www.invite2messenger.net/im/?source=TXT_EML_WLH_LearnHow Have you tried restarting apache? its usually required if you've made changes -- Bastien Cat, the other other white meat _ Instantly invite friends from Facebook and other social networks to join you on Windows Live™ Messenger. https://www.invite2messenger.net/im/?source=TXT_EML_WLH_InviteFriends
[PHP] [imagick] converting to variable instead of file
hi all, With imagick_writeimage() function, is it possible to send the image to a variable instead of dumping it to a file or to the client browser? Thanks PS (if I try this, it is to convert an image to xpm in a variable and use it in php-gtk) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [imagick] converting to variable instead of file
I had thought too that it is possible to write a temp file for this image, but it would be much better i think if there was another way... Is it really impossible to prevent from this hard disk access ? -- Write it to a tem file then use file_get_contents() on the file name. [...] With imagick_writeimage() function, is it possible to send the image to a variable instead of dumping it to a file or to the client browser? Thanks PS (if I try this, it is to convert an image to xpm in a variable and use it in php-gtk) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [imagick] converting to variable instead of file
maybe create a fifo and write to that, then read from php? On Saturday 06 September 2003 04:17 pm, Decapode Azur wrote: I had thought too that it is possible to write a temp file for this image, but it would be much better i think if there was another way... Is it really impossible to prevent from this hard disk access ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Imagick
yeh i have found even if you give the path the jpeg-v6 it wont configure it the first time round takes about 5 goes ! * Thus wrote Jacob Marble ([EMAIL PROTECTED]): Excuse me, I accidentally sent that last incomplete message. I have successfully compiled PHP 4.3.3RC3 with the --with-imagick flag after compiling and installing ImageMagick 5.5.7 (that was a headache on it's own). The following error keeps cropping up: yeah, imagick is a pain to install, i've done it before :) If you're just wanting imagick to do resampling or converting, i would suggest using gd, it might be able todo what you want and is easier to use: http://us2.php.net/gd Fatal error: Call to undefined function: imagick_readimage() in /usr/local/lib/php/docs/imagick/examples/border.php on line 5 I've tried compiling PHP without the --with-imagick flag and then doing a pear install imagick to get the pear version 0.9.7 package. The same problem occurs. I don't even know how to use imagick yet; I can't get the thing to work with example files, so I can't start writing my own stuff yet. Does anyone at this NG use the imagick tools? Is there something I have to include maybe? Like require 'imagick.php' or something? I can't find any files that look appropriate for that. There is a pear mailing list/news group, you might get better help over there. http://us3.php.net/mailing-lists.php HTH, Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Imagick
* Thus wrote Jacob Marble ([EMAIL PROTECTED]): Excuse me, I accidentally sent that last incomplete message. I have successfully compiled PHP 4.3.3RC3 with the --with-imagick flag after compiling and installing ImageMagick 5.5.7 (that was a headache on it's own). The following error keeps cropping up: yeah, imagick is a pain to install, i've done it before :) If you're just wanting imagick to do resampling or converting, i would suggest using gd, it might be able todo what you want and is easier to use: http://us2.php.net/gd Fatal error: Call to undefined function: imagick_readimage() in /usr/local/lib/php/docs/imagick/examples/border.php on line 5 I've tried compiling PHP without the --with-imagick flag and then doing a pear install imagick to get the pear version 0.9.7 package. The same problem occurs. I don't even know how to use imagick yet; I can't get the thing to work with example files, so I can't start writing my own stuff yet. Does anyone at this NG use the imagick tools? Is there something I have to include maybe? Like require 'imagick.php' or something? I can't find any files that look appropriate for that. There is a pear mailing list/news group, you might get better help over there. http://us3.php.net/mailing-lists.php HTH, Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Imagick
Jacob, Yes I've used imagemagick with php. I found that none of the online documentation worked for me. I was unable to use the imagemagick class and the tutorials seemed to refer to older versions. That being said, here's some code that does work, maybe you can extrapolate from it. Feel free to contact me if you have questions. snipet /*** rename the file. * Note: I've got a form that supports multiple file uploads, hence the $_FILES array * the renameFile() function creates a unique file name for the image being uploaded * so no existing files are overwritten */ $photo_name = renameFile($_FILES[photo][name][$i],0); $photo_location = /www/gallery/photos/; // copy file from /tmp to photos/tmp copy ($_FILES[photo][tmp_name][$i],$photo_location.$photo_name); $command = /usr/bin/identify -verbose '.$photo_location.$photo_name.'; exec ($command,$result,$value); /snipet snipet /*** get verbose information * in the rename code above $command contains the 'verbose' information from imagemagick */ $arrlength = count($result); for ($tmpi = 0; $tmpi $arrlength; $tmpi++) { if(eregi('Geometry', $result[$tmpi])) { $tmp1 = explode(' ', $result[$tmpi]); $tmp1length = count ($tmp1); for ($tmpj = 0; $tmpj $tmp1length; $tmpj++) { $tmp2 = explode('x', $tmp1[$tmpj]); $tmp2length = count ($tmp2); if ($tmp2length 1) { $x = $tmp2[0]; // this is the image width $y = $tmp2[1]; // this is the image height } } } } /snipet snipet /*** * the following code takes the dimensions of the image, and if the image is too big, * resizes the image down to the max image size. */ if ($x $image_max_width || $y $image_max_height)// resize photo to max dimensions { $x = $image_max_width; $y = $image_max_height; $command = /usr/bin/convert -geometry . $x .x. $y . .$photo_location.$photo_name . .$photo_location.$photo_name; exec ($command,$result,$value); } /snipet I know you can do compositing with Imagemagick, but I haven't tried that. I assume it's as complex as everything else with Imagemagick. Imagemagick is a pain, but the quality of the resized images so far surpasses GD(2) that it's worth the work. Good luck. Chris -Original Message- From: Jacob Marble [mailto:[EMAIL PROTECTED] Sent: Saturday, August 09, 2003 1:22 PM To: [EMAIL PROTECTED] Subject: [PHP] Imagick Excuse me, I accidentally sent that last incomplete message. I have successfully compiled PHP 4.3.3RC3 with the --with-imagick flag after compiling and installing ImageMagick 5.5.7 (that was a headache on it's own). The following error keeps cropping up: Fatal error: Call to undefined function: imagick_readimage() in /usr/local/lib/php/docs/imagick/examples/border.php on line 5 I've tried compiling PHP without the --with-imagick flag and then doing a pear install imagick to get the pear version 0.9.7 package. The same problem occurs. I don't even know how to use imagick yet; I can't get the thing to work with example files, so I can't start writing my own stuff yet. Does anyone at this NG use the imagick tools? Is there something I have to include maybe? Like require 'imagick.php' or something? I can't find any files that look appropriate for that. Thanks in advance, Jake LandEZ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Imagick
Excuse me, I accidentally sent that last incomplete message. I have successfully compiled PHP 4.3.3RC3 with the --with-imagick flag after compiling and installing ImageMagick 5.5.7 (that was a headache on it's own). The following error keeps cropping up: Fatal error: Call to undefined function: imagick_readimage() in /usr/local/lib/php/docs/imagick/examples/border.php on line 5 I've tried compiling PHP without the --with-imagick flag and then doing a pear install imagick to get the pear version 0.9.7 package. The same problem occurs. I don't even know how to use imagick yet; I can't get the thing to work with example files, so I can't start writing my own stuff yet. Does anyone at this NG use the imagick tools? Is there something I have to include maybe? Like require 'imagick.php' or something? I can't find any files that look appropriate for that. Thanks in advance, Jake LandEZ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Imagick
Hello all- Does anyone here use Imagick in PHP? I've tried the example .php files using a miriad of version combinations and I always get this error: Fatal error: Call to undefined function: imagick_readimage() in /usr/local/lib/php/docs/imagick/examples/border.php on line 5 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] imagick version 0.9.5 released
Thanks to Christian Stocker for actually putting the newest release up. It's available here: http://pear.php.net/imagick/ Here are the recent changes: - functions added: imagick_newimagelist() imagick_pushlist() imagick_poplist() imagick_mosaic() imagick_setcompressiontype() imagick_setcompressionquality() - modified how all functions check to see if ImageMagick has been initialized. - added a number of new examples for demonstrating how to use image lists. - fixed bugs in _php_imagick_alloc_handle() and _php_imagick_clear_errors() causing core dump when working with image lists. I wasn't checking to make sure the structures I was examining were allocated. - thanks to James Huston ([EMAIL PROTECTED]) for suggesting imagick_setcompressiontype() and imagick_setcompressionquality() and testing them. - added supporting IMAGICK_COMPRESSION_* constants for use with imagick_setcompressiontype(). - renamed imagick_setcompression() to imagick_setcompressiontype(). (note: this was done before the new version was released so no users should be impacted.) -- Michael C. Montero Chief Technology Officer Community Connect Inc. Co-founder [EMAIL PROTECTED] -=-=-=-=-= Community Connect Inc. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- The Premier Source of Interactive Online Communities149 Fifth Avenue http://www.CommunityConnectInc.com/ New York, NY 10010 http://www.AsianAvenue.com/ http://www.BlackPlanet.com/ Click into Asian AmericaThe World Is Yours http://www.MiGente.com/ http://www.DiversityJobMarket.com/ The Power of LatinosIn partnership with The New York Times - Your Message May Appear Below This Line -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP imagick Windows DLL
For any Windows users of PHP that want ImageMagick functionality built into PHP, you can download the ImageMagick PHP DLL from here: http://php.chregu.tv/php_imagick.dll Christian Stocker was gracious enough to spend time figuring out how to get it to work. For the official imagick PEAR site, go here: http://pear.php.net/package-info.php?package=imagick For examples of using the functions, you should download the latest version from the PEAR site and look at all the examples in the examples directory contained in the tar. -- Michael C. Montero Chief Technology Officer Community Connect Inc. Co-founder [EMAIL PROTECTED] -=-=-=-=-= Community Connect Inc. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- The Premier Source of Interactive Online Communities149 Fifth Avenue http://www.CommunityConnectInc.com/ New York, NY 10010 http://www.AsianAvenue.com/ http://www.BlackPlanet.com/ Click into Asian AmericaThe World Is Yours http://www.MiGente.com/ http://www.DiversityJobMarket.com/ The Power of LatinosIn partnership with The New York Times - Your Message May Appear Below This Line -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] imagick v0.9.0.1 RELEASED
imagick, the PHP ImageMagick module, has been moved and can be found here: http://pear.php.net/package-info.php?pacid=76 All releases will occur at this location from now on. The site: http://magick.communityconnect.com/ Will continue to point to the above PHP URL. Christian and I released version 0.9.0.1. It contains support for image lists and almost all of the image processing functions - image effects, special effects, etc. Contact either myself or Christian ([EMAIL PROTECTED]) if you have comments, suggestions or to report bugs. Thanks. -- Michael C. Montero Chief Technology Officer Community Connect Inc. Co-founder [EMAIL PROTECTED] -=-=-=-=-= Community Connect Inc. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- The Premier Source of Interactive Online Communities149 Fifth Avenue http://www.CommunityConnectInc.com/ New York, NY 10010 http://www.AsianAvenue.com/ http://www.BlackPlanet.com/ Click into Asian AmericaThe World Is Yours http://www.MiGente.com/ http://www.DiversityJobMarket.com/ The Power of LatinosIn partnership with The New York Times - Your Message May Appear Below This Line -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php