Grayscale to RGB

Hello,I am trying to convert a grayscale image (pixelBits = 8 numComponents = 1) to an rgb image (pixelBits = 24 numComponents = 3).There are many tutorials to convert RBG to grayscale but not the opposite...Any idea ?Thanks.
[260 byte] By [Yann_LGa] at [2007-11-27 2:42:38]
# 1

I think I found the solution :

PlanarImage src = JAI.create("fileload", "Photo.jpg");

System.out.println(src.getColorModel());

double[][] matrix = {

{ 1.0D, 0.0D },

{ 1.0D, 0.0D },

{ 1.0D, 0.0D }

};

ParameterBlock pb = new ParameterBlock();

pb.addSource(src);

pb.add(matrix2);

// Perform the band combine operation.

PlanarImage dst = (PlanarImage)JAI.create("bandcombine", pb, null);

System.out.println(dst .getColorModel());

Yann_LGa at 2007-7-12 3:07:29 > top of Java-index,Security,Cryptography...