Exemple #1
0
  private Bitmap loadImageFromFile(String file) {
    Options options = getOptimizedBitmapOption();
    if (options.inJustDecodeBounds) {
      BitmapFactory.decodeFile(file, options);
      options.inSampleSize = calculateInSampleSize(options, mMaxWidth, mMaxHeight);
      options.inJustDecodeBounds = false;
    }

    Bitmap btm = DebugBitmap.decodeFile(file, options);
    return btm;
  }