question: private Response < BitmapDrawable > doFileParse ( ) { final String requestUrl = getUrl ( ) ; File bitmapFile = new File ( requestUrl . substring ( 7 , requestUrl . length ( ) ) ) ; if ( ! bitmapFile . exists ( ) || ! bitmapFile . isFile ( ) ) { return Response . error ( new ParseError ( new FileNotFoundException ( String . format ( "File not found: %s" , bitmapFile . getAbsolutePath ( ) ) ) ) ) ; } BitmapFactory . Options decodeOptions = new BitmapFactory . Options ( ) ; decodeOptions . inInputShareable = true ; decodeOptions . inPurgeable = true ; decodeOptions . inPreferredConfig = mDecodeConfig ; Bitmap bitmap ; if ( mMaxWidth == 0 && mMaxHeight == 0 ) { bitmap = BitmapFactory . decodeFile ( bitmapFile . getAbsolutePath ( ) , decodeOptions ) ; addMarker ( "read-full-size-image-from-file" ) ; } else { decodeOptions . inJustDecodeBounds = true ; BitmapFactory . decodeFile ( bitmapFile . getAbsolutePath ( ) , decodeOptions ) ; int actualWidth = decodeOptions . outWidth ; int actualHeight = decodeOptions . outHeight ; int desiredWidth = getResizedDimension ( mMaxWidth , mMaxHeight , actualWidth , actualHeight ) ; int desiredHeight = getResizedDimension ( mMaxHeight , mMaxWidth , actualHeight , actualWidth ) ; decodeOptions . inJustDecodeBounds = false ; decodeOptions . inSampleSize = ImageUtils . findBestSampleSize ( actualWidth , actualHeight , desiredWidth , desiredHeight ) ; Bitmap tempBitmap = BitmapFactory . decodeFile ( bitmapFile . getAbsolutePath ( ) , decodeOptions ) ; addMarker ( String . format ( "read-from-file-scaled-times-%d" , decodeOptions . inSampleSize ) ) ; if ( tempBitmap != null && ( tempBitmap . getWidth ( ) > desiredWidth || tempBitmap . getHeight ( ) > desiredHeight ) ) { bitmap = Bitmap . createScaledBitmap ( tempBitmap , desiredWidth , desiredHeight , true ) ; tempBitmap . recycle ( ) ; addMarker ( "scaling-read-from-file-bitmap" ) ; } else { bitmap = tempBitmap ; } } if ( bitmap == null ) { return Response . error ( new ParseError ( ) ) ; } else { BitmapDrawable drawable ; if ( Utils . hasHoneycomb ( ) ) { drawable = new BitmapDrawable ( mResources , bitmap ) ; } else { drawable = new RecyclingBitmapDrawable ( mResources , bitmap ) ; } return Response . success ( drawable , HttpHeaderParser . parseBitmapCacheHeaders ( bitmap ) ) ; } }
target:  The real guts of parseNetworkResponse. Broken out for readability. This version is for reading a Bitmap from file