Java BufferedImage Pixel pixelsFromBufferedImage(final BufferedImage image)

Here you can find the source of pixelsFromBufferedImage(final BufferedImage image)

Description

pixels From Buffered Image

License

Open Source License

Declaration

public static int[][] pixelsFromBufferedImage(final BufferedImage image) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.awt.image.BufferedImage;

public class Main {
    public static int[][] pixelsFromBufferedImage(final BufferedImage image) {
        int[][] pixArr = new int[image.getWidth()][image.getHeight()];
        for (int x = 0; x < image.getWidth(); x++) {
            for (int y = 0; y < image.getHeight(); y++) {
                pixArr[x][y] = image.getRGB(x, y);
            }/*  ww w  .  j ava 2  s.  c om*/
        }
        return pixArr;
    }
}

Related

  1. extractFromPixeldata(short[] pixeldata, int columns, int stride, int mask, byte[] ovlyData, int off, int length)
  2. getRandomPixel(final String fileName)
  3. imageFromIntArray(int[] pixels, int w, int h)
  4. pixels(BufferedImage image)
  5. pixelsb(BufferedImage image)
  6. pixelsg(BufferedImage image)
  7. pixelsToImage(int[][] pixels)
  8. setRGB(BufferedImage image, int x, int y, int width, int height, int[] pixels)
  9. toRgbPixels(BufferedImage image)