/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
H A D | BitmapTexture.java | 31 public BitmapTexture(Bitmap bitmap) { argument 32 this(bitmap, false); 35 public BitmapTexture(Bitmap bitmap, boolean hasBorder) { argument 37 Utils.assertTrue(bitmap != null && !bitmap.isRecycled()); 38 mContentBitmap = bitmap; 42 protected void onFreeBitmap(Bitmap bitmap) { argument
|
H A D | CanvasTexture.java | 24 // The subclasses should override onDraw() to draw on the bitmap. 38 Bitmap bitmap = Bitmap.createBitmap(mWidth, mHeight, mConfig); 39 mCanvas = new Canvas(bitmap); 40 onDraw(mCanvas, bitmap); 41 return bitmap; 45 protected void onFreeBitmap(Bitmap bitmap) { argument 47 bitmap.recycle();
|
H A D | BitmapTileProvider.java | 36 public BitmapTileProvider(Bitmap bitmap, int maxBackupSize) { argument 37 mImageWidth = bitmap.getWidth(); 38 mImageHeight = bitmap.getHeight(); 40 list.add(bitmap); 41 while (bitmap.getWidth() > maxBackupSize 42 || bitmap.getHeight() > maxBackupSize) { 43 bitmap = BitmapUtils.resizeBitmapByScale(bitmap, 0.5f, false); 44 list.add(bitmap); 81 // result bitmap, subse [all...] |
H A D | AbstractDisplayItem.java | 45 protected void updateImage(Bitmap bitmap, boolean isCancelled) { argument 50 if (isCancelled && bitmap == null) { 59 mBitmap = bitmap; 60 mState = bitmap == null ? STATE_ERROR : STATE_VALID ; 112 abstract protected void onBitmapAvailable(Bitmap bitmap); argument
|
H A D | UploadedTexture.java | 113 Bitmap bitmap = sBorderLines.get(key); 114 if (bitmap == null) { 115 bitmap = vertical 118 sBorderLines.put(key.clone(), bitmap); 120 return bitmap; 159 protected abstract void onFreeBitmap(Bitmap bitmap); argument 186 Bitmap bitmap = getBitmap(); 187 int format = GLUtils.getInternalFormat(bitmap); 188 int type = GLUtils.getType(bitmap); 191 bitmap, forma [all...] |
H A D | AdaptiveBackground.java | 48 public Bitmap getAdaptiveBitmap(Bitmap bitmap) { argument 52 int width = bitmap.getWidth(); 53 int height = bitmap.getHeight(); 65 canvas.drawBitmap(bitmap, left, top, mPaint); 71 private void startTransition(Bitmap bitmap) { argument 72 BitmapTexture texture = new BitmapTexture(bitmap); 84 public void setImage(Bitmap bitmap) { argument 86 mPendingBitmap = bitmap; 88 startTransition(bitmap);
|
H A D | ResourceTexture.java | 47 protected void onFreeBitmap(Bitmap bitmap) { argument 49 bitmap.recycle();
|
H A D | TileImageViewAdapter.java | 104 Bitmap bitmap; 108 bitmap = mRegionDecoder.decodeRegion(askRegion, options); 111 if (bitmap == null) { 116 if (wantRegion.equals(askRegion)) return bitmap; 126 canvas.drawBitmap(bitmap, offsetX, offsetY, null); 128 // If the valid region (covered by bitmap or border) is smaller than the 129 // result bitmap, subset it. 130 int endX = offsetX + bitmap.getWidth() + borderSize; 131 int endY = offsetY + bitmap.getHeight() + borderSize; 132 bitmap [all...] |
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/ |
H A D | BitmapUtils.java | 43 * bitmap. 51 * generates a smaller bitmap, unless minSideLength = UNCONSTRAINED. 116 Bitmap bitmap, int targetPixels, boolean recycle) { 117 int width = bitmap.getWidth(); 118 int height = bitmap.getHeight(); 121 if (scale >= 1.0f) return bitmap; 122 return resizeBitmapByScale(bitmap, scale, recycle); 126 Bitmap bitmap, float scale, boolean recycle) { 127 int width = Math.round(bitmap.getWidth() * scale); 128 int height = Math.round(bitmap 115 resizeDownToPixels( Bitmap bitmap, int targetPixels, boolean recycle) argument 125 resizeBitmapByScale( Bitmap bitmap, float scale, boolean recycle) argument 140 getConfig(Bitmap bitmap) argument 148 resizeDownBySideLength( Bitmap bitmap, int maxLength, boolean recycle) argument 159 resizeDownIfTooBig( Bitmap bitmap, int targetSize, boolean recycle) argument 170 cropCenter(Bitmap bitmap, boolean recycle) argument 185 resizeDownAndCropCenter(Bitmap bitmap, int size, boolean recycle) argument 207 recycleSilently(Bitmap bitmap) argument 275 compressBitmap(Bitmap bitmap) argument 295 compressToBytes(Bitmap bitmap, int quality) argument [all...] |
/packages/apps/Gallery2/src/com/android/gallery3d/photoeditor/ |
H A D | OnDoneBitmapCallback.java | 22 * Callback that will only be called back in UI thread to notify that a bitmap is done. 26 void onDone(Bitmap bitmap); argument
|
H A D | BitmapUtils.java | 42 * Utils for bitmap operations. 61 * Creates a mutable bitmap from subset of source bitmap, transformed by the optional matrix. 65 // Re-implement Bitmap createBitmap() to always return a mutable bitmap. 68 Bitmap bitmap; 71 bitmap = Bitmap.createBitmap(width, height, source.getConfig()); 76 bitmap = Bitmap.createBitmap( 87 bitmap.setDensity(source.getDensity()); 88 canvas.setBitmap(bitmap); 93 return bitmap; 221 saveBitmap( Bitmap bitmap, String directory, String filename, CompressFormat format) argument [all...] |
H A D | Photo.java | 33 public static Photo create(Bitmap bitmap) { argument 34 return (bitmap != null) ? new Photo( 35 RendererUtils.createTexture(bitmap), bitmap.getWidth(), bitmap.getHeight()) : null;
|
/packages/apps/Phone/src/com/android/phone/ |
H A D | BitmapUtils.java | 57 * @param bitmap the input bitmap, presumably a 96x96 pixel contact 60 public static Bitmap createBlurredBitmap(Bitmap bitmap) { argument 63 if (bitmap == null) { 64 Log.w(TAG, "createBlurredBitmap: null bitmap"); 68 if (DBG) log("- input bitmap: " + bitmap.getWidth() + " x " + bitmap.getHeight()); 70 // The bitmap we pass to gaussianBlur() needs to have a width 73 bitmap [all...] |
/packages/apps/Gallery2/src/com/android/gallery3d/data/ |
H A D | ImageCacheRequest.java | 56 Bitmap bitmap = DecodeUtils.requestDecode(jc, data.mData, 58 if (bitmap == null && !jc.isCancelled()) { 61 return bitmap; 63 Bitmap bitmap = onDecodeOriginal(jc, mType); 66 if (bitmap == null) { 72 bitmap = BitmapUtils.resizeDownAndCropCenter(bitmap, 75 bitmap = BitmapUtils.resizeDownBySideLength(bitmap, 80 byte[] array = BitmapUtils.compressBitmap(bitmap); [all...] |
/packages/apps/Mms/src/com/android/mms/ui/ |
H A D | VideoAttachmentView.java | 69 public void setImage(String name, Bitmap bitmap) { argument 91 Bitmap bitmap = createVideoThumbnail(mContext, video); 92 if (null == bitmap) { 93 bitmap = BitmapFactory.decodeResource(getResources(), 96 mThumbnailView.setImageBitmap(bitmap); 103 Bitmap bitmap = null; 107 bitmap = retriever.getFrameAtTime(-1); 117 return bitmap;
|
H A D | BasicSlideEditorView.java | 100 public void setImage(String name, Bitmap bitmap) { argument 102 if (null == bitmap) { 103 bitmap = BitmapFactory.decodeResource(getResources(), 106 mImageView.setImageBitmap(bitmap); 135 Bitmap bitmap = VideoAttachmentView.createVideoThumbnail(mContext, video); 136 if (null == bitmap) { 137 bitmap = BitmapFactory.decodeResource(getResources(), 140 mImageView.setImageBitmap(bitmap);
|
/packages/apps/Gallery/src/com/android/camera/ |
H A D | RotateBitmap.java | 27 public RotateBitmap(Bitmap bitmap) { argument 28 mBitmap = bitmap; 32 public RotateBitmap(Bitmap bitmap, int rotation) { argument 33 mBitmap = bitmap; 49 public void setBitmap(Bitmap bitmap) { argument 50 mBitmap = bitmap;
|
H A D | ImageViewTouchBase.java | 57 // The current bitmap being displayed. 120 public void setImageBitmap(Bitmap bitmap) { argument 121 setImageBitmap(bitmap, 0); 124 private void setImageBitmap(Bitmap bitmap, int rotation) { argument 125 super.setImageBitmap(bitmap); 132 mBitmapDisplayed.setBitmap(bitmap); 135 if (old != null && old != bitmap && mRecycler != null) { 146 // This function changes bitmap, reset base matrix according to the size 147 // of the bitmap, and optionally reset the supplementary matrix. 148 public void setImageBitmapResetBase(final Bitmap bitmap, argument 153 setImageRotateBitmapResetBase(final RotateBitmap bitmap, final boolean resetSupp) argument 259 getProperBaseMatrix(RotateBitmap bitmap, Matrix matrix) argument [all...] |
/packages/apps/Camera/src/com/android/camera/ |
H A D | Thumbnail.java | 59 public Thumbnail(Uri uri, Bitmap bitmap, int orientation) { argument 61 mBitmap = rotateImage(bitmap, orientation); 62 if (mBitmap == null) throw new IllegalArgumentException("null bitmap"); 81 private static Bitmap rotateImage(Bitmap bitmap, int orientation) { argument 85 m.setRotate(orientation, bitmap.getWidth() * 0.5f, 86 bitmap.getHeight() * 0.5f); 89 Bitmap rotated = Bitmap.createBitmap(bitmap, 0, 0, 90 bitmap.getWidth(), bitmap.getHeight(), m, true); 91 // If the rotated bitmap i 299 createThumbnail(Uri uri, Bitmap bitmap, int orientation) argument [all...] |
/packages/apps/Gallery2/src/com/android/gallery3d/gadget/ |
H A D | WidgetUtils.java | 48 Bitmap bitmap = image.requestImage(MediaItem.TYPE_THUMBNAIL) 50 if (bitmap == null) { 54 return createWidgetBitmap(bitmap, image.getRotation()); 57 public static Bitmap createWidgetBitmap(Bitmap bitmap, int rotation) { argument 58 int w = bitmap.getWidth(); 59 int h = bitmap.getHeight(); 77 canvas.drawBitmap(bitmap, -w / 2, -h / 2, paint);
|
/packages/apps/Tag/src/com/android/apps/tag/record/ |
H A D | ImageRecord.java | 42 private ImageRecord(Bitmap bitmap) { argument 43 mBitmap = Preconditions.checkNotNull(bitmap); 59 Bitmap bitmap = BitmapFactory.decodeByteArray(content, 0, content.length); 60 if (bitmap == null) { 63 return new ImageRecord(bitmap); 75 public static NdefRecord newImageRecord(Bitmap bitmap) { argument 77 bitmap.compress(Bitmap.CompressFormat.JPEG, 100, out);
|
/packages/apps/Gallery2/src/com/android/gallery3d/photoeditor/actions/ |
H A D | AbstractSeekBar.java | 52 Bitmap bitmap = Bitmap.createBitmap(scaledWidth, h, Bitmap.Config.ARGB_8888); 53 Canvas canvas = new Canvas(bitmap); 54 thumb.setBounds(0, 0, bitmap.getWidth(), bitmap.getHeight()); 57 setThumb(new BitmapDrawable(res, bitmap));
|
/packages/apps/Launcher2/src/com/android/launcher2/ |
H A D | ItemInfo.java | 125 static byte[] flattenBitmap(Bitmap bitmap) { argument 128 int size = bitmap.getWidth() * bitmap.getHeight() * 4; 131 bitmap.compress(Bitmap.CompressFormat.PNG, 100, out); 141 static void writeBitmap(ContentValues values, Bitmap bitmap) { argument 142 if (bitmap != null) { 143 byte[] data = flattenBitmap(bitmap);
|
H A D | Utilities.java | 66 * Returns a bitmap suitable for the all apps view. Used to convert pre-ICS 85 // Icon is too small, render to a larger bitmap 91 * Returns a bitmap suitable for the all apps view. 107 // Ensure the bitmap has a density. 109 Bitmap bitmap = bitmapDrawable.getBitmap(); 110 if (bitmap.getDensity() == Bitmap.DENSITY_NONE) { 138 final Bitmap bitmap = Bitmap.createBitmap(textureWidth, textureHeight, 141 canvas.setBitmap(bitmap); 161 return bitmap; 194 * @param bitmap Th 200 resampleIconBitmap(Bitmap bitmap, Context context) argument 214 drawDisabledBitmap(Bitmap bitmap, Context context) argument [all...] |
/packages/apps/Camera/tests/src/com/android/camera/functional/ |
H A D | ImageCaptureIntentTest.java | 66 Bitmap bitmap = (Bitmap) resultData.getParcelableExtra("data"); 67 assertNotNull(bitmap); 68 assertTrue(bitmap.getWidth() > 0); 69 assertTrue(bitmap.getHeight() > 0); 119 Bitmap bitmap = (Bitmap) resultData.getParcelableExtra("data"); 120 assertNotNull(bitmap); 121 assertTrue(bitmap.getWidth() > 0); 122 assertTrue(bitmap.getHeight() > 0);
|