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?
Compose an RBG image from 3 grayscale images
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00
Re: Compose an RBG image from 3 grayscale images
This combines the gray scale images into one rgb image:
Pete
Code: Select all
convert image_r.jpg image_g.jpg image_b.jpg -combine image_combo.jpg
Re: Compose an RBG image from 3 grayscale images
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...
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Compose an RBG image from 3 grayscale images
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.
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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Compose an RBG image from 3 grayscale images
Thanks, Anthony. I'll check it out. I added CombineImages yesterday.