List of utility methods to do BufferedImage from Image
BufferedImage | bufferImage(Image image) Create a BufferedImage from an Image. BufferedImage bufferedImage = null; int imageWidth = image.getWidth(null); int imageHeight = image.getHeight(null); if (imageWidth > 0 && imageHeight > 0) { bufferedImage = new BufferedImage(imageWidth, imageHeight, BufferedImage.TYPE_INT_RGB); Graphics g = bufferedImage.getGraphics(); g.drawImage(image, 0, 0, null); return bufferedImage; |