image - Use Imagic methods in ImagicDraw in PHP


I am usingImagick library for draw image over a image. I need to draw a box over an image, for this print image I am usingImagick, and for draw a image I am usingImagickDraw.

Printing a image withImagick is working fine. And alsoImagickDraw also working fine.

When I useedgeImage method in imagick will make the image as color inverted. Can I useedgeImage method inImagickDraw?

Here is my code:

$draw = new \ImagickDraw();
$brightness = "-20";
$contrast = "-20";
$channel = "green";
$draw->pathMoveToAbsolute (10,0);
$draw->rectangle(0, 0, 170, 300);

$imagick = new \Imagick();
header("Content-Type: image/png");

echo $imagick->getImageBlob();


People are also looking for solutions to the problem: javascript - Saving php data from mysql_fetch_array as script variables


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.