Page 1 of 1

PerlMagick: Cannot use colorspace to correct dark gray imgs

Posted: 2013-04-05T11:53:51-07:00
by jhuckaby
Hello,

I recently posted this topic regarding darkening grayscale images:
viewtopic.php?f=3&t=23092

The workaround I was told, as per viewtopic.php?f=4&t=21269 introduced in IM 6.7.7-8, is to convert the colorspace back to RGB when you load the image. That's fine, but I cannot get it to work using PerlMagick:

Source Image:
Image

Code: Select all

use Image::Magick;
my $img = new Image::Magick();
$img->Read( 'rgb-desaturated.jpg' );
$img->Set( colorspace => 'RGB' ); # has no effect
$img->Write( 'still-dark.jpg' );
This still results in a dark image, even though I am setting the colorspace back to RGB.

Example Output:
Image

Am I doing something wrong?

Thanks for your time.

Version: ImageMagick 6.8.4-6 2013-04-04 Q8 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC
Delegates: bzlib freetype jng jpeg lcms png tiff xml zlib
OS: Linux 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux (64-bit CentOS 6.2)
Perl: This is perl 5, version 16, subversion 0 (v5.16.0) built for x86_64-linux

- Joe