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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: junkboypaul at hotmail dot com
New email:
PHP Version: OS:

 

 [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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 21:01:28 2024 UTC