public static Planar orderBandsIntoBuffered ( Planar src , BufferedImage dst ) { // see if no change is required if ( dst . getType ( ) == BufferedImage . TYPE_INT_RGB ) return src ; Planar tmp = new Planar ( src . type , src . getNumBands ( ) ) ; tmp . width = src . width ; tmp . height = src . height ; tmp . stride = src . stride ; tmp . startIndex = src . startIndex ; for ( int i = 0 ; i < src . getNumBands ( ) ; i ++ ) { tmp . bands [ i ] = src . bands [ i ] ; } ConvertRaster . orderBandsBufferedFromRgb ( tmp , dst ) ; return tmp ; }
Returns a new image with the color bands in the appropriate ordering . The returned image will reference the original image s image arrays .