Page 1 of 1
Compose an RBG image from 3 grayscale images
Posted: 2007-06-15T12:04:43-07:00
by rmagick
Question from an RMagick user: "I have 3 grayscale images, each representing one color channel of an image (RGB). I want to recompose the colored image."
How would I do this using the utility commands?
Re: Compose an RBG image from 3 grayscale images
Posted: 2007-06-16T08:28:07-07:00
by el_supremo
This combines the gray scale images into one rgb image:
Code: Select all
convert image_r.jpg image_g.jpg image_b.jpg -combine image_combo.jpg
Pete
Re: Compose an RBG image from 3 grayscale images
Posted: 2007-06-17T13:23:48-07:00
by rmagick
Thanks! Of course CombineImages is one of the few APIs that RMagick doesn't support. I figured out another way though, using 3 composite operations. Now I'm off to add support for CombineImages...
Re: Compose an RBG image from 3 grayscale images
Posted: 2007-06-17T19:29:34-07:00
by anthony
It was a late addition when IM v6 was release in response to a users problem, so I am not suprised you missed it.
You probably should check -separate too as it when from one channel only to multiple channles (as multiple images).
Both use channels to determine which channels are being separated or combined.
You can for example miss the 'blue' channel bu using -channel RGA but order
is always RGBA as channel only sets flags, it does not remember order.
Re: Compose an RBG image from 3 grayscale images
Posted: 2007-06-18T15:09:15-07:00
by rmagick
Thanks, Anthony. I'll check it out. I added CombineImages yesterday.