Page 1 of 1

Call to undefined function MagickPaintTransparentImage()

Posted: 2008-05-10T21:51:30-07:00
by hyperlinked
I'm trying to set a transparent background for an image by using MagickPaintTransparentImage, but I'm getting an error message when using this function. I'm running MagickWand 1.0.7 and ImageMagick 6.4.0. MagickWand is installed as a PHP extension on two different servers running the same versions of MagickWand and ImageMagick. One server is set-up on my Mac running OS 10.5 and the other is running Debian Linux. Both are using Apache 2 as the webserver.

This is my first time working at this level with ImageMagick. I've run a series of test scripts that all worked. MagickWand appears to be working in both environments as far as I can tell. Is anyone else having the same problem? Did this function get depricated?

Is there some other way of making a color and all neighboring colors transparent in ImageMagick? I can't use DrawMatte beause I need the fuzz property to transform similar colors to transparent.

Re: Call to undefined function MagickPaintTransparentImage()

Posted: 2008-05-11T00:24:23-07:00
by hyperlinked
Ok, I figured this out. There was a misprint in the MagickWand manual.

In the manual's index, the function is shown as MagickTransparentPaintImage. This is the correct name of the function.

However, if you read the documentation, it's listed as MagickPaintTransparentImage. That is a typo. I looked through the source files for MagickWand and found no instance of MagickPaintTransparentImage. Everything was written using MagickTransparentPaintImage.