Page 1 of 1

Convert 1-channel 16bit to 2-channel 8bit?

Posted: 2016-01-25T03:02:13-07:00
by Rastar
Hi,

I am still pretty new to ImageMagick and wasn't able to figure this out on my own..

I have a texture with two channels with 16bit each (RG16F) and would like to convert this to a 32bit tga texture (RGBA) with 8bits per channel. So the original R channel should be stored in the RG channels of the target textures (with R being the high byte and G the low byte, or vice versa). And similarly, the source G channel would be stored in BA of the target.

Is there a way to do that via the command line, e.g. using the convert routine?

Thanks in advance for your help!

Re: Convert 1-channel 16bit to 2-channel 8bit?

Posted: 2016-01-25T03:28:04-07:00
by snibgo
I don't think the standard IM programs can read files with just two channels. (Perhaps v7 can? I don't know.)

But it sounds as if you just want to change the header of the file, so instead of reading the data as 2 channels of 16 bits each, it is read as 4 channels of 8 bits each.