Home
last modified time | relevance | path

Searched refs:bitmap (Results 1 – 25 of 371) sorted by relevance

12345678910>>...15

/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/pipeline/
DCachingPipeline.java177 public void setOriginal(Bitmap bitmap) { in setOriginal() argument
178 mOriginalBitmap = bitmap; in setOriginal()
179 Log.v(LOGTAG,"setOriginal, size " + bitmap.getWidth() + " x " + bitmap.getHeight()); in setOriginal()
222 Bitmap bitmap = PrimaryImage.getImage().getOriginalBitmapHighres(); in renderHighres() local
223 if (bitmap == null) { in renderHighres()
226 bitmap = mEnvironment.getBitmapCopy(bitmap, BitmapCache.HIGHRES); in renderHighres()
227 bitmap = preset.applyGeometry(bitmap, mEnvironment); in renderHighres()
230 Bitmap bmp = preset.apply(bitmap, mEnvironment); in renderHighres()
247 Bitmap bitmap = PrimaryImage.getImage().getOriginalBitmapHighres(); in renderGeometry() local
248 if (bitmap == null) { in renderGeometry()
[all …]
DBuffer.java34 public Buffer(Bitmap bitmap) { in Buffer() argument
36 if (bitmap != null) { in Buffer()
38 mBitmap = cache.getBitmapCopy(bitmap, BitmapCache.PREVIEW_CACHE); in Buffer()
48 public boolean isSameSize(Bitmap bitmap) { in isSameSize() argument
49 if (mBitmap == null || bitmap == null) { in isSameSize()
52 if (mBitmap.getWidth() == bitmap.getWidth() in isSameSize()
53 && mBitmap.getHeight() == bitmap.getHeight()) { in isSameSize()
59 public synchronized void useBitmap(Bitmap bitmap) { in useBitmap() argument
61 canvas.drawBitmap(bitmap, 0, 0, null); in useBitmap()
/packages/modules/Connectivity/nearby/service/java/com/android/server/nearby/common/fastpair/
DIconUtils.java41 static boolean isIconSizedSmall(@Nullable Bitmap bitmap) { in isIconSizedSmall() argument
42 if (bitmap == null) { in isIconSizedSmall()
47 return bitmap.getWidth() >= min in isIconSizedSmall()
48 && bitmap.getWidth() < desired in isIconSizedSmall()
49 && bitmap.getHeight() >= min in isIconSizedSmall()
50 && bitmap.getHeight() < desired; in isIconSizedSmall()
58 static boolean isIconSizedRegular(@Nullable Bitmap bitmap) { in isIconSizedRegular() argument
59 if (bitmap == null) { in isIconSizedRegular()
62 return bitmap.getWidth() >= DESIRED_ICON_SIZE in isIconSizedRegular()
63 && bitmap.getHeight() >= DESIRED_ICON_SIZE; in isIconSizedRegular()
[all …]
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/
DBitmapUtils.java116 Bitmap bitmap, float scale, boolean recycle) { in resizeBitmapByScale() argument
117 int width = Math.round(bitmap.getWidth() * scale); in resizeBitmapByScale()
118 int height = Math.round(bitmap.getHeight() * scale); in resizeBitmapByScale()
119 if (width == bitmap.getWidth() in resizeBitmapByScale()
120 && height == bitmap.getHeight()) return bitmap; in resizeBitmapByScale()
121 Bitmap target = Bitmap.createBitmap(width, height, getConfig(bitmap)); in resizeBitmapByScale()
125 canvas.drawBitmap(bitmap, 0, 0, paint); in resizeBitmapByScale()
126 if (recycle) bitmap.recycle(); in resizeBitmapByScale()
130 private static Bitmap.Config getConfig(Bitmap bitmap) { in getConfig() argument
131 Bitmap.Config config = bitmap.getConfig(); in getConfig()
[all …]
/packages/modules/Connectivity/nearby/halfsheet/src/com/android/nearby/halfsheet/utils/
DIconUtils.java45 public static boolean isIconSizedSmall(@Nullable Bitmap bitmap) { in isIconSizedSmall() argument
46 if (bitmap == null) { in isIconSizedSmall()
49 return bitmap.getWidth() >= MIN_ICON_SIZE in isIconSizedSmall()
50 && bitmap.getWidth() < DESIRED_ICON_SIZE in isIconSizedSmall()
51 && bitmap.getHeight() >= MIN_ICON_SIZE in isIconSizedSmall()
52 && bitmap.getHeight() < DESIRED_ICON_SIZE; in isIconSizedSmall()
59 static boolean isIconSizedRegular(@Nullable Bitmap bitmap) { in isIconSizedRegular() argument
60 if (bitmap == null) { in isIconSizedRegular()
63 return bitmap.getWidth() >= DESIRED_ICON_SIZE && bitmap.getHeight() >= DESIRED_ICON_SIZE; in isIconSizedRegular()
71 public static boolean isIconSizeCorrect(@Nullable Bitmap bitmap) { in isIconSizeCorrect() argument
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/cache/
DBitmapCache.java55 Bitmap bitmap; field in BitmapCache.BitmapTracking
61 private void track(Bitmap bitmap, int type) { in track() argument
64 if (tracking.bitmap == bitmap) { in track()
69 tracking.bitmap = bitmap; in track()
75 private void untrack(Bitmap bitmap) { in untrack() argument
78 if (tracking.bitmap == bitmap) { in untrack()
125 Bitmap bitmap = buffer.getBitmap(); in cache() local
126 cache(bitmap); in cache()
129 public synchronized boolean cache(Bitmap bitmap) { in cache() argument
130 if (bitmap == null) { in cache()
[all …]
/packages/apps/LegacyCamera/src/com/android/camera/
DThumbnail.java59 public Thumbnail(Uri uri, Bitmap bitmap, int orientation) { in Thumbnail() argument
61 mBitmap = rotateImage(bitmap, orientation); in Thumbnail()
81 private static Bitmap rotateImage(Bitmap bitmap, int orientation) { in rotateImage() argument
85 m.setRotate(orientation, bitmap.getWidth() * 0.5f, in rotateImage()
86 bitmap.getHeight() * 0.5f); in rotateImage()
89 Bitmap rotated = Bitmap.createBitmap(bitmap, 0, 0, in rotateImage()
90 bitmap.getWidth(), bitmap.getHeight(), m, true); in rotateImage()
93 if (rotated != bitmap) bitmap.recycle(); in rotateImage()
99 return bitmap; in rotateImage()
129 Bitmap bitmap = null; in loadFrom() local
[all …]
/packages/apps/WallpaperPicker/src/com/android/gallery3d/glrenderer/
DUploadedTexture.java63 Bitmap bitmap = sBorderLines.get(key); in getBorderLine() local
64 if (bitmap == null) { in getBorderLine()
65 bitmap = vertical in getBorderLine()
68 sBorderLines.put(key, bitmap); in getBorderLine()
70 return bitmap; in getBorderLine()
105 protected abstract void onFreeBitmap(Bitmap bitmap); in onFreeBitmap() argument
129 Bitmap bitmap = getBitmap(); in updateContent() local
130 int format = GLUtils.getInternalFormat(bitmap); in updateContent()
131 int type = GLUtils.getType(bitmap); in updateContent()
132 canvas.texSubImage2D(this, 0, 0, bitmap, format, type); in updateContent()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/glrenderer/
DUploadedTexture.java124 Bitmap bitmap = sBorderLines.get(key); in getBorderLine() local
125 if (bitmap == null) { in getBorderLine()
126 bitmap = vertical in getBorderLine()
129 sBorderLines.put(key.clone(), bitmap); in getBorderLine() local
131 return bitmap; in getBorderLine()
166 protected abstract void onFreeBitmap(Bitmap bitmap); in onFreeBitmap() argument
193 Bitmap bitmap = getBitmap(); in updateContent() local
194 int format = GLUtils.getInternalFormat(bitmap); in updateContent()
195 int type = GLUtils.getType(bitmap); in updateContent()
196 canvas.texSubImage2D(this, mBorder, mBorder, bitmap, format, type); in updateContent()
[all …]
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/util/
DImageActionUtils.java99 Bitmap bitmap = bitmapSupplier.get(); in shareImage() local
100 if (bitmap == null) { in shareImage()
106 Uri uri = getImageUri(bitmap, crop, context, tag); in shareImage()
136 Bitmap bitmap = bitmapSupplier.get(); in startShareActivity() local
137 if (bitmap == null) { in startShareActivity()
141 persistBitmapAndStartActivity(context, bitmap, crop, intent, in startShareActivity()
152 Bitmap bitmap = bitmapSupplier.get(); in startShareActivity() local
153 if (bitmap == null) { in startShareActivity()
157 persistBitmapAndStartActivity(context, bitmap, in startShareActivity()
166 public static void persistBitmapAndStartActivity(Context context, Bitmap bitmap, Rect crop, in persistBitmapAndStartActivity() argument
[all …]
/packages/apps/Gallery2/src/com/android/photos/
DBitmapRegionTileSource.java125 public Bitmap getTile(int level, int x, int y, Bitmap bitmap) { in getTile() argument
134 if (bitmap == null) { in getTile()
135 bitmap = Bitmap.createBitmap(tileSize, tileSize, Bitmap.Config.ARGB_8888); in getTile()
139 mOptions.inBitmap = bitmap; in getTile()
142 bitmap = mDecoder.decodeRegion(mWantRegion, mOptions); in getTile()
144 if (mOptions.inBitmap != bitmap && mOptions.inBitmap != null) { in getTile()
149 if (bitmap == null) { in getTile()
152 return bitmap; in getTile()
164 Bitmap bitmap = mDecoder.decodeRegion(mOverlapRegion, mOptions); in getTileWithoutReusingBitmap() local
166 if (bitmap == null) { in getTileWithoutReusingBitmap()
[all …]
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/util/
DBitmapTransformer.java37 public static Bitmap applyFillTransformation(Bitmap bitmap, Point fillSize) { in applyFillTransformation() argument
43 int horizontalOffset = (bitmap.getWidth() - resultBitmap.getWidth()) / 2; in applyFillTransformation()
44 int verticalOffset = (bitmap.getHeight() - resultBitmap.getHeight()) / 2; in applyFillTransformation()
50 int pixelArraySize = Math.min(resultBitmap.getWidth(), bitmap.getWidth()) in applyFillTransformation()
51 * Math.min(resultBitmap.getHeight(), bitmap.getHeight()); in applyFillTransformation()
55 bitmap.getPixels( in applyFillTransformation()
58 bitmap.getWidth() /* stride */, in applyFillTransformation()
61 Math.min(resultBitmap.getWidth(), bitmap.getWidth()) /* width */, in applyFillTransformation()
62 Math.min(resultBitmap.getHeight(), bitmap.getHeight()) /* height */); in applyFillTransformation()
68 bitmap.getWidth() /* stride */, in applyFillTransformation()
[all …]
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/common/
DUriBitmap.java34 private UriBitmap(Bitmap bitmap, Uri uri, File tempFile) { in UriBitmap() argument
35 mBitmap = bitmap; in UriBitmap()
52 Bitmap bitmap = generateSampleBitmap(); in createSimpleInstance() local
54 Uri uri = bitmapToUri(bitmap, tempFile); in createSimpleInstance()
55 return new UriBitmap(bitmap, uri, tempFile); in createSimpleInstance()
59 Bitmap bitmap = Bitmap.createBitmap(15, 15, Bitmap.Config.ARGB_8888); in generateSampleBitmap() local
60 for (int x = 0; x < bitmap.getWidth(); x++) { in generateSampleBitmap()
61 for (int y = 0; y < bitmap.getHeight(); y++) { in generateSampleBitmap()
62 bitmap.setPixel(x, y, Color.rgb(x, y, x + y)); in generateSampleBitmap()
65 return bitmap; in generateSampleBitmap()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/data/
DImageCacheRequest.java63 Bitmap bitmap; in run() local
65 bitmap = DecodeUtils.decodeUsingPool(jc, in run()
68 bitmap = DecodeUtils.decodeUsingPool(jc, in run()
71 if (bitmap == null && !jc.isCancelled()) { in run()
74 return bitmap; in run()
79 Bitmap bitmap = onDecodeOriginal(jc, mType); in run() local
82 if (bitmap == null) { in run()
88 bitmap = BitmapUtils.resizeAndCropCenter(bitmap, mTargetSize, true); in run()
90 bitmap = BitmapUtils.resizeDownBySideLength(bitmap, mTargetSize, true); in run()
94 byte[] array = BitmapUtils.compressToBytes(bitmap); in run()
[all …]
/packages/apps/Dialer/java/com/android/dialer/util/
DDrawableConverter.java53 Bitmap bitmap; in drawableToBitmap() local
55 bitmap = ((BitmapDrawable) drawable).getBitmap(); in drawableToBitmap()
58 bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in drawableToBitmap()
61 bitmap = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888); in drawableToBitmap()
63 bitmap = in drawableToBitmap()
73 bitmap.getWidth(), in drawableToBitmap()
74 bitmap.getHeight()); in drawableToBitmap()
76 Canvas canvas = new Canvas(bitmap); in drawableToBitmap()
80 return bitmap; in drawableToBitmap()
86 Bitmap bitmap = drawableToBitmap(photo); in getRoundedDrawable() local
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
DTileImageViewAdapter.java109 Bitmap bitmap = GalleryBitmapPool.getInstance().get(tileSize, tileSize); in getTile() local
110 if (bitmap != null) { in getTile()
111 if (needClear) bitmap.eraseColor(0); in getTile()
113 bitmap = Bitmap.createBitmap(tileSize, tileSize, Config.ARGB_8888); in getTile()
120 options.inBitmap = bitmap; in getTile()
125 bitmap = regionDecoder.decodeRegion(wantRegion, options); in getTile()
128 if (options.inBitmap != bitmap && options.inBitmap != null) { in getTile()
134 if (bitmap == null) { in getTile()
137 return bitmap; in getTile()
159 Bitmap bitmap = null; in getTileWithoutReusingBitmap() local
[all …]
DBitmapTileProvider.java37 public BitmapTileProvider(Bitmap bitmap, int maxBackupSize) { in BitmapTileProvider() argument
38 mImageWidth = bitmap.getWidth(); in BitmapTileProvider()
39 mImageHeight = bitmap.getHeight(); in BitmapTileProvider()
41 list.add(bitmap); in BitmapTileProvider()
42 while (bitmap.getWidth() > maxBackupSize in BitmapTileProvider()
43 || bitmap.getHeight() > maxBackupSize) { in BitmapTileProvider()
44 bitmap = BitmapUtils.resizeBitmapByScale(bitmap, 0.5f, false); in BitmapTileProvider()
45 list.add(bitmap); in BitmapTileProvider()
96 for (Bitmap bitmap : mMipmaps) { in recycle()
97 BitmapUtils.recycleSilently(bitmap); in recycle()
/packages/apps/Gallery/src/com/android/camera/
DImageViewTouchBase.java120 public void setImageBitmap(Bitmap bitmap) { in setImageBitmap() argument
121 setImageBitmap(bitmap, 0); in setImageBitmap()
124 private void setImageBitmap(Bitmap bitmap, int rotation) { in setImageBitmap() argument
125 super.setImageBitmap(bitmap); in setImageBitmap()
132 mBitmapDisplayed.setBitmap(bitmap); in setImageBitmap()
135 if (old != null && old != bitmap && mRecycler != null) { in setImageBitmap()
148 public void setImageBitmapResetBase(final Bitmap bitmap, in setImageBitmapResetBase() argument
150 setImageRotateBitmapResetBase(new RotateBitmap(bitmap), resetSupp); in setImageBitmapResetBase()
153 public void setImageRotateBitmapResetBase(final RotateBitmap bitmap, in setImageRotateBitmapResetBase() argument
160 setImageRotateBitmapResetBase(bitmap, resetSupp); in setImageRotateBitmapResetBase()
[all …]
/packages/modules/IntentResolver/java/src/com/android/intentresolver/
DSimpleIconFactory.java217 Bitmap bitmap = createIconBitmap(icon, scale[0]); in createUserBadgedIconBitmap() local
219 mCanvas.setBitmap(bitmap); in createUserBadgedIconBitmap()
220 recreateIcon(Bitmap.createBitmap(bitmap), mCanvas); in createUserBadgedIconBitmap()
226 BitmapDrawable drawable = new FixedSizeBitmapDrawable(bitmap); in createUserBadgedIconBitmap()
234 result = bitmap; in createUserBadgedIconBitmap()
269 Bitmap bitmap = createIconBitmapNoInsetOrMask(icon, scale); in createAppBadgedIconBitmap() local
270 bitmap = maskBitmapToCircle(bitmap); in createAppBadgedIconBitmap()
271 icon = new BitmapDrawable(mContext.getResources(), bitmap); in createAppBadgedIconBitmap()
275 bitmap = createIconBitmap(icon, scale); in createAppBadgedIconBitmap()
277 mCanvas.setBitmap(bitmap); in createAppBadgedIconBitmap()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/filters/
DImageFilterKMeans.java49 native protected void nativeApplyFilter(Bitmap bitmap, int width, int height, in nativeApplyFilter() argument
54 public Bitmap apply(Bitmap bitmap, float scaleFactor, int quality) { in apply() argument
56 return bitmap; in apply()
58 int w = bitmap.getWidth(); in apply()
59 int h = bitmap.getHeight(); in apply()
61 Bitmap large_bm_ds = bitmap; in apply()
62 Bitmap small_bm_ds = bitmap; in apply()
72 large_bm_ds = Bitmap.createScaledBitmap(bitmap, lw, lh, true); in apply()
88 nativeApplyFilter(bitmap, w, h, large_bm_ds, lw, lh, small_bm_ds, sw, sh, p, mSeed); in apply()
90 return bitmap; in apply()
DImageFilterDownsample.java53 public Bitmap apply(Bitmap bitmap, float scaleFactor, int quality) { in apply() argument
55 return bitmap; in apply()
57 int w = bitmap.getWidth(); in apply()
58 int h = bitmap.getHeight(); in apply()
73 return bitmap; in apply()
75 Bitmap ret = Bitmap.createScaledBitmap(bitmap, newWidth, newHeight, true); in apply()
76 if (ret != bitmap) { in apply()
77 bitmap.recycle(); in apply()
81 return bitmap; in apply()
/packages/apps/Car/Cluster/ClusterOsDouble/src/com/android/car/cluster/view/
DBitmapFetcher.java92 Bitmap bitmap = mCache.get(uri.toString()); in getBitmap() local
93 if (bitmap == null) { in getBitmap()
102 bitmap = BitmapFactory.decodeFileDescriptor(fileDesc.getFileDescriptor()); in getBitmap()
103 return bitmap; in getBitmap()
108 if (bitmap.getWidth() != width || bitmap.getHeight() != height) { in getBitmap()
109 bitmap = Bitmap.createScaledBitmap(bitmap, width, height, true); in getBitmap()
111 mCache.put(uri.toString(), bitmap); in getBitmap() local
113 return bitmap; in getBitmap()
/packages/apps/Messaging/src/com/android/messaging/ui/mediapicker/
DImagePersistTask.java75 Bitmap bitmap = null; in doInBackgroundTimed() local
96 bitmap = BitmapFactory.decodeByteArray(mBytes, 0, mBytes.length); in doInBackgroundTimed()
100 Assert.equals(mWidth, bitmap.getHeight()); in doInBackgroundTimed()
101 Assert.equals(mHeight, bitmap.getWidth()); in doInBackgroundTimed()
105 Assert.equals(mWidth, bitmap.getWidth()); in doInBackgroundTimed()
106 Assert.equals(mHeight, bitmap.getHeight()); in doInBackgroundTimed()
110 final int offsetTop = (bitmap.getHeight() - clippedHeight) / 2; in doInBackgroundTimed()
111 final int offsetLeft = (bitmap.getWidth() - clippedWidth) / 2; in doInBackgroundTimed()
116 clippedBitmap.setDensity(bitmap.getDensity()); in doInBackgroundTimed()
120 clippedBitmapCanvas.drawBitmap(bitmap, matrix, null /* paint */); in doInBackgroundTimed()
[all …]
/packages/apps/UniversalMediaPlayer/java/com/android/pump/util/
DImageLoader.java72 void onImageLoaded(@NonNull Uri uri, @Nullable Bitmap bitmap); in onImageLoaded() argument
110 Bitmap bitmap; in loadImage() local
113 bitmap = mBitmapCache.get(uri); in loadImage()
114 if (bitmap == null) { in loadImage()
124 if (bitmap != null) { in loadImage()
125 executor.execute(() -> callback.onImageLoaded(uri, bitmap)); in loadImage()
145 Bitmap bitmap; in run() local
158 bitmap = decodeBitmapFromByteArray(data); in run()
161 bitmap = MediaStore.Video.Thumbnails.getThumbnail(mContentResolver, in run()
168 if (bitmap != null) { in run()
[all …]
/packages/apps/TV/src/com/android/tv/menu/
DAppLinkCardView.java267 public void onBitmapLoaded(AppLinkCardView cardView, @Nullable Bitmap bitmap) { in createChannelLogoCallback()
272 cardView.updateChannelLogo(bitmap, type); in createChannelLogoCallback() argument
277 private void updateChannelLogo(@Nullable Bitmap bitmap, int type) {
280 if (bitmap != null) {
281 drawable = new BitmapDrawable(getResources(), bitmap);
282 if (bitmap.getWidth() > bitmap.getHeight()) {
284 0, 0, mIconWidth, mIconWidth * bitmap.getHeight() / bitmap.getWidth());
289 mIconHeight * bitmap.getWidth() / bitmap.getHeight(),
296 if (bitmap == null) {
300 mImageView.setImageBitmap(bitmap);
[all …]

12345678910>>...15