|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2013-10-14 17:14 UTC] mail at jdborg dot com
Description:
------------
I thought this was a legacy problem, but updated Imagick to 3.1.2 and ImageMagic to 6.8.7-0 2013-10-11 Q16.
When trying to draw a line on an image, opacity is ignored.
Test script:
---------------
$draw = new ImagickDraw();
$draw->setStrokeWidth(1);
$draw->setStrokeOpacity(0.5);
$draw->setStrokeColor(new ImagickPixel('#323232'));
$draw->line(0, 0, 10, 10);
Expected result:
----------------
A 50% opacity line is drawn.
Actual result:
--------------
A fully opaque line is drawn.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 15:00:01 2025 UTC |
Full test: $draw = new ImagickDraw(); $draw->setStrokeWidth(1); $draw->setStrokeOpacity(0.1); $draw->setStrokeColor("black"); $draw->line(0, 0, 500, 500); $drawing = new Imagick(); $drawing->newImage(500, 500, "red"); $drawing->setImageFormat("png"); $drawing->drawImage($draw); header("Content-Disposition: attachment; filename=test.png"); echo $drawing->getImageBlob(); The line should be barely visible.