public static int [ ] binaryToRgb ( boolean [ ] binaryArray ) { int [ ] rgbArray = new int [ binaryArray . length ] ; for ( int i = 0 ; i < binaryArray . length ; i ++ ) { if ( binaryArray [ i ] ) { rgbArray [ i ] = 0x00000000 ; } else { rgbArray [ i ] = 0x00FFFFFF ; } } return rgbArray ; }
Converts a boolean array containing the pixel data in BINARY mode to an integer array with the pixel data in RGB mode .