private void generateBlackPixels(){
  log.info("Converting image to monochrome");
  BufferedImage bi=bufferedImage;
  int h=bi.getHeight();
  int w=bi.getWidth();
  int[] rgbPixels=bi.getRGB(0,0,w,h,null,0,w);
  int i=0;
  boolean[] pixels=new boolean[rgbPixels.length];
  for (  int rgbpixel : rgbPixels) {
    pixels[i++]=languageType.requiresImageOutputInverted() ? !isBlack(rgbpixel) : isBlack(rgbpixel);
  }
  setImageAsBooleanArray(pixels);
}

private void generateBlackPixels ( ) { log . info ( "Converting image to monochrome" ) ; BufferedImage bi = bufferedImage ; int h = bi . getHeight ( ) ; int w = bi . getWidth ( ) ; int [ ] rgbPixels = bi . getRGB ( 0 , 0 , w , h , null , 0 , w ) ; int i = 0 ; boolean [ ] pixels = new boolean [ rgbPixels . length ] ; for ( int rgbpixel : rgbPixels ) { pixels [ i ++ ] = languageType . requiresImageOutputInverted ( ) ? ! isBlack ( rgbpixel ) : isBlack ( rgbpixel ) ; } setImageAsBooleanArray ( pixels ) ; }
sets imageasbooleanarray . boolean is used instead of int for memory considerations .
