Image -> ImageBuffer

Is there a fast way to create ImageBuffer from Image?I can do it via PixelGrabber, but this is too slow... :(
[130 byte] By [DadEvil] at [2007-9-26 14:09:04]
# 1

public static BufferedImage Conversion(Image img, int wid, int ht, int type)

{

BufferedImage bi = new BufferedImage(wid,ht,type);

Graphics2D g2d = bi.createGraphics();

g2d.drawImage(img,0,0,wid,ht,null);

return bi;

}

I hope this can help

rotnacogeid at 2007-7-2 15:31:24 > top of Java-index,Security,Cryptography...