public void setBufferedImage(BufferedImage img) {
        image = img;
        width = img.getWidth();
        height = img.getHeight();
        updateColorArray();
    }
public void setBufferedImage ( BufferedImage img ) { image = img ; width = img . getWidth ( ) ; height = img . getHeight ( ) ; updateColorArray ( ) ; }
Sets a new image

@param BufferedImage imagem