Page 1 of 1

colorspace conversion

Posted: 2007-09-07T16:20:15-07:00
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

Re: colorspace conversion

Posted: 2007-09-07T18:18:48-07:00
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.

Re: colorspace conversion

Posted: 2007-09-09T18:26:35-07:00
by fmw42
Thanks. That is terrific.

Fred Weinhaus