public BufferedImage lineGrey() {   
       PixelGrabber pg = new PixelGrabber(image.getSource(), 0, 0, iw, ih, pixels, 0, iw);   
       try {   
           pg.grabPixels();   
       } catch (InterruptedException e) {   
           e.printStackTrace();   
       }   
  
       // 对图像进行进行线性拉伸，Alpha值保持不变   
       ColorModel cm = ColorModel.getRGBdefault();   
  
       for (int i = 0; i < iw * ih; i++) {   
           int alpha = cm.getAlpha(pixels[i]);   
           int red = cm.getRed(pixels[i]);   
           int green = cm.getGreen(pixels[i]);   
           int blue = cm.getBlue(pixels[i]);   
  
           // 增加了图像的亮度   
           red = (int) (1.1 * red + 30);   
           green = (int) (1.1 * green + 30);   
           blue = (int) (1.1 * blue + 30);   
           if (red >= 255) {   
              red = 255;   
           }   
  
           if (green >= 255) {   
              green = 255;   
           }   
  
           if (blue >= 255) {   
              blue = 255;   
           }   
           pixels[i] = alpha << 24 | red << 16 | green << 8 | blue;   
       }   
  
       // 将数组中的象素产生一个图像   
       return ImageIOHelper.imageProducerToBufferedImage(new MemoryImageSource(iw, ih, pixels, 0, iw));   
    }