private Bitmap processBitmap(String key,int type){
  Log.d(TAG,"processBitmap - " + key);
  if (type == ImageData.IMAGE_TYPE_NORMAL) {
    final File f=downloadBitmapToFile(mContext,key,mFetcherParams.mHttpCacheDir);
    if (f != null) {
      final Bitmap bitmap=decodeSampledBitmapFromFile(f.toString(),mFetcherParams.mImageWidth,mFetcherParams.mImageHeight);
      f.delete();
      return bitmap;
    }
  }
 else   if (type == ImageData.IMAGE_TYPE_THUMBNAIL) {
    final byte[] bitmapBytes=downloadBitmapToMemory(mContext,key,mFetcherParams.mMaxThumbnailBytes);
    if (bitmapBytes != null) {
      return BitmapFactory.decodeByteArray(bitmapBytes,0,bitmapBytes.length);
    }
  }
 else   if (type == ImageData.IMAGE_TYPE_LOCAL) {
    final Bitmap bitmap=decodeSampledBitmapFromFile(key,mFetcherParams.mImageThumbnailWidth,mFetcherParams.mImageThumbnailHeight);
    return bitmap;
  }
  return null;
}

private Bitmap processBitmap ( String key , int type ) { Log . d ( TAG , "processBitmap - " + key ) ; if ( type == ImageData . IMAGE_TYPE_NORMAL ) { final File f = downloadBitmapToFile ( mContext , key , mFetcherParams . mHttpCacheDir ) ; if ( f != null ) { final Bitmap bitmap = decodeSampledBitmapFromFile ( f . toString ( ) , mFetcherParams . mImageWidth , mFetcherParams . mImageHeight ) ; f . delete ( ) ; return bitmap ; } } else if ( type == ImageData . IMAGE_TYPE_THUMBNAIL ) { final byte [ ] bitmapBytes = downloadBitmapToMemory ( mContext , key , mFetcherParams . mMaxThumbnailBytes ) ; if ( bitmapBytes != null ) { return BitmapFactory . decodeByteArray ( bitmapBytes , 0 , bitmapBytes . length ) ; } } else if ( type == ImageData . IMAGE_TYPE_LOCAL ) { final Bitmap bitmap = decodeSampledBitmapFromFile ( key , mFetcherParams . mImageThumbnailWidth , mFetcherParams . mImageThumbnailHeight ) ; return bitmap ; } return null ; }
the main process method , which will be called by the imageworker in the asynctask background thread .
