public int getPixelValue ( byte [ ] imageBytes , int x , int y ) { PngReaderInt reader = new PngReaderInt ( new ByteArrayInputStream ( imageBytes ) ) ; validateImageType ( reader ) ; ImageLineInt row = ( ImageLineInt ) reader . readRow ( y ) ; int pixelValue = row . getScanline ( ) [ x ] ; reader . close ( ) ; return pixelValue ; }
Get the pixel value as a 16 bit unsigned integer value