Lines Matching refs:bitmap
20 import android.graphics.Bitmap;
21 import android.graphics.Bitmap.CompressFormat;
84 options.inPreferredConfig = Bitmap.Config.ARGB_8888;
86 Bitmap bitmap = DecodeUtils.decodeThumbnail(sJobStub, inBitmap.getPath(), options, size,
88 boolean success = (bitmap != null);
90 success = writeAndRecycle(bitmap, outBitmap);
95 public static boolean downsample(Bitmap inBitmap, MediaSize size, File outBitmap) {
108 Bitmap scaled = Bitmap.createScaledBitmap(inBitmap, targetWidth, targetHeight, false);
116 Bitmap bitmap = BitmapUtils.createVideoThumbnail(inVideo.getPath());
117 return writeAndRecycle(bitmap, outBitmap);
120 public static boolean needsDownsample(Bitmap bitmap, MediaSize size) {
125 int maxDimension = Math.max(bitmap.getWidth(), bitmap.getHeight());
129 public static boolean writeAndRecycle(Bitmap bitmap, File outBitmap) {
130 boolean success = writeToFile(bitmap, outBitmap);
131 bitmap.recycle();
135 public static boolean writeToFile(Bitmap bitmap, File outBitmap) {
139 success = bitmap.compress(CompressFormat.JPEG, QUALITY, out);
142 Log.w(TAG, "Couldn't write bitmap to cache", e);