According to the docs If I tried separating an image channels and then combined them I should get the "original" image ...
So I tried something like :
convert image1-jpg -monitor -colorspace RGB
( -clone 0 -channel R -separate )
( -clone 0 -channel G -separate )
( -clone 0 -channel B -separate )
-delete 0 -combine image1_a.jpg
instead of the "original" image I get a strange result image ( similar to the original but wrong colors ) ( yellowish image)
tried with the "rose: example" with the same results ( strong yellow image) ...
using Windows 6.7.0-10 "Manual compiled" convert.exe Q32 and HDRI
What am I doing wrong ?
RGB Combine odd behaviour -
-
- Posts: 88
- Joined: 2010-06-29T14:36:09-07:00
- Authentication code: 8675308
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: RGB Combine odd behaviour -
Does your jpg have profiles?
Look at identify -verbose yourimage.jpg
If so, then they are probably lost when you do the separate and then combine.
can you post a link to your jpg file for others to review?
Look at identify -verbose yourimage.jpg
If so, then they are probably lost when you do the separate and then combine.
can you post a link to your jpg file for others to review?
-
- Posts: 88
- Joined: 2010-06-29T14:36:09-07:00
- Authentication code: 8675308
Re: RGB Combine odd behaviour -
To avoid the JPG profile issues I tried with the internal rose: ...
and I suppose the problem is related with this:
convert rose: ( -channel R -separate ) ( -channel G -separate ) ( -channel B -separate ) -combine rose3.png
after some more tests I realised that the combine operator is "adding" all images including the initial one !!
So my further question is how can I make the "combine" command ignore the initial file ?
Or do I have to call convert for each separated channel , save into a file ( MIFF ) and "combine" them at the end ?
and I suppose the problem is related with this:
convert rose: ( -channel R -separate ) ( -channel G -separate ) ( -channel B -separate ) -combine rose3.png
after some more tests I realised that the combine operator is "adding" all images including the initial one !!
So my further question is how can I make the "combine" command ignore the initial file ?
Or do I have to call convert for each separated channel , save into a file ( MIFF ) and "combine" them at the end ?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: RGB Combine odd behaviour -
convert rose: -separate -combine rose1.png
compare -metric rmse rose: rose1.png null:
0 (0)
convert rose: -channel rgb \
\( -clone 0 -channel R -separate \) \
\( -clone 0 -channel G -separate \) \
\( -clone 0 -channel B -separate \) \
-delete 0 -channel rgb -combine rose2.png
compare -metric rmse rose: rose2.png null:
0 (0)
be sure the add -channel rgb in both places in the second form (or at least just before the -combine)
compare -metric rmse rose: rose1.png null:
0 (0)
convert rose: -channel rgb \
\( -clone 0 -channel R -separate \) \
\( -clone 0 -channel G -separate \) \
\( -clone 0 -channel B -separate \) \
-delete 0 -channel rgb -combine rose2.png
compare -metric rmse rose: rose2.png null:
0 (0)
be sure the add -channel rgb in both places in the second form (or at least just before the -combine)