question: private Image createPackedImage8 ( ) throws IOException { int size = input . readByte ( ) & 0xff ; if ( size == 0 ) { size = 256 ; } int [ ] palette = new int [ size ] ; int plen = palette . length ; for ( int iter = 0 ; iter < plen ; iter ++ ) { palette [ iter ] = input . readInt ( ) ; } int width = input . readShort ( ) ; int height = input . readShort ( ) ; byte [ ] data = new byte [ width * height ] ; input . readFully ( data , 0 , data . length ) ; return Image . createIndexed ( width , height , palette , data ) ; }
target:  Creates a packed image from the input stream for an 8 bit packed image