/packages/apps/Camera2/src/com/android/camera/ |
Thumbnail.java | 19 import android.graphics.Bitmap; 25 public static Bitmap createVideoThumbnailBitmap(FileDescriptor fd, int targetWidth) { 29 public static Bitmap createVideoThumbnailBitmap(String filePath, int targetWidth) { 33 private static Bitmap createVideoThumbnailBitmap(String filePath, FileDescriptor fd, 35 Bitmap bitmap = null; local 43 bitmap = retriever.getFrameAtTime(-1); 55 if (bitmap == null) return null; 57 // Scale down the bitmap if it is bigger than we need. 58 int width = bitmap.getWidth() [all...] |
/packages/apps/Gallery/src/com/android/camera/ |
RotateBitmap.java | 19 import android.graphics.Bitmap; 24 private Bitmap mBitmap; 27 public RotateBitmap(Bitmap bitmap) { 28 mBitmap = bitmap; 32 public RotateBitmap(Bitmap bitmap, int rotation) { 33 mBitmap = bitmap; 45 public Bitmap getBitmap() { 49 public void setBitmap(Bitmap bitmap) [all...] |
/packages/apps/Gallery/tests/src/com/android/camera/gallery/ |
MockImage.java | 3 import android.graphics.Bitmap; 27 public Bitmap fullSizeBitmap(int minSideLength, int maxNumberOfPixels) { 31 public Bitmap fullSizeBitmap(int minSideLength, int maxNumberOfPixels, 36 public Bitmap fullSizeBitmap(int minSideLength, int maxNumberOfPixels, 93 public Bitmap miniThumbBitmap() { 104 public Bitmap thumbBitmap(boolean rotateAsNeeded) {
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/ |
PhotoProcessor.java | 18 import android.graphics.Bitmap; 34 * Class that converts a bitmap (or byte array representing a bitmap) into a display 109 private final Bitmap mOriginal; 110 private Bitmap mDisplayPhoto; 111 private Bitmap mThumbnailPhoto; 114 * Initializes a photo processor for the given bitmap. 115 * @param original The bitmap to process. 118 * @throws IOException If bitmap decoding or scaling fails. 120 public PhotoProcessor(Bitmap original, int maxDisplayPhotoDim, int maxThumbnailPhotoDim [all...] |
/development/samples/ApiDemos/src/com/example/android/apis/graphics/ |
PurgeableBitmapView.java | 20 import android.graphics.Bitmap; 34 * PurgeableBitmapView decodes an encoded bitstream to a Bitmap each time update() 35 * is invoked(), and its onDraw() draws the Bitmap and a number to screen. 41 private Bitmap mBitmap; 43 private final Bitmap[] mBitmapArray = new Bitmap [mArraySize]; 59 Bitmap src = Bitmap.createBitmap(colors, 0, STRIDE, WIDTH, HEIGHT, 60 Bitmap.Config.ARGB_8888); 61 bitstream = generateBitstream(src, Bitmap.CompressFormat.JPEG, 80) [all...] |
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/ |
BitmapUtil.java | 18 import android.graphics.Bitmap; 35 * Decode an image into a Bitmap, using sub-sampling if the hinted dimensions call for it. 41 * @return a decoded Bitmap that is not exactly sized to the hinted dimensions. 43 public static Bitmap decodeByteArray(byte[] src, int w, int h) { 62 * Decode an image into a Bitmap, using sub-sampling if the desired dimensions call for it. 68 * @return an exactly-sized decoded Bitmap that is center-cropped. 70 public static Bitmap decodeByteArrayWithCenterCrop(byte[] src, int w, int h) { 72 final Bitmap decoded = decodeByteArray(src, w, h); 82 * Returns a new Bitmap copy with a center-crop effect a la 83 * {@link android.widget.ImageView.ScaleType#CENTER_CROP}. May return the input bitmap if n [all...] |
/packages/apps/Mms/src/com/android/mms/util/ |
ThumbnailManager.java | 20 import android.graphics.Bitmap; 21 import android.graphics.Bitmap.Config; 71 private final SimpleCache<Uri, Bitmap> mThumbnailCache; 74 private static Bitmap mEmptyImageBitmap; 75 private static Bitmap mEmptyVideoBitmap; 87 mThumbnailCache = new SimpleCache<Uri, Bitmap>(8, 16, 0.75f, true); 129 final Bitmap thumbnail = DEBUG_DISABLE_CACHE ? null : mThumbnailCache.get(uri); 250 Bitmap bitmap = null; local 252 bitmap = getBitmap(mIsVideo) 331 Bitmap bitmap = requestDecode(data.mData, local 338 Bitmap bitmap; local [all...] |
/cts/tests/tests/graphics/src/android/graphics/cts/ |
PaintFlagsDrawFilterTest.java | 20 import android.graphics.Bitmap; 26 import android.graphics.Bitmap.Config; 47 Bitmap bitmapWithoutFilter = drawText(null); 50 Bitmap bitmapWithFilter = drawText(filter); 52 Bitmap combined = delta(bitmapWithoutFilter, bitmapWithFilter); 56 private Bitmap drawText(PaintFlagsDrawFilter filter) { 62 Bitmap b = Bitmap.createBitmap(BITMAP_WIDTH, BITMAP_HEIGHT, Config.ARGB_8888); 70 private Bitmap delta(Bitmap bitmapWithoutFilter, Bitmap bitmapWithFilter) [all...] |
PictureTest.java | 24 import android.graphics.Bitmap; 47 Bitmap bitmap = Bitmap.createBitmap(TEST_WIDTH, TEST_HEIGHT, Bitmap.Config.ARGB_8888); local 48 canvas = new Canvas(bitmap); 51 checkBitmap(bitmap); 56 // create a new Canvas with a new bitmap 57 bitmap = Bitmap.createBitmap(TEST_WIDTH, TEST_HEIGHT, Bitmap.Config.ARGB_8888) [all...] |
Bitmap_CompressFormatTest.java | 20 import android.graphics.Bitmap; 21 import android.graphics.Bitmap.CompressFormat; 22 import android.graphics.Bitmap.Config; 42 Bitmap b = Bitmap.createBitmap(10, 24, Config.ARGB_8888);
|
ComposePathEffectTest.java | 19 import android.graphics.Bitmap; 27 import android.graphics.Bitmap.Config; 53 Bitmap actual = Bitmap.createBitmap(BITMAP_WIDTH, BITMAP_HEIGHT, Config.ARGB_8888); 59 Bitmap expected = Bitmap.createBitmap(BITMAP_WIDTH, BITMAP_HEIGHT, Config.ARGB_8888);
|
SumPathEffectTest.java | 20 import android.graphics.Bitmap; 29 import android.graphics.Bitmap.Config; 40 Bitmap bitmap = Bitmap.createBitmap(WIDTH, HEIGHT, Config.ARGB_8888); local 41 bitmap.eraseColor(Color.BLACK); 42 Bitmap expected = Bitmap.createBitmap(WIDTH, HEIGHT, Config.ARGB_8888); 63 canvas = new Canvas(bitmap); 68 assertEquals(expected.getPixel(i, j), bitmap.getPixel(i, j)) [all...] |
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/cache/ |
BitmapCache.java | 19 import android.graphics.Bitmap; 31 private HashMap<Long, ArrayList<WeakReference<Bitmap>>> 32 mBitmapCache = new HashMap<Long, ArrayList<WeakReference<Bitmap>>>(); 55 Bitmap bitmap; field in class:BitmapCache.BitmapTracking 61 private void track(Bitmap bitmap, int type) { 64 if (tracking.bitmap == bitmap) { 65 Log.e(LOGTAG, "giving a bitmap already given!!!") 125 Bitmap bitmap = buffer.getBitmap(); local 185 Bitmap bitmap = null; local 207 Bitmap bitmap = getBitmap(source.getWidth(), source.getHeight(), type); local [all...] |
/external/robolectric/src/main/java/com/xtremelabs/robolectric/shadows/ |
ShadowBitmapFactory.java | 4 import android.graphics.Bitmap; 28 public static Bitmap decodeResource(Resources res, int id) { 29 Bitmap bitmap = create("resource:" + getResourceName(id)); local 30 shadowOf(bitmap).setLoadedFromResourceId(id); 31 return bitmap; 35 public static Bitmap decodeResource(Resources res, int id, BitmapFactory.Options options) { 36 Bitmap bitmap = create("resource:" + getResourceName(id), options); local 37 shadowOf(bitmap).setLoadedFromResourceId(id) 70 Bitmap bitmap = Robolectric.newInstanceOf(Bitmap.class); local [all...] |
/frameworks/base/core/java/android/emoji/ |
EmojiFactory.java | 19 import android.graphics.Bitmap; 36 // HashMap for caching Bitmap object. In order not to make a cache object 60 private Map<Integer, WeakReference<Bitmap>> mCache; 74 mCache = new CustomLinkedHashMap<Integer, WeakReference<Bitmap>>(); 91 * Returns Bitmap object corresponding to the AndroidPua. 93 * Note that each Bitmap is cached by this class, which means that, if you modify a 94 * Bitmap object (using setPos() method), all same emoji Bitmap will be modified. 98 * @return Bitmap object when this factory knows the Bitmap relevant to the codepoint [all...] |
/external/chromium_org/ui/android/java/src/org/chromium/ui/gfx/ |
BitmapHelper.java | 8 import android.graphics.Bitmap; 16 public static Bitmap createBitmap(int width, int height) { 17 return Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); 21 * Decode and sample down a bitmap resource to the requested width and height. 23 * @param name The resource name of the bitmap to decode. 24 * @param reqWidth The requested width of the resulting bitmap. 25 * @param reqHeight The requested height of the resulting bitmap. 26 * @return A bitmap sampled down from the original with the same aspect ratio and dimensions. 30 private static Bitmap decodeDrawableResource(String name [all...] |
/packages/apps/Launcher2/src/com/android/launcher2/ |
FastBitmapDrawable.java | 19 import android.graphics.Bitmap; 28 private Bitmap mBitmap; 34 FastBitmapDrawable(Bitmap b) { 48 // Draw the bitmap into the bounding rect 96 public void setBitmap(Bitmap b) { 106 public Bitmap getBitmap() {
|
Utilities.java | 23 import android.graphics.Bitmap; 66 * Returns a bitmap suitable for the all apps view. Used to convert pre-ICS 70 static Bitmap createIconBitmap(Bitmap icon, Context context) { 77 return Bitmap.createBitmap(icon, 85 // Icon is too small, render to a larger bitmap 92 * Returns a bitmap suitable for the all apps view. 94 static Bitmap createIconBitmap(Drawable icon, Context context) { 108 // Ensure the bitmap has a density. 110 Bitmap bitmap = bitmapDrawable.getBitmap() local 138 final Bitmap bitmap = Bitmap.createBitmap(textureWidth, textureHeight, local [all...] |
/packages/apps/Launcher3/src/com/android/launcher3/ |
FastBitmapDrawable.java | 19 import android.graphics.Bitmap; 28 private Bitmap mBitmap; 34 FastBitmapDrawable(Bitmap b) { 48 // Draw the bitmap into the bounding rect 96 public void setBitmap(Bitmap b) { 106 public Bitmap getBitmap() {
|
/development/samples/training/bitmapfun/BitmapFun/src/main/java/com/example/android/bitmapfun/util/ |
RecyclingBitmapDrawable.java | 20 import android.graphics.Bitmap; 29 * {@link Bitmap#recycle() recycle()} will be called on this drawable's bitmap. 40 public RecyclingBitmapDrawable(Resources res, Bitmap bitmap) { 41 super(res, bitmap); 99 Bitmap bitmap = getBitmap(); local 100 return bitmap != null && !bitmap.isRecycled() [all...] |
/frameworks/base/tests/CanvasCompare/src/com/android/test/hwuicompare/ |
CompareActivity.java | 25 import android.graphics.Bitmap; 39 protected Bitmap mSoftwareBitmap; 40 protected Bitmap mHardwareBitmap; 67 mSoftwareBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); 68 mHardwareBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); 83 mSoftwareBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); 84 mHardwareBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888) [all...] |
/frameworks/ex/carousel/java/com/android/ex/carousel/ |
CarouselViewUtilities.java | 9 import android.graphics.Bitmap; 16 * Debug utility to write the given bitmap to a file. 19 * @param bitmap the bitmap to write 23 public static boolean writeBitmapToFile(Context context, Bitmap bitmap, String filename) { 31 bitmap.compress(Bitmap.CompressFormat.PNG, 100, os);
|
/packages/apps/Mms/src/com/android/mms/ui/ |
SlideViewInterface.java | 22 import android.graphics.Bitmap; 29 void setImage(String name, Bitmap bitmap); 34 void setVideoThumbnail(String name, Bitmap bitmap);
|
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ |
PhotoProcessorTest.java | 19 import android.graphics.Bitmap; 40 final Bitmap sourceBitmap = ((BitmapDrawable) source).getBitmap(); 42 final Bitmap normalized = PhotoProcessor.getNormalizedBitmap(sourceBitmap, 50, false);
|
/development/samples/RenderScript/HelloCompute/src/com/example/android/rs/hellocompute/ |
HelloCompute.java | 22 import android.graphics.Bitmap; 28 private Bitmap mBitmapIn; 29 private Bitmap mBitmapOut; 42 mBitmapOut = Bitmap.createBitmap(mBitmapIn.getWidth(), mBitmapIn.getHeight(), 71 private Bitmap loadBitmap(int resource) { 73 options.inPreferredConfig = Bitmap.Config.ARGB_8888;
|