php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59090 ImagickDraw doesn't work as cmyk
Submitted: 2010-02-27 07:07 UTC Modified: 2010-02-28 07:09 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: junkboypaul at hotmail dot com Assigned:
Status: Wont fix Package: imagick (PECL)
PHP Version: 5.2.6 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2010-02-27 07:07 UTC] junkboypaul at hotmail dot com
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-28 07:09 UTC] mkoppanen@php.net
All the drawing operations work as RGB(A) in ImageMagick if I remember correctly.
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Thu Dec 13 20:01:26 2018 UTC