question: private byte [ ] convertBitmapToBytes ( final Bitmap bitmap ) { int size = bitmap . getRowBytes ( ) * bitmap . getHeight ( ) ; ByteArrayOutputStream out = new ByteArrayOutputStream ( size ) ; try { if ( bitmap . compress ( Bitmap . CompressFormat . PNG , 0 , out ) ) { return out . toByteArray ( ) ; } if ( sLogger . isActivated ( ) ) { sLogger . debug ( "Unable to convert bitmap, compression failed" ) ; } return null ; } finally { CloseableUtils . tryToClose ( out ) ; } }
target:  Converts the specified bitmap to a byte array.