/frameworks/volley/src/com/android/volley/toolbox/ |
ImageRequest.java | 26 import android.graphics.Bitmap; 27 import android.graphics.Bitmap.Config; 32 * back with a decoded Bitmap. 34 public class ImageRequest extends Request<Bitmap> { 44 private final Response.Listener<Bitmap> mListener; 62 * @param listener Listener to receive the decoded bitmap 63 * @param maxWidth Maximum width to decode this bitmap to, or zero for none 64 * @param maxHeight Maximum height to decode this bitmap to, or zero for 66 * @param decodeConfig Format to decode the bitmap to 69 public ImageRequest(String url, Response.Listener<Bitmap> listener, int maxWidth, int maxHeight 140 Bitmap bitmap = null; local [all...] |
/packages/apps/Contacts/src/com/android/contacts/util/ |
ContactPhotoUtils.java | 22 import android.graphics.Bitmap; 78 * Creates a byte[] containing the PNG-compressed bitmap, or null if 81 public static byte[] compressBitmap(Bitmap bitmap) { 82 final int size = bitmap.getWidth() * bitmap.getHeight() * 4; 85 bitmap.compress(Bitmap.CompressFormat.PNG, 100, out);
|
ImageViewDrawableSetter.java | 21 import android.graphics.Bitmap; 82 protected Bitmap setCompressedImage(byte[] compressed) { 124 private Bitmap previousBitmap() { 146 Bitmap bitmap = BitmapFactory.decodeByteArray(compressed, 0, compressed.length); local 147 return new BitmapDrawable(rsrc, bitmap);
|
/packages/apps/Gallery/src/com/android/camera/gallery/ |
Image.java | 24 import android.graphics.Bitmap; 151 public Bitmap thumbBitmap(boolean rotateAsNeeded) { 152 Bitmap bitmap = null; local 155 options.inPreferredConfig = Bitmap.Config.ARGB_8888; 156 bitmap = BitmapManager.instance().getThumbnail(mContentResolver, mId, 159 if (bitmap != null && rotateAsNeeded) { 160 bitmap = Util.rotate(bitmap, getDegreesRotated()); 163 return bitmap; [all...] |
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/filters/ |
ImageFilterStraighten.java | 19 import android.graphics.Bitmap; 25 private final Bitmap.Config mConfig = Bitmap.Config.ARGB_8888; 61 public Bitmap apply(Bitmap bitmap, float scaleFactor, int quality) { 66 Bitmap temp = bitmap.copy(mConfig, true); 69 Rect bounds = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight()) [all...] |
ImageFilterRS.java | 19 import android.graphics.Bitmap; 49 protected void update(Bitmap bitmap) { 50 getOutPixelsAllocation().copyTo(bitmap); 100 public Bitmap apply(Bitmap bitmap, float scaleFactor, int quality) { 101 if (bitmap == null || bitmap.getWidth() == 0 || bitmap.getHeight() == 0) 180 Bitmap bitmap = BitmapFactory.decodeResource( local 193 Bitmap bitmap = BitmapFactory.decodeResource( local 211 Bitmap bitmap = BitmapFactory.decodeResource( local [all...] |
/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
TileImageViewAdapter.java | 20 import android.graphics.Bitmap; 21 import android.graphics.Bitmap.Config; 87 public Bitmap getTile(int level, int x, int y, int tileSize) { 103 // We need to clear a reused bitmap, if wantRegion is not fully 109 Bitmap bitmap = GalleryBitmapPool.getInstance().get(tileSize, tileSize); local 110 if (bitmap != null) { 111 if (needClear) bitmap.eraseColor(0); 113 bitmap = Bitmap.createBitmap(tileSize, tileSize, Config.ARGB_8888) 159 Bitmap bitmap = null; local [all...] |
/packages/apps/Launcher2/src/com/android/launcher2/ |
ItemInfo.java | 21 import android.graphics.Bitmap; 156 static byte[] flattenBitmap(Bitmap bitmap) { 159 int size = bitmap.getWidth() * bitmap.getHeight() * 4; 162 bitmap.compress(Bitmap.CompressFormat.PNG, 100, out); 172 static void writeBitmap(ContentValues values, Bitmap bitmap) { 173 if (bitmap != null) [all...] |
/packages/apps/Mms/src/com/android/mms/ui/ |
VideoAttachmentView.java | 23 import android.graphics.Bitmap; 69 public void setImage(String name, Bitmap bitmap) { 91 Bitmap bitmap = createVideoThumbnail(mContext, video); local 92 if (null == bitmap) { 93 bitmap = BitmapFactory.decodeResource(getResources(), 96 mThumbnailView.setImageBitmap(bitmap); 102 public void setVideoThumbnail(String name, Bitmap thumbnail) { 106 public static Bitmap createVideoThumbnail(Context context, Uri uri) 107 Bitmap bitmap = null; local [all...] |
/packages/apps/VideoEditor/src/com/android/videoeditor/ |
BaseAdapterWithImages.java | 25 import android.graphics.Bitmap; 76 protected class ImageLoaderAsyncTask extends AsyncTask<Void, Void, Bitmap> { 83 * @param key The bitmap key 92 protected Bitmap doInBackground(Void... zzz) { 97 protected void onPostExecute(Bitmap bitmap) { 99 if (bitmap == null) { 105 viewHolder.mImageView.setImageBitmap(bitmap); 110 bitmap.recycle(); 168 * Starts the AsyncTask which loads the bitmap [all...] |
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/ |
BitmapDrawableTest.java | 27 import android.graphics.Bitmap; 33 import android.graphics.Bitmap.Config; 67 Bitmap bitmap = Bitmap.createBitmap(200, 300, Config.ARGB_8888); local 68 bitmapDrawable = new BitmapDrawable(bitmap); 72 assertEquals(bitmap, bitmapDrawable.getBitmap()); 76 new BitmapDrawable(mContext.getResources(), bitmap); local 83 new BitmapDrawable((Bitmap) null); 281 Bitmap bitmap = Bitmap.createBitmap(200, 300, Config.RGB_565) local 298 Bitmap bitmap = Bitmap.createBitmap(200, 300, Config.RGB_565); local [all...] |
ClipDrawableTest.java | 26 import android.graphics.Bitmap; 27 import android.graphics.Bitmap.Config; 105 Bitmap bitmap = Bitmap.createBitmap(100, 50, Config.RGB_565); local 106 BitmapDrawable bmpDrawable = new BitmapDrawable(bitmap); 107 bmpDrawable.setTargetDensity(bitmap.getDensity()); // avoid scaling 119 Bitmap bitmap = Bitmap.createBitmap(100, 50, Config.RGB_565) local [all...] |
/development/samples/ApiDemos/src/com/example/android/apis/graphics/ |
GLES20TriangleRenderer.java | 29 import android.graphics.Bitmap; 140 Bitmap bitmap; local 142 bitmap = BitmapFactory.decodeStream(is); 151 GLUtils.texImage2D(GLES20.GL_TEXTURE_2D, 0, bitmap, 0); 152 bitmap.recycle();
|
MatrixPaletteRenderer.java | 33 import android.graphics.Bitmap; 281 Bitmap bitmap; local 283 bitmap = BitmapFactory.decodeStream(is); 292 GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0); 293 bitmap.recycle();
|
DensityActivity.java | 26 import android.graphics.Bitmap; 59 addLabelToRoot(root, "Prescaled bitmap in drawable"); 66 addLabelToRoot(root, "Autoscaled bitmap in drawable"); 88 addLabelToRoot(root, "Prescaled bitmap"); 95 addLabelToRoot(root, "Autoscaled bitmap"); 135 Bitmap bitmap; local 136 bitmap = loadAndPrintDpi(resource, scale); 140 final BitmapDrawable d = new BitmapDrawable(getResources(), bitmap); 161 Bitmap bitmap local 185 Bitmap bitmap; local [all...] |
/development/samples/BasicGLSurfaceView/src/com/example/android/basicglsurfaceview/ |
GLES20TriangleRenderer.java | 29 import android.graphics.Bitmap; 138 Bitmap bitmap; local 140 bitmap = BitmapFactory.decodeStream(is); 149 GLUtils.texImage2D(GLES20.GL_TEXTURE_2D, 0, bitmap, 0); 150 bitmap.recycle();
|
/packages/apps/LegacyCamera/src/com/android/camera/ |
Thumbnail.java | 22 import android.graphics.Bitmap; 51 private Bitmap mBitmap; 59 public Thumbnail(Uri uri, Bitmap bitmap, int orientation) { 61 mBitmap = rotateImage(bitmap, orientation); 62 if (mBitmap == null) throw new IllegalArgumentException("null bitmap"); 69 public Bitmap getBitmap() { 81 private static Bitmap rotateImage(Bitmap bitmap, int orientation) 129 Bitmap bitmap = null; local 252 Bitmap bitmap = BitmapFactory.decodeByteArray(jpeg, 0, jpeg.length, options); local 265 Bitmap bitmap = null; local [all...] |
/cts/tests/tests/graphics/src/android/graphics/cts/ |
BitmapFactoryTest.java | 23 import android.graphics.Bitmap; 27 import android.graphics.Bitmap.CompressFormat; 28 import android.graphics.Bitmap.Config; 95 Bitmap b = BitmapFactory.decodeResource(mRes, R.drawable.start, 98 // Test the bitmap size 101 // Test if no bitmap 106 Bitmap b = BitmapFactory.decodeResource(mRes, R.drawable.start); 108 // Test the bitmap size 117 Bitmap b = BitmapFactory.decodeResourceStream(mRes, value, is, r, mOpt1); 119 // Test the bitmap siz 249 Bitmap bitmap = BitmapFactory.decodeResource(mRes, R.drawable.start, opt); local [all...] |
/development/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/ |
SpriteTextRenderer.java | 30 import android.graphics.Bitmap; 100 Bitmap bitmap; local 102 bitmap = BitmapFactory.decodeStream(is); 111 GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0); 112 bitmap.recycle();
|
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
GLTextureViewActivity.java | 23 import android.graphics.Bitmap; 67 Bitmap b = mTextureView.getBitmap(800, 800); 72 b.compress(Bitmap.CompressFormat.PNG, 100, out); 270 Bitmap bitmap = BitmapFactory.decodeResource(mResources, resource); local 272 GLUtils.texImage2D(GL_TEXTURE_2D, 0, GL_RGBA, bitmap, GL_UNSIGNED_BYTE, 0); 275 bitmap.recycle();
|
/packages/apps/Nfc/src/com/android/nfc/ |
FireflyRenderer.java | 21 import android.graphics.Bitmap; 259 Bitmap bitmap = BitmapFactory.decodeStream(in); local 265 GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0); 267 bitmap.recycle();
|
/cts/tests/tests/graphics/src/android/graphics/drawable/shapes/cts/ |
ShapeTest.java | 20 import android.graphics.Bitmap; 24 import android.graphics.Bitmap.Config; 97 Bitmap bitmap = Bitmap.createBitmap(TEST_WIDTH, TEST_HEIGHT, Config.ARGB_8888); local 98 Canvas canvas = new Canvas(bitmap); 105 assertEquals(0, bitmap.getPixel(0, 0)); 109 assertEquals(0, bitmap.getPixel(0, 0));
|
/cts/tests/tests/text/src/android/text/cts/ |
EmojiTest.java | 20 import android.graphics.Bitmap; 63 Bitmap mBitmapA, mBitmapB; // Emoji displayed Bitmaps to compare 150 Bitmap capture(char c[]) { 159 Bitmap bitmap = Bitmap.createBitmap(getDrawingCache()); local 161 return bitmap; 172 Bitmap capture(char c[]) { 182 Bitmap bitmap = Bitmap.createBitmap(getDrawingCache()) local 205 Bitmap bitmap = Bitmap.createBitmap(getDrawingCache()); local 216 Bitmap bitmap; field in class:EmojiTest.CaptureWebView [all...] |
/dalvik/vm/alloc/ |
CardTable.cpp | 303 HeapBitmap *bitmap = dvmHeapSourceGetLiveBits(); local 306 dvmHeapBitmapWalk(bitmap, dumpReferencesCallback, arg); 396 HeapBitmap *markBits = gDvm.gcHeap->markContext.bitmap;
|
/development/samples/HelloEffects/src/com/example/android/mediafx/ |
HelloEffects.java | 20 import android.graphics.Bitmap; 74 // Load input bitmap 75 Bitmap bitmap = BitmapFactory.decodeResource(getResources(), local 77 mImageWidth = bitmap.getWidth(); 78 mImageHeight = bitmap.getHeight(); 83 GLUtils.texImage2D(GLES20.GL_TEXTURE_2D, 0, bitmap, 0); 246 // if no effect is chosen, just render the original bitmap
|