|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-12-09 12:04 UTC] mkoppanen@php.net
[2009-02-06 16:34 UTC] mkoppanen@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
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().