[java]代码库package cn.outofmemory.snippets.desktop;
import java.awt.Graphics2D;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.Image;
import java.awt.Toolkit;
import java.awt.Transparency;
import java.awt.image.BufferedImage;
import java.awt.image.ImageObserver;
public class BufferedImagePixels {
static boolean imageLoaded = false;
public static void main(String[] args) {
// The ImageObserver implementation to observe loading of the image
ImageObserver myImageObserver = new ImageObserver() {
public boolean imageUpdate(Image image, int flags, int x, int y, int width, int height) {
if ((flags & ALLBITS) != 0) {
imageLoaded = true;
System.out.println("Image l