IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
-
fmw42
- Posts: 22974
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Post
by fmw42 » 2016-12-14T09:43:39-07:00
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.
-
pocakka
- Posts: 2
- Joined: 2016-12-14T02:51:44-07:00
- Authentication code: 1151
Post
by pocakka » 2016-12-14T10:01:45-07:00
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:
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: 22974
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Post
by fmw42 » 2016-12-14T13:12:17-07:00
see Imagick::paintOpaqueImage