![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e671. Getting and Setting Pixels in a Buffered Image// Get a pixel int rgb = bufferedImage.getRGB(x, y); // Get all the pixels int w = bufferedImage.getWidth(null); int h = bufferedImage.getHeight(null); int[] rgbs = new int[w*h]; bufferedImage.getRGB(0, 0, w, h, rgbs, 0, w); // Set a pixel rgb = 0xFF00FF00; // green bufferedImage.setRGB(x, y, rgb);
e667. Creating a Buffered Image from an Image e668. Creating a Buffered Image from an Array of Color-Indexed Pixel Values e669. Drawing on a Buffered Image e670. Converting a Buffered Image to an Image e672. Scaling, Shearing, Translating, and Rotating a Buffered Image
© 2002 Addison-Wesley. |