Apply red channel to all channels

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
jojizaidi
Posts: 2
Joined: 2016-09-26T03:26:03-07:00
Authentication code: 1151

Apply red channel to all channels

Post by jojizaidi » 2016-09-26T03:32:48-07:00

Hey guys,

So I have this exr image which has information only in the red channel. I want to create a png/tga from it but would like the Green and Blue channel to have the same information as in the Red channel.

Any thoughts?

snibgo
Posts: 11683
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Apply red channel to all channels

Post by snibgo » 2016-09-26T05:12:15-07:00

Something like this:

Code: Select all

convert in.exr -channel R -separate +channel -duplicate 2 -combine -set colorspace sRGB out.tga
snibgo's IM pages: im.snibgo.com

jojizaidi
Posts: 2
Joined: 2016-09-26T03:26:03-07:00
Authentication code: 1151

Re: Apply red channel to all channels

Post by jojizaidi » 2016-10-03T04:38:02-07:00

Hey thanks.. works like a charm !!

Post Reply