DataBufferFloat dbf = new DataBufferFloat(w * h * 3);
int offsets[] = new int[]{0,1,2};
ComponentSampleModel csm = new ComponentSampleModel(DataBuffer.TYPE_FLOAT,
w, h, 3, 3 * w, offsets);
WritableRaster wr = new OrdinaryWritableRaster(csm, dbf, new Point(0, 0));
ColorModel cm = new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), false, false, Transparency.OPAQUE, DataBuffer.TYPE_FLOAT);
BufferedImage dst = new BufferedImage(cm, wr, cm.isAlphaPremultiplied(), null);
Graphics2D g2d = dst.createGraphics();
g2d.drawImage(src, 0, 0, null);