Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/Classes/IM.php =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/Classes/IM.php,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/Classes/IM.php 24 Nov 2007 15:35:40 -0000 1.7 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/Classes/IM.php 13 May 2008 18:53:51 -0000 1.8 @@ -178,7 +178,11 @@ function gamma($outputgamma=1.0) { $this->command['gamma'] = "-gamma $outputgamma"; } - + + function reduce_colors($number = 256) + { + $this->command['colors'] = "-colors $number"; + } /** * Save the image file * @@ -213,7 +217,7 @@ { if ($type == '') { header('Content-type: image/' . $this->type); - passthru(IMAGE_TRANSFORM_LIB_PATH . 'convert ' . implode(' ', $this->command) . " -quality $quality " . escapeshellarg($this->image) . ' ' . strtoupper($this->type) . ":-"); + passthru(IMAGE_TRANSFORM_LIB_PATH . ' ' . implode(' ', $this->command) . " -quality $quality " . escapeshellarg($this->image) . ' ' . strtoupper($this->type) . ":-"); } else { header('Content-type: image/' . $type); passthru(IMAGE_TRANSFORM_LIB_PATH . 'convert ' . implode(' ', $this->command) . " -quality $quality " . escapeshellarg($this->image) . ' ' . strtoupper($type) . ":-");