Examples of PixelGrabber


Examples of java.awt.image.PixelGrabber

   */
  public void downSample() {
    final int w = this.entryImage.getWidth(this);
    final int h = this.entryImage.getHeight(this);

    final PixelGrabber grabber = new PixelGrabber(this.entryImage, 0, 0, w,
        h, true);
    try {

      grabber.grabPixels();
      this.pixelMap = (int[]) grabber.getPixels();
      findBounds(w, h);

      // now downsample
      final SampleData data = this.sample.getData();

View Full Code Here

Examples of java.awt.image.PixelGrabber

            return bimage.getColorModel().hasAlpha();
        }

        // Use a pixel grabber to retrieve the image's color model;
        // grabbing a single pixel is usually sufficient
        PixelGrabber pg = new PixelGrabber(image, 0, 0, 1, 1, false);

        try {
            pg.grabPixels();
        } catch (InterruptedException e) {
        }

        // Get the image's color model
        ColorModel cm = pg.getColorModel();

        return cm.hasAlpha();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.