|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57959 Unexpected return values when using different colorspaces
Submitted: 2007-12-09 05:33 UTC Modified: 2009-02-06 16:34 UTC
From: pascal dot duersteler at gmail dot com Assigned:
Status: No Feedback Package: imagick (PECL)
PHP Version: 5.2.1 OS: Gentoo 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:
Bug Type:
From: pascal dot duersteler at gmail dot com
New email:
PHP Version: OS:


 [2007-12-09 05:33 UTC] pascal dot duersteler at gmail dot com
Tryed Imagick::quantizeImage() which needs an Imagick::Colorspace as second argument. Strange thing is that every colorspace i choose, the return keys of an array are still r/g/b  instead of colorspace named keys like h/s/b or l/a/b for example when reading the colormap with Imagick::getColors().

Reproduce code:
// this->image comes from the class constructor
// -> $this->image = new Imagick($image);
function getColors()
    $this->image->quantizeImage( 30, Imagick::COLORSPACE_HSB, 0, false, false );

    $it = $this->image->getPixelIterator();

    while( $row = $it->getNextIteratorRow() )
	    foreach( $row as $pixel ) $this->colors[] = $pixel->getColor();


Expected result:
Expected different return keys when changing the colorspace constant. Unfortunately i don't know which stack expresses what if the colorspace isn't RGB. Either i don't know if the problem is in quantizeImage() or getColors().


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-12-09 12:04 UTC]
Try using the ImagickPixel::getColorAsString() method. You should use that for colorspaces other than RGB(A).
 [2009-02-06 16:34 UTC]
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 "Open". Thank you.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 12:01:29 2024 UTC