Home | History | Annotate | Download | only in media

Lines Matching refs:Bitmap

23 import android.graphics.Bitmap;
49 /* Maximum pixels size for created bitmap. */
60 * {@link #extractThumbnail(Bitmap, int, int, int)} unless the output is the input.
86 * @return Bitmap, or null on failures
90 public static Bitmap createImageThumbnail(String filePath, int kind) {
99 Bitmap bitmap = null;
103 bitmap = sizedThumbnailBitmap.mBitmap;
106 if (bitmap == null) {
124 options.inPreferredConfig = Bitmap.Config.ARGB_8888;
125 bitmap = BitmapFactory.decodeFileDescriptor(fd, null, options);
144 bitmap = extractThumbnail(bitmap,
148 return bitmap;
158 public static Bitmap createVideoThumbnail(String filePath, int kind) {
159 Bitmap bitmap = null;
163 bitmap = retriever.getFrameAtTime(-1);
176 if (bitmap == null) return null;
179 // Scale down the bitmap if it's too large.
180 int width = bitmap.getWidth();
181 int height = bitmap.getHeight();
187 bitmap = Bitmap.createScaledBitmap(bitmap, w, h, true);
190 bitmap = extractThumbnail(bitmap,
195 return bitmap;
199 * Creates a centered bitmap of the desired size.
201 * @param source original bitmap source
205 public static Bitmap extractThumbnail(
206 Bitmap source, int width, int height) {
211 * Creates a centered bitmap of the desired size.
213 * @param source original bitmap source
218 public static Bitmap extractThumbnail(
219 Bitmap source, int width, int height, int options) {
232 Bitmap thumbnail = transform(matrix, source, width, height,
241 * bitmap.
249 * generates a smaller bitmap, unless minSideLength = IImage.UNCONSTRAINED.
301 * Make a bitmap from a given Uri, minimal side length, and maximum number of pixels.
305 * Clients are allowed to pass their own BitmapFactory.Options used for bitmap decoding. A
308 private static Bitmap makeBitmap(int minSideLength, int maxNumOfPixels,
311 Bitmap b = null;
330 options.inPreferredConfig = Bitmap.Config.ARGB_8888;
360 * Transform source Bitmap to targeted width and height.
362 private static Bitmap transform(Matrix scaler,
363 Bitmap source,
374 * In this case the bitmap is smaller, at least in one dimension,
379 Bitmap b2 = Bitmap.createBitmap(targetWidth, targetHeight,
380 Bitmap.Config.ARGB_8888);
426 Bitmap b1;
429 b1 = Bitmap.createBitmap(source, 0, 0,
442 Bitmap b2 = Bitmap.createBitmap(
459 * SizedThumbnailBitmap contains the bitmap, which is downsampled either from
464 * The width/height of the sized bitmap may be different from mThumbnailWidth/mThumbnailHeight.
468 public Bitmap mBitmap;
474 * Creates a bitmap by either downsampling from the thumbnail in EXIF or the full image.
476 * which contains a downsampled bitmap and the thumbnail data in EXIF if exists.