php.net |  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
Have you experienced this issue?
Rate the importance of this bug to you:

 [2007-12-09 05:33 UTC] pascal dot duersteler at gmail dot com
Description:
------------
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 );
    $this->image->uniqueImageColors();

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

    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().



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-12-09 12:04 UTC] mkoppanen@php.net
Try using the ImagickPixel::getColorAsString() method. You should use that for colorspaces other than RGB(A).
 [2009-02-06 16:34 UTC] mkoppanen@php.net
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-2019 The PHP Group
All rights reserved.
Last updated: Sat Nov 16 22:01:35 2019 UTC