php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58747 setImageChannelDepth does not work
Submitted: 2009-07-02 09:14 UTC Modified: 2009-07-24 08:47 UTC
From: me at reso dot od dot ua Assigned:
Status: Not a bug Package: imagick (PECL)
PHP Version: 5.2.9 OS: Ubuntu 8.04
Private report: No CVE-ID: None
 [2009-07-02 09:14 UTC] me at reso dot od dot ua
Description:
------------
setImageChannelDepth seems to have no effect on the image. I 
have also tried converting the image to grayscale with $img-
>setImageColorspace(imagick::COLORSPACE_GRAY); but it had no 
effect either.

Reproduce code:
---------------
<?

$img = new Imagick("./test.jpg");
$img->setImageChannelDepth(imagick::CHANNEL_RED, 0);
$img->setImageChannelDepth(imagick::CHANNEL_GREEN, 0);
header("Content-type: image/jpeg");
echo $img;

?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-02 09:16 UTC] mkoppanen@php.net
What are you trying to achieve? Create grayscale image?
 [2009-07-02 09:24 UTC] me at reso dot od dot ua
There are two different things, really:

1) By distracting red and green channel I wanted to work 
only with the blue one. The strange thing is that it did 
work on the older versions of imagick.

2) With setImageColorspace(imagick::COLORSPACE_GRAY); I 
wanted to create a grayscale image to use it with clutImage. 
getImageColorspace reports that the colorspace is GRAY, but 
still displays and RGB image.
 [2009-07-02 18:15 UTC] mkoppanen@php.net
Can you specify your ImageMagick version as well?
 [2009-07-02 18:27 UTC] me at reso dot od dot ua
ImageMagick 6.5.3-10 2009-06-23 Q16 OpenMP compiled with GCC 
4.02.
 [2009-07-24 08:47 UTC] mkoppanen@php.net
Sorry, but your problem does not imply a bug in PECL itself.  For a
list of more appropriate places to ask for help using PECL, please
visit http://pecl.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PECL.

http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=14276
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Aug 07 13:01:24 2020 UTC