MagickSetImageDepth not working?

MagickWand for PHP is an object-oriented PHP interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning MagickWand for PHP.
Post Reply
kriks
Posts: 114
Joined: 2008-01-04T05:52:03-07:00

MagickSetImageDepth not working?

Post by kriks »

hi,

using IM 6.3.8 and magickwand 1.0.5, it seems that MagickSetImageDepth is not doing its job properly:

via php sample :

Code: Select all

<?php
$localPath = '53364.eps';
$destPath = 'output.png';

$origImgMedia = NewMagickWand();
MagickReadImage($origImgMedia, $localPath);
MagickSetImageFormat($origImgMedia, 'PNG24');
MagickSetImageDepth($origImgMedia, 8, MW_AllChannels);
MagickWriteImage($origImgMedia, $destPath);
?>
followed by :

Code: Select all

# identify output.png
output.png PNG 192x300 192x300+0+0 DirectClass 16-bit 272.803kb
-----------

same via convert :

Code: Select all

#convert 53364.eps -depth 8 output-convert.png
# identify output-convert.png
output-convert.png PNG 192x300 192x300+0+0 DirectClass 8-bit 169.799kb
is this a bug? or a bad way of using magickwand?

thanks for helping
kriks
Posts: 114
Joined: 2008-01-04T05:52:03-07:00

Re: MagickSetImageDepth not working?

Post by kriks »

up?
kriks
Posts: 114
Joined: 2008-01-04T05:52:03-07:00

Re: MagickSetImageDepth not working?

Post by kriks »

nobody? :(
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: MagickSetImageDepth not working?

Post by magick »

Your script works properly with MagickWand 1.0.8 and ImageMagick 6.5.1-0 the currently releases of the MagickWand for PHP and ImageMagick.

Looks like its a bug in ImageMagick 6.3.8 or MagickWand 1.0.5.
kriks
Posts: 114
Joined: 2008-01-04T05:52:03-07:00

Re: MagickSetImageDepth not working?

Post by kriks »

thanks, we upgraded and it works well now :)
Post Reply