Tag: 像素操作

缓冲图像像素操作

我有这个代码: public Image toNegative() { int imageWidth = originalImage.getWidth(); int imageHeight = originalImage.getHeight(); int [] rgb = null; // new int[imageWidth * imageWidth]; originalImage.getRGB(0, 0, imageWidth, imageHeight, rgb, 0,imageWidth); for (int y = 0; y < imageHeight; y++) { for (int x = 0; x > 16) & 0xff; //bitwise shifting int G = (rgb[index] […]