[Solved] Combine RGB images problem
Posted: 2011-08-09T07:29:40-07:00
Hi,
I am trying to change the gamma of each image channel from an initial image but what I get is a strange yellow image ..
Although if I split and save each individual image it works correctly ...
So if do something like this I get the correct colored final image:
convert -monitor image1.jpg -depth 32 -auto-level -set colorspace RGB ^
-channel R -separate -gamma 3 -blur 0x2 PNG:image1_red.png
convert -monitor image1 -depth 32 -auto-level -set colorspace RGB ^
-channel g -separate -gamma 0.9 PNG:image1_green.png
convert -monitor image1 -depth 32 -auto-level -set colorspace RGB ^
-channel b -separate -gamma 0.85 PNG:image1_blue.png
convert -monitor image1_red.png image1_green.png image1_blue.png -colorspace RGB -quality 98 -combine JPG:image1_final.jpg
----------------------------------------------------------------------------------------------------------------------------
But if I try this :
convert -monitor image1 -depth 32 -auto-level -set colorspace RGB
( -clone 0 -channel R -separate -gamma 3 -blur 0x2 )
( -clone 0 -channel G -separate -gamma 0.95 )
( -clone 0 -channel B -separate -gamma 0.85 )
-delete 0 -colorspace RGB -quality 98 -combine JPG:iamge1_finala.jpg
I only get a full yellow image ....
What am I doing wrong ?
I even tried swaping the channels but still same problem this time with a resulting black image...
any ideas ?
I am trying to change the gamma of each image channel from an initial image but what I get is a strange yellow image ..
Although if I split and save each individual image it works correctly ...
So if do something like this I get the correct colored final image:
convert -monitor image1.jpg -depth 32 -auto-level -set colorspace RGB ^
-channel R -separate -gamma 3 -blur 0x2 PNG:image1_red.png
convert -monitor image1 -depth 32 -auto-level -set colorspace RGB ^
-channel g -separate -gamma 0.9 PNG:image1_green.png
convert -monitor image1 -depth 32 -auto-level -set colorspace RGB ^
-channel b -separate -gamma 0.85 PNG:image1_blue.png
convert -monitor image1_red.png image1_green.png image1_blue.png -colorspace RGB -quality 98 -combine JPG:image1_final.jpg
----------------------------------------------------------------------------------------------------------------------------
But if I try this :
convert -monitor image1 -depth 32 -auto-level -set colorspace RGB
( -clone 0 -channel R -separate -gamma 3 -blur 0x2 )
( -clone 0 -channel G -separate -gamma 0.95 )
( -clone 0 -channel B -separate -gamma 0.85 )
-delete 0 -colorspace RGB -quality 98 -combine JPG:iamge1_finala.jpg
I only get a full yellow image ....
What am I doing wrong ?
I even tried swaping the channels but still same problem this time with a resulting black image...
any ideas ?