Hi all. I have an image saved in tiff format which is 24 bits per pixel. May I know if there's a program written in C language or java that can convert the 24 bits per pixel to 48 bits per pixel?
If I was writing such a program in C, I'd start by looking at libtiff. It's pretty straightforward to read and write tiff image data.
The more interesting question is how you convert 24-bit image data to 48-bit. The output is wider than the input, so you have to come up with the missing bits from somewhere. You might naively start by setting the lowest eight bits to zero in each of the three channels, but some sort of interpolation would likely give better results.
There might be some useful tips waiting to be mined from the source to gimp and graphicsmagick. (Indeed, they can probably already do such conversions before breakfast without blinking.)
I'm not quite sure if it is able to handle 48bit tiffs, but you might want to have a look at imagemagick