Hi,
How can I change or replace to "adaptiveThresholdImage" output colors?
I use this code: http://phpimagick.com/Imagick/adaptiveThresholdImage
I made a picture with PS, what I need via adaptiveThresholdImage:
Regards
How to change adaptiveThresholdImage output color?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to change adaptiveThresholdImage output color?
What is your IM version and platform? Please always provide that, since syntax may differ.
Is your After example what is produced from adaptiveThreshold or what you want it to be after changing the colors from the Before image? Which is the result from adaptive threshold and is the Before, the original before using adaptivethreshold?
What colors do you want changed?
Please clarify.
Is your After example what is produced from adaptiveThreshold or what you want it to be after changing the colors from the Before image? Which is the result from adaptive threshold and is the Before, the original before using adaptivethreshold?
What colors do you want changed?
Please clarify.
Re: How to change adaptiveThresholdImage output color?
I use Imagick with Centos 7 (and Cpanel).
This is my phpinfo:
I want to change the black output color to grey. I use now the original code:
This is my phpinfo:
I want to change the black output color to grey. I use now the original code:
Code: Select all
function adaptiveThresholdImage($imagePath, $width, $height, $adaptiveOffset)
{
$imagick = new \Imagick(realpath($imagePath));
$adaptiveOffsetQuantum = intval($adaptiveOffset * \Imagick::getQuantum());
$imagick->adaptiveThresholdImage($width, $height, $adaptiveOffsetQuantum);
header("Content-Type: image/jpg");
echo $imagick->getImageBlob();
}
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to change adaptiveThresholdImage output color?
see Imagick::paintOpaqueImage