colorspace conversion

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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

colorspace conversion

Post by fmw42 »

I have converted an image from RGB to HSL using:

convert lena.jpg -colorspace HSL lena_hsl.jpg

But the reverse operation does not seem to work and I think it should be fixed.

convert lena_hsl.jpg -colorspace RGB lena_hsl_rgb.jpg


I know there is a work around, but it is very awkward:

convert lena.jpg -colorspace HSL -separate lena_hsl_%d.jpg

convert lena_hsl_0.jpg -colorspace HSL \
lena_hsl_0.jpg -compose CopyRed -composite \
lena_hsl_1.jpg -compose CopyGreen -composite \
lena_hsl_2.jpg -compose CopyBlue -composite \
-colorspace RGB lena_hsl_combined_rgb.jpg

Thanks for your consideration

Fred Weinhaus
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: colorspace conversion

Post by magick »

There is a patch in ImageMagick 6.3.5-9 Beta that fixes the HSL colorspace problem. 6.3.5-9 is scheduled for release on September 16.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: colorspace conversion

Post by fmw42 »

Thanks. That is terrific.

Fred Weinhaus
Post Reply