b.java 1.35 KB
package com.instabug.library.util;

import android.content.ContentResolver;
import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;
import android.graphics.BitmapFactory;
import android.graphics.BitmapFactory.Options;
import android.net.Uri;
import java.io.FileNotFoundException;

public class b
{
  public static Bitmap a(ContentResolver paramContentResolver, Uri paramUri)
    throws FileNotFoundException
  {
    Object localObject = new BitmapFactory.Options();
    ((BitmapFactory.Options)localObject).inJustDecodeBounds = true;
    BitmapFactory.decodeStream(paramContentResolver.openInputStream(paramUri), null, (BitmapFactory.Options)localObject);
    int i = ((BitmapFactory.Options)localObject).outWidth;
    int j = ((BitmapFactory.Options)localObject).outHeight;
    i /= 900;
    localObject = new BitmapFactory.Options();
    ((BitmapFactory.Options)localObject).inSampleSize = i;
    localObject = BitmapFactory.decodeStream(paramContentResolver.openInputStream(paramUri), null, (BitmapFactory.Options)localObject);
    ((Bitmap)localObject).compress(Bitmap.CompressFormat.JPEG, 100, paramContentResolver.openOutputStream(paramUri));
    return (Bitmap)localObject;
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/com/instabug/library/util/b.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */