Page 1 of 1

Problem with MagickEchoImageBlob and MagickWriteImage

Posted: 2007-09-12T22:51:49-07:00
by vinodkalpaka
Hi,

Please refer the code below.

<?php
$magick_wand=NewMagickWand();
MagickReadImage($magick_wand,'bag.jpg');

list($x_res, $y_res) = MagickGetImageResolution($magick_wand);
echo " x_res=$x_res - y_res=$y_res <br />";

$drawing_wand=NewDrawingWand();
DrawSetFont($drawing_wand,"arial.ttf");
DrawSetFontSize($drawing_wand,20);
DrawSetGravity($drawing_wand,MW_CenterGravity);
$pixel_wand=NewPixelWand();
PixelSetColor($pixel_wand,"white");
DrawSetFillColor($drawing_wand,$pixel_wand);

if (MagickAnnotateImage($magick_wand,$drawing_wand,0,0,0,"Rose") != 0)
{
MagickEchoImageBlob( $magick_wand );

}
else
{
echo MagickGetExceptionString($magick_wand);
}
?>


I am not getting the image in the browser.The same thing happening when I am using MagickWriteImage functions.
But I am receiving the output for the resolution.(MagickGetImageResolution($magick_wand))

The source image and Font files are in correct path (In the same folder).The CHMOD for the
folder is 777. Why do this happen? Please help me.

Thanking in advance.
From,
Vinod

Re: Problem with MagickEchoImageBlob and MagickWriteImage

Posted: 2007-09-13T11:00:54-07:00
by magick
We have a patch for the problem you reported in ImageMagick 6.3.5-9 Beta. It is scheduled for release within a week.

Re: Problem with MagickEchoImageBlob and MagickWriteImage

Posted: 2007-09-13T22:02:06-07:00
by vinodkalpaka
Thank you for the quick reply.

Re: Problem with MagickEchoImageBlob and MagickWriteImage

Posted: 2007-09-17T15:43:13-07:00
by Stickboy
I'm having similar sounding problems with the php_magickwand_dyn.dll extension - MagickEchoImageBlob producing no output, MagickGetImageWidth/Height producing nothing, MagickGetImageResolution producing garbage results etc. I have confirmed with Filemon that the server can read/write correctly to the temp folder defined by MAGICK_TMPDIR. Is this likely to be the same fault?

php_magickwand_q16_st.dll behaves perfectly in all regards, except for being horribly slow for what I'm trying to do. This is on Win2k3/IIS with ImageMagick 6.3.5 09/01/07 Q8.

Thanks
Cully

Re: Problem with MagickEchoImageBlob and MagickWriteImage

Posted: 2007-09-17T21:22:57-07:00
by vinodkalpaka
Yes, the magickwand seems to be very slow. How can I install magickwand in windows?
I have installed ImageMagick-6.3.5-Q16 in my program Files, then have placed the dlls' php_magickwand_dyn.dll and php_magickwand_q16_st.dll in my php extension folder (WAMP), then added the following lines to php.ini.
extension=php_magickwand_dyn.dll
extension=php_magickwand_q16_st.dll

Then I have restared the apache. It shows the dll error. Why did this happen? Please help me.

Re: Problem with MagickEchoImageBlob and MagickWriteImage

Posted: 2007-09-17T22:01:48-07:00
by Stickboy
Yes, the magickwand seems to be very slow. How can I install magickwand in windows?
I have installed ImageMagick-6.3.5-Q16 in my program Files, then have placed the dlls' php_magickwand_dyn.dll and php_magickwand_q16_st.dll in my php extension folder (WAMP), then added the following lines to php.ini.
extension=php_magickwand_dyn.dll
extension=php_magickwand_q16_st.dll

Then I have restared the apache. It shows the dll error. Why did this happen? Please help me.
I believe you've made a mistake there: The _dyn.dll is a wrapper that requires the ImageMagick binaries to be installed and available on the system - calls to Magickwand using this extension pass through to those binaries. The q16_st.dll is a static library that contains the ImageMagick code itself, so does not require the binaries to be installed. You are supposed to choose one or the other, not both. Having both extensions enabled will produce a "MagickWand Already Loaded" dialog box when you restart.

Re: Problem with MagickEchoImageBlob and MagickWriteImage

Posted: 2007-09-18T02:33:58-07:00
by vinodkalpaka
I have uninstalled ImageMagick-6.3.5-Q16 from the program files. uncommented the line extension=php_magickwand_dyn.dll in php.dll.
Now the php.ini have the line extension=php_magickwand_q16_st.dll. But it shows the error message when I restart the server.
Some of the messages are as follows:
"The procedure entry point _zval_copy_ctor_func could not be located in the dynamic link library php5ts.dll"
"PHP Startup: Unable to load the dynamic lybrary 'c:/wamp/php/ext/php_magickwand_q16_st.dll
- The specified procedure could not be found.'"

The dll is in my extension folder and extension directory is shown as extension_dir = "c:/wamp/php/ext/" in my php.ini.
What is wrong with the installation ? Would you please help me?

Re: Problem with MagickEchoImageBlob and MagickWriteImage

Posted: 2007-09-18T03:35:44-07:00
by Stickboy
Make sure you're using the dll from http://www.magickwand.org/download/php/ . There is an old version of the dll floating around the net that only works with older versions of PHP and causes entry point errors like this.

Re: Problem with MagickEchoImageBlob and MagickWriteImage

Posted: 2007-09-18T03:38:39-07:00
by vinodkalpaka

Re: Problem with MagickEchoImageBlob and MagickWriteImage

Posted: 2007-09-20T02:46:06-07:00
by vinodkalpaka
We have a patch for the problem you reported in ImageMagick 6.3.5-9 Beta. It is scheduled for release within a week.
what about the release of the patch for ImageMagick 6.3.5-9 Beta? Please help me.

Re: Problem with MagickEchoImageBlob and MagickWriteImage

Posted: 2007-09-20T11:54:21-07:00
by magick
ImageMagick 6.3.5-9 and MagickWand 1.0.5 was released a week ago. Download/install and see if the problem persists.

Re: Problem with MagickEchoImageBlob and MagickWriteImage

Posted: 2007-09-24T15:52:07-07:00
by Stickboy
ImageMagick 6.3.5-9 and MagickWand 1.0.5 was released a week ago. Download/install and see if the problem persists.
No luck. I've installed 6.3.5-10 and the dynamic library (extension=php_magickwand_dyn.dll) still does not function correctly.

I haven't been able to test MagickWand 1.0.5 as there doesn't seem to be a Windows build available for download, and I can't find any instructions for building from source. Is there any ETA on the Windows dll's for 1.0.5 being available? And/Or is there any chance that a Q8 static dll can be made available to see if it will solve the horrendous speed issues I'm having with the Q16 version?

Thanks
Cully

Re: Problem with MagickEchoImageBlob and MagickWriteImage

Posted: 2007-09-24T16:14:27-07:00
by magick
MagickWand for PHP prior to version 1.0.5 is incompatible with ImageMagick 6.2.* and above. Unfortunately we do not provide a Windows version of MagickWand for PHP. Perhaps a user will provide one. Anyone?

Re: Problem with MagickEchoImageBlob and MagickWriteImage

Posted: 2007-09-24T16:22:33-07:00
by Stickboy
MagickWand for PHP prior to version 1.0.5 is incompatible with ImageMagick 6.2.* and above. Unfortunately we do not provide a Windows version of MagickWand for PHP. Perhaps a user will provide one. Anyone?
Bother. Do you not have any idea who provided these? :
http://www.magickwand.org/download/php/ ... php-5.2.0/

Re: Problem with MagickEchoImageBlob and MagickWriteImage

Posted: 2007-09-24T17:23:03-07:00
by magick
No we have no trail of who provided the previous Windows version of MagickWand for PHP.