question: private TinyPlanetImage createFinalTinyPlanet ( ) { mResultLock . lock ( ) ; try { mResultBitmap . recycle ( ) ; mResultBitmap = null ; mSourceBitmap . recycle ( ) ; mSourceBitmap = null ; } finally { mResultLock . unlock ( ) ; } Bitmap sourceBitmap = createPaddedSourceImage ( mSourceImageUri , false ) ; int width = sourceBitmap . getWidth ( ) ; int height = sourceBitmap . getHeight ( ) ; int outputSize = width / 2 ; Bitmap resultBitmap = Bitmap . createBitmap ( outputSize , outputSize , Bitmap . Config . ARGB_8888 ) ; TinyPlanetNative . process ( sourceBitmap , width , height , resultBitmap , outputSize , mCurrentZoom , mCurrentAngle ) ; sourceBitmap . recycle ( ) ; sourceBitmap = null ; ByteArrayOutputStream jpeg = new ByteArrayOutputStream ( ) ; resultBitmap . compress ( CompressFormat . JPEG , 100 , jpeg ) ; return new TinyPlanetImage ( addExif ( jpeg . toByteArray ( ) ) , outputSize ) ; }
target:  Creates the high quality tiny planet file and adds it to the media service. Don't call this on the UI thread.