When I run this simple command to test that a "no-operation" channel separation and re-combination works as expected:
convert logo: -colorspace rgb -separate -colorspace rgb -combine -colorspace rgb miff:- | display miff:-
- all is well, the output looks the same as the input. But if I change the colorspace to any other color type:
convert logo: -colorspace hsb -separate -colorspace hsb -combine -colorspace rgb miff:- | display miff:-
-the output is not the same as input. Most disappointing are HSB and HSL that return a very dark image. I was hoping to use them to work on the saturation channel, but it's impossible to work with.
I'm still using 6.6.3 and haven't seen anything in the changelog to suggest newer versions behave any different.
Colorspace separate and combine - odd results
-
- Posts: 18
- Joined: 2010-07-16T15:54:28-07:00
- Authentication code: 8675308
-
- Posts: 18
- Joined: 2010-07-16T15:54:28-07:00
- Authentication code: 8675308
Re: Colorspace separate and combine - odd results
Ouch! Thanks, Fred. I've been caught out by this before...
A note to the developers: please make "-separate" and "-combine" consistent in how their colorspaces are set.
A note to the developers: please make "-separate" and "-combine" consistent in how their colorspaces are set.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Colorspace separate and combine - odd results
Not posible - YET
-colorspace is a operation NOT a setting! Using it against a Greyscale image makes the image not a expected RGB greyscale image.
-set colorspace is a setting, that changes the colorspace of any without changing its values from what -combine is expecting. It is a temporary stop gap measure.
NOTE for three channels you can use -set colorspace afterward. It is only needed first if four channel CMYK images are involved.
In your own example. NONE of the -colorspace operations are need as the images are all in that colorspace.
As part of ongoing discussions, -combine may need some changes for IM v7 (just about to fork for alpha development), as it will need to be able to handle more just just normal image channels.
-colorspace is a operation NOT a setting! Using it against a Greyscale image makes the image not a expected RGB greyscale image.
-set colorspace is a setting, that changes the colorspace of any without changing its values from what -combine is expecting. It is a temporary stop gap measure.
NOTE for three channels you can use -set colorspace afterward. It is only needed first if four channel CMYK images are involved.
In your own example. NONE of the -colorspace operations are need as the images are all in that colorspace.
As part of ongoing discussions, -combine may need some changes for IM v7 (just about to fork for alpha development), as it will need to be able to handle more just just normal image channels.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/