How to create a RGB (or any) image from any image kind in Java
- Assume we have an image
img
- Create a new buffered image:
BufferedImage buffImg = new BufferedImage(img.getWidth(null), img.getHeight(null), BufferedImage.TYPE_INT_RGB);
- copy the original image into the newly created buffered image:
Graphics2D g = buffImg.createGraphics();
g.drawImage(img, 0, 0, null);
g.dispose();
- Be happy with your new buffered image.
This entry was posted
on Friday, March 10th, 2006 at 10:46 and is filed under Development.
You can follow any responses to this entry through the RSS 2.0 feed.
You can skip to the end and leave a response. Pinging is currently not allowed.