|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-02-28 07:09 UTC] mkoppanen@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 23:00:01 2025 UTC |
Description: ------------ I'm unable to draw a rectangle in cmyk mode, for some reason, ImagickDraw seems to only draw in RGB mode. Reproduce code: --------------- <?php $canvas = new Imagick(); $canvas->newImage( 3240, 2142, new ImagickPixel('cmyk(0,100,0,0)'), 'jpg' ); $draw = new ImagickDraw(); $draw->setFillColor(new ImagickPixel('cmyk(100,0,0,0)')); $draw->rectangle(0,1342,3240,2142); $canvas->drawImage($draw); $canvas->setImageFormat('jpg'); header('Content-Type: image/jpg'); echo $canvas; exit(); ?> Expected result: ---------------- I expect a magenta image with a cyan rectangle down the bottom Actual result: -------------- The magenta image has a red rectangle appear at the bottom, as if imagickdraw takes the first three values for cmyk and uses them as rgb values.