Using latest imagick PHP extension downloaded from PECL 2.2.1RC2 and ImageMagick version 6.4.4
Tried to mimic the similar behavior of the following script to remove background using Imagick extension, but failed to get it work using Imagick even with a larger fuzz factor. Any pointers are highly appreciated.
Thanks a lot.
-peter
convert test.png -bordercolor white -border 1x1 -matte \
-fill none -fuzz 1% -draw 'matte 1,1 floodfill' test.png
<?php
$im = new Imagick('test.png');
$im->matteFloodfillImage(1.0, 50, new ImagickPixel('white'), 10, 10);
echo $im;
?>
matteFloodfillImage doesn't work as expected
Re: matteFloodfillImage doesn't work as expected
I've tried it as well and couldn't get it to work. It seems this forum is dead
viewtopic.php?f=18&t=12118
viewtopic.php?f=18&t=12118
Re: matteFloodfillImage doesn't work as expected
Far from dead
I am currently very busy at work so that cuts down the time I can "hang around" at forums. This should ease up after Wednesday!
I am currently very busy at work so that cuts down the time I can "hang around" at forums. This should ease up after Wednesday!
Mikko Koppanen
My blog: http://valokuva.org
My blog: http://valokuva.org
Re: matteFloodfillImage doesn't work as expected
Well, if I get a good complete answer on Wednesday I'll be happy. 10x
Re: matteFloodfillImage doesn't work as expected
same issue; doesnt work as expected. anyone get this going?
Re: matteFloodfillImage doesn't work as expected
This is the part of the code that currently work more or less well for collectible coins on my site
Code: Select all
if ($bFakeTransparency) {
$ipColor = $im->getImagePixelColor(1, 1);
$im->borderImage($ipColor, 1, 1);
$im->paintFloodfillImage("#e8f0fc", 12000, $ipColor, 1 , 1);
$im->shaveImage(1, 1);
}
Re: matteFloodfillImage doesn't work as expected
thank you!
was just about to post this:
$canvas->paintTransparentImage('color', 0, 400);
read more in user comments here:
http://www.php.net/manual/en/function.i ... timage.php
hopefully i can figure out better png alpha transparency support now.
was just about to post this:
$canvas->paintTransparentImage('color', 0, 400);
read more in user comments here:
http://www.php.net/manual/en/function.i ... timage.php
hopefully i can figure out better png alpha transparency support now.
Re: matteFloodfillImage doesn't work as expected
You're most welcomed I was actually using this method since I'm displaying JPGs. Using PNGs is out of the question due to image size. If new ideas come to mind (you can see on my site not all the automatic choices are perfect, to say the least), please update. Thanks.