Examples of grabPixels()


Examples of java.awt.image.PixelGrabber.grabPixels()

  private void rasterize(Platform3D platform, boolean antialias) {
   
    PixelGrabber pixelGrabber = new PixelGrabber(platform.imageOffscreen, 0, 0,
                                                 mapWidth, height, true);
    try {
      pixelGrabber.grabPixels();
    } catch (InterruptedException e) {
      // impossible?
      return;
    }
    int pixels[] = (int[])pixelGrabber.getPixels();
View Full Code Here

Examples of java.awt.image.PixelGrabber.grabPixels()

        int[] pixels = new int[width * nRows];

        pg = new PixelGrabber(image, 0, startRow, width, nRows, pixels, 0,
            width);
        try {
          pg.grabPixels();
        } catch (Exception e) {
          System.err.println("interrupted waiting for pixels!");
          return false;
        }
        if ((pg.getStatus() & ImageObserver.ABORT) != 0) {
View Full Code Here

Examples of java.awt.image.PixelGrabber.grabPixels()

        textArea.printAll(image.getGraphics());

        // Grab appropriate pixels to get the color
        PixelGrabber pixelGrabber = new PixelGrabber(image, 5, 5, 1, 1, pixels, 0, 1);
        try {
            pixelGrabber.grabPixels();
            if (pixels[0] == -1) {
                return Color.WHITE; // System background not customized
            }
        } catch (InterruptedException e) {
            return getNonGTKProfilerResultsBackground();
View Full Code Here

Examples of java.awt.image.PixelGrabber.grabPixels()

    public DirectGif89Frame(final Image img) throws IOException {
        PixelGrabber pg = new PixelGrabber(img, 0, 0, -1, -1, true);

        String errmsg = null;
        try {
            if (!pg.grabPixels()) {
                errmsg = "can't grab pixels from image";
            }
        } catch (InterruptedException e) {
            errmsg = "interrupted grabbing pixels from image";
        }
View Full Code Here

Examples of java.awt.image.PixelGrabber.grabPixels()

    public DirectGif89Frame(final Image img) throws IOException {
        PixelGrabber pg = new PixelGrabber(img, 0, 0, -1, -1, true);

        String errmsg = null;
        try {
            if (!pg.grabPixels()) {
                errmsg = "can't grab pixels from image";
            }
        } catch (InterruptedException e) {
            errmsg = "interrupted grabbing pixels from image";
        }
View Full Code Here

Examples of java.awt.image.PixelGrabber.grabPixels()

        public ImageInfo(Image img) throws InterruptedException {
            w = img.getWidth(null);
            h = img.getHeight(null);
            pixels = new int[w*h];
            PixelGrabber pg = new PixelGrabber(img, 0, 0, w, h, pixels, 0, w);
            pg.grabPixels();
        }
       
        public boolean equals(Object that) {
            if(that == null) {
                return false;
View Full Code Here

Examples of java.awt.image.PixelGrabber.grabPixels()

        public ImageInfo(Image img) throws InterruptedException {
            w = img.getWidth(null);
            h = img.getHeight(null);
            pixels = new int[w*h];
            PixelGrabber pg = new PixelGrabber(img, 0, 0, w, h, pixels, 0, w);
            pg.grabPixels();
        }
       
        public boolean equals(Object that) {
            if(that == null) {
                return false;
View Full Code Here

Examples of java.awt.image.PixelGrabber.grabPixels()

    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
View Full Code Here

Examples of java.awt.image.PixelGrabber.grabPixels()

    final PixelGrabber grabber = new PixelGrabber(image, 0, 0,
        getImageWidth(), getImageHeight(), true);

    try {
      grabber.grabPixels();
    } catch (final InterruptedException e) {
      throw new EncogError(e);
    }

    setPixelMap((int[]) grabber.getPixels());
View Full Code Here

Examples of java.awt.image.PixelGrabber.grabPixels()

    final PixelGrabber grabber = new PixelGrabber(image, 0, 0,
        this.imageWidth, this.imageWidth, true);

    try {
      grabber.grabPixels();
    } catch (final InterruptedException e) {
      throw new EncogError(e);
    }

    this.pixelMap = (int[]) grabber.getPixels();
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.