php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59624 ImagickDraw makes image background transparent
Submitted: 2011-02-14 21:11 UTC Modified: 2015-01-18 04:22 UTC
From: mallluhuct at gmail dot com Assigned: mkoppanen (profile)
Status: No Feedback Package: imagick (PECL)
PHP Version: 5.3.5 OS: Mac OS X
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2011-02-14 21:11 UTC] mallluhuct at gmail dot com
Description:
------------
when I try to use ImagickDraw to draw a filled arc, using the 
same color for fill as for stroke on a new image with opaque 
black background, it resets image background to transparent

Reproduce code:
---------------
<?php

$image = new \Imagick();
$image->newImage(400, 300, '#000000');

$pixel = new \ImagickPixel('#ffffff');
$pixel->setColorValue(\Imagick::COLOR_OPACITY, 0.0);

$arc = new \ImagickDraw();

$arc->setStrokeColor($pixel);
$arc->setStrokeWidth(1);
$arc->setFillColor($pixel);
$arc->arc(50, 50, 350, 250, 45, 135);

$image->drawImage($arc);
$image->flattenImages()->writeImage('/path/to/arc.png');

$pixel->clear();
$pixel->destroy();

$arc->clear();
$arc->destroy();


Expected result:
----------------
Should draw a white chord on a black background

Actual result:
--------------
Draws a white chord on a transparent background

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-02 18:01 UTC] Danack at basereality dot com
This issue is not reproducible on PHP 5.6.2 with the latest (3.2.0RC1) version of Imagick and the latest version of ImageMagick (6.9.9-0).

If this is still an issue with the latest version of Imagick, please can you specify what versions of ImageMagick and PHP you are using to allow reproduction of this problem.
 [2015-01-05 02:54 UTC] danack@php.net
-Status: Assigned +Status: Feedback
 [2015-01-05 02:54 UTC] danack@php.net
Awaiting feedback.
 [2015-01-18 04:22 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Nov 17 04:01:31 2019 UTC