problem with setImageColorSpace

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
neohunter
Posts: 4
Joined: 2011-12-05T07:20:24-07:00
Authentication code: 8675308

problem with setImageColorSpace

Post by neohunter »

hi, im runing this command on bash:

convert -colorspace RGB -interlace none testcard.pdf test1.jpg

it gives me a perfect image, if i dont put the -colorspace RGB the colors look so bright, (bad).

now im trying to do the same from php with this:

$pdf='testcard.pdf';
$im = new imagick($pdf.'[0]');
$im->setColorSpace( imagick::COLORSPACE_RGB );
$im->setImageColorSpace( imagick::COLORSPACE_RGB );
$im->setImageFormat( "jpg" );
header( "Content-Type: image/jpeg" );
echo $im;

But the result is the same as if i run the command line without -colorspace RGB, the colors sucks. I tried with many values on the setImageColorSpace and it just changes the colors to orange.. green.. etc. but i dont get the right colors, what im doing wrong?
Post Reply