示例#1
0
 public Bitmap miniThumbBitmap() {
   Bitmap b = null;
   try {
     long id = mId;
     b =
         BitmapManager.instance()
             .getThumbnail(mContentResolver, id, Images.Thumbnails.MICRO_KIND, null, false);
   } catch (Throwable ex) {
     Log.e(TAG, "miniThumbBitmap got exception", ex);
     return null;
   }
   if (b != null) {
     b = Util.rotate(b, getDegreesRotated());
   }
   return b;
 }
示例#2
0
 private void setupDimension() {
   ParcelFileDescriptor input = null;
   try {
     input = mContentResolver.openFileDescriptor(mUri, "r");
     BitmapFactory.Options options = new BitmapFactory.Options();
     options.inJustDecodeBounds = true;
     BitmapManager.instance().decodeFileDescriptor(input.getFileDescriptor(), options);
     mWidth = options.outWidth;
     mHeight = options.outHeight;
   } catch (FileNotFoundException ex) {
     mWidth = 0;
     mHeight = 0;
   } finally {
     Util.closeSilently(input);
   }
 }