Examples of grabPixels()


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

    LMSFitnessFunction(BufferedImage target) {
        targetPixels = new int[target.getWidth() * target.getHeight()];
        PixelGrabber pg = new PixelGrabber(target, 0, 0, target.getWidth(),
                target.getHeight(), targetPixels, 0, target.getWidth());
        try {
            pg.grabPixels();
        } catch (InterruptedException ex) {
            Logger.getLogger(LMSFitnessFunction.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

View Full Code Here

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

                BufferedImage.TYPE_INT_ARGB);
        final int[] generatedPixels = new int[generated.getWidth() * generated.getHeight()];
        PixelGrabber pg = new PixelGrabber(generated, 0, 0, generated.getWidth(),
                generated.getHeight(), generatedPixels, 0, generated.getWidth());
        try {
            pg.grabPixels();
        } catch (InterruptedException ex) {
            Logger.getLogger(LMSFitnessFunction.class.getName()).log(Level.SEVERE, null, ex);
        }

        long sum = 0;
View Full Code Here

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

        int[] pixels = image != null ? new int[w * h] : null;

        if (image != null) {
            try {
                PixelGrabber pg = new PixelGrabber(image, 0, 0, w, h, pixels, 0, w);
                pg.grabPixels();
                if ((pg.getStatus() & ImageObserver.ABORT) != 0) {
                    throw new IOException("failed to load image contents");
                }
            } catch (InterruptedException e) {
                throw new IOException("image load interrupted");
View Full Code Here

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

        // Grab the entire image
        this.pixels = new int[width * height];
        PixelGrabber grabber = new PixelGrabber(image, 0, 0, width, height,
                                                pixels, 0, width);
        try {
            if (!grabber.grabPixels()) {
                if ((grabber.getStatus() & ImageObserver.ABORT) != 0) {
                    throw new RuntimeException(JaiI18N.getString("AWTImageOpImage2"));
    } else {
                    throw new RuntimeException(grabber.getStatus() + JaiI18N.getString("AWTImageOpImage3"));
                }
View Full Code Here

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

            spline.setBarImage(splineBarImage);
            int[] pixels = new int[1 * h];
            PixelGrabber pg = new PixelGrabber(imFullEqualizer, 115, 294, 1, h, pixels, 0, 1);
            try
            {
                pg.grabPixels();
            }
            catch (InterruptedException e)
            {
                log.debug(e);
            }
View Full Code Here

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

    PixelGrabber grabber = new PixelGrabber(im.getSource(), 0, 0,
                                            width, height,
                                            pixels, 0, width);
    try // get the pixels
    {
      grabber.grabPixels();
    }
    catch (InterruptedException e)
    {
      throw new IllegalArgumentException("While grabbing pixels:");
    }
View Full Code Here

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

    PixelGrabber grabber = new PixelGrabber(image.getSource(), 0, 0,
                                            width, height,
                                            pixels, 0, width);
    try // get the pixels
    {
      grabber.grabPixels();
    }
    catch (InterruptedException e)
    {
      throw new InterruptedIOException("While grabbing pixels:");
    }
View Full Code Here

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

                                            width, height,
                                            pixels,
                                            0, width);
    try
    {
      grabber.grabPixels();
    }
    catch (InterruptedException e)
    {
      throw new IllegalArgumentException("While grabbing pixels:");
    }
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
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.