http://www.javadocexamples.com/java/awt/image/BufferedImage/setRGB(int%20startX,int%20startY,int%20w,int%20h,int[]%20rgbArray,int%20offset,int%20scansize).html
1: public class ColorPan extends JComponent { 2: BufferedImage image; 3: 4: ... 5: } 6: image = new BufferedImage(width, height, 7: ... 8: BufferedImage.TYPE_INT_RGB); 9: ... 10: image.setRGB(0, 0, width, height, data, 0, width);

1: 2: import java.awt.image.BufferedImage; 3: import java.util.Arrays; 4: ... 5: 6: public static BufferedImage createTransparentImage (final int width, final int height) 7: { 8: ... 9: final BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); 10: final int[] data = img.getRGB(0, 0, width, height, null, 0, width); 11: ... 12: Arrays.fill(data, 0x00000000); 13: img.setRGB(0, 0, width, height, data, 0, width);

1: 2: import java.awt.image.BufferedImage; 3: import java.util.Arrays; 4: ... 5: 6: public static BufferedImage createTransparentImage (final int width, final int height) 7: { 8: ... 9: final BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); 10: final int[] data = img.getRGB(0, 0, width, height, null, 0, width); 11: ... 12: Arrays.fill(data, 0x00000000); 13: img.setRGB(0, 0, width, height, data, 0, width);

1: import javax.imageio.stream.ImageInputStream; 2: import java.awt.image.BufferedImage; 3: import java.awt.Dimension; 4: ... 5: 6: public BufferedImage decode(ImageInputStream in) throws IOException, BMPException { 7: skipToImage(in); 8: ... 9: int w = (int)d.getWidth(); 10: BufferedImage image = new BufferedImage(w, h, 11: BufferedImage.TYPE_INT_RGB); 12: ... 13: } 14: image.setRGB(0, 0, w, h, data, 0, w);

1: 2: import java.awt.image.BufferedImage; 3: import java.io.IOException; 4: ... 5: 6: public BufferedImage setRecord (final MfRecord record) 7: throws IOException 8: ... 9: 10: public BufferedImage setRecord (final MfRecord record, final int offset) 11: throws IOException 12: ... 13: final BufferedImage retval = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); 14: retval.setRGB(0, 0, width, height, data, 0, width);

1: private Image logo; 2: private BufferedImage bi; 3: private int[] original; 4: ... 5: if ((modifier & InputEvent.BUTTON2_MASK) != 0) { 6: bi.setRGB(0, 0, w, h, original, 0, w); 7: repaint(); 8: ... 9: } 10: bi.setRGB(0, 0, w, h, rgb, 0, w); 11: repaint();

1: import java.awt.Image; 2: import java.awt.image.BufferedImage; 3: import java.awt.image.ImageObserver; 4: ... 5: long time = System.currentTimeMillis(); 6: BufferedImage image; 7: int transferSize; 8: ... 9: { 10: image = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB); 11: } 12: ... 13: int[] img = (int[]) server.getImage(ID, RemoteImageServer.FAST_CONNECTION); 14: image.setRGB(0, 0, w, h, img, 0, w);

1: long duration; 2: BufferedImage im = null; 3: running = true; 4: ... 5: 6: private void analyzeImage(BufferedImage im) 7: { 8: ... 9: 10: im.setRGB(0, 0, imWidth, imHeight, pixels, 0, imWidth);

1: import java.awt.event.KeyEvent; 2: import java.awt.image.BufferedImage; 3: import java.lang.reflect.Field; 4: ... 5: 6: private BufferedImage createTransparentImage(final int width, final int height) { 7: #if USE_ORIGINAL_CODE 8: ... 9: final BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); 10: final int[] data = img.getRGB(0, 0, width, height, null, 0, width); 11: ... 12: Arrays.fill(data, 0x00000000); 13: img.setRGB(0, 0, width, height, data, 0, width);
