PerlMagick: Cannot use colorspace to correct dark gray imgs

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
Posts: 15
Joined: 2013-03-29T09:40:03-07:00
Authentication code: 6789

PerlMagick: Cannot use colorspace to correct dark gray imgs

Post by jhuckaby »


I recently posted this topic regarding darkening grayscale images:

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:

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:

Am I doing something wrong?

Thanks for your time.

Version: ImageMagick 6.8.4-6 2013-04-04 Q8
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
Post Reply