|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-11-14 10:47 UTC] mkoppanen@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 19:00:01 2025 UTC |
Description: ------------ Using Imagick 2.0.1 compiled against ImageMagick 6.3.6-9 on PHP 5.2.4/Linux. When using Imagick, setting an image's background color to transparent before invoking waveImage should affect the color of the wave background. Instead, the wave background is white. When invoked from the command-line (using "convert") or when invoked using MagickWand for PHP, the wave background is correctly set to transparent. Reproduce code: --------------- $hImg = new Imagick(); $hImg->newImage(100, 100, new ImagickPixel("orange")); $hImg->setBackgroundColor(new ImagickPixel("transparent")); $hImg->waveImage(15, 200); $hImg->trimImage(0); $hImg->setImageFormat("png32"); header("Content-Type: image/png"); echo $hImg; exit; Expected result: ---------------- If browser background is set to non-white, the top meniscus and bottom corners should be the same color as the browser canvas. Using MagickWand, the correct output can be obtained with the following code: $hImg = NewMagickWand(); MagickNewImage($hImg, 100, 100, "orange"); MagickSetImageBackgroundColor($hImg, "transparent"); MagickWaveImage($hImg, 15, 200); MagickTrimImage($hImg, 0); MagickSetImageFormat($hImg, "png32"); header("Content-Type: image/png"); echo MagickGetImageBlob($hImg); exit; Actual result: -------------- Top meniscus and bottom corners are white rather than transparent.