Home
last modified time | relevance | path

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

12345678910>>...16

/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/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/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/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/common/
DLogoUtilsTest.java37 Bitmap bitmap = createSampleBitmap(20, 30); in testPartiallyResizedBitmap() local
38 File tempFile = writeBitmapToTempFile(bitmap); in testPartiallyResizedBitmap()
51 Bitmap bitmap = createSampleBitmap(8, 32); in testPartiallyResizedElongatedBitmap() local
52 File tempFile = writeBitmapToTempFile(bitmap); in testPartiallyResizedElongatedBitmap()
65 Bitmap bitmap = createSampleBitmap(16, 32); in testResizeBitmapKeepRatio() local
66 Bitmap newBitmap = LogoUtils.resizeBitmap(bitmap, 8, 8); in testResizeBitmapKeepRatio()
74 Bitmap bitmap = createSampleBitmap(16, 32); in testResizeBitmapNoScalingNeeded() local
75 Bitmap newBitmap = LogoUtils.resizeBitmap(bitmap, 20, 40); in testResizeBitmapNoScalingNeeded()
84 Bitmap bitmap = createSampleBitmap(15, 15); in testResizeBitmapNoIntegerRatio() local
85 Bitmap newBitmap = LogoUtils.resizeBitmap(bitmap, 10, 10); in testResizeBitmapNoIntegerRatio()
[all …]
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/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/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/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/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/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/WallpaperPicker2/src/com/android/wallpaper/asset/
DStreamableAsset.java276 Bitmap bitmap = BitmapFactory.decodeStream(inputStream, null, options); in doInBackground() local
285 bitmap = Bitmap.createBitmap( in doInBackground()
286 bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), rotateMatrix, false); in doInBackground()
289 return bitmap; in doInBackground()
293 protected void onPostExecute(Bitmap bitmap) { in onPostExecute() argument
294 mReceiver.onBitmapDecoded(bitmap); in onPostExecute()
352 Bitmap bitmap = mBitmapRegionDecoder.decodeRegion(mCropRect, options); in doInBackground() local
359 bitmap = Bitmap.createBitmap( in doInBackground()
360bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), rotateMatrix, false); in doInBackground()
363 return bitmap; in doInBackground()
[all …]
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/common/
DLogoUtils.java46 Bitmap bitmap = null; in getOrganisationLogo() local
50 bitmap = getBitmapPartiallyResized(logoFile.getPath(), maxWidth, maxHeight); in getOrganisationLogo()
51 if (bitmap == null) { in getOrganisationLogo()
56 if (bitmap != null) { in getOrganisationLogo()
58 resizeBitmap(bitmap, maxWidth, maxHeight)); in getOrganisationLogo()
103 static Bitmap resizeBitmap(Bitmap bitmap, int maxWidth, int maxHeight) { in resizeBitmap() argument
104 int width = bitmap.getWidth(); in resizeBitmap()
105 int height = bitmap.getHeight(); in resizeBitmap()
111 bitmap = Bitmap.createScaledBitmap(bitmap, width, height, false); in resizeBitmap()
113 return bitmap; in resizeBitmap()
/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/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 …]
/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/Car/Cluster/ClusterOsDouble/src/com/android/car/cluster/view/
DBitmapFetcher.java96 Bitmap bitmap = mCache.get(uri.toString()); in getBitmap() local
97 if (bitmap == null) { in getBitmap()
105 bitmap = BitmapFactory.decodeFileDescriptor(fileDesc.getFileDescriptor()); in getBitmap()
106 return bitmap; in getBitmap()
111 if (bitmap.getWidth() != width || bitmap.getHeight() != height) { in getBitmap()
112 bitmap = Bitmap.createScaledBitmap(bitmap, width, height, true); in getBitmap()
114 mCache.put(uri.toString(), bitmap); in getBitmap() local
116 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/Bluetooth/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/
DBipImageTest.java63 Bitmap bitmap = BitmapFactory.decodeStream(expectedInputStream); in testParseImage_200by200() local
66 Assert.assertTrue(bitmap.sameAs(image.getImage())); in testParseImage_200by200()
77 Bitmap bitmap = BitmapFactory.decodeStream(expectedInputStream); in testParseImage_600by600() local
80 Assert.assertTrue(bitmap.sameAs(image.getImage())); in testParseImage_600by600()
87 Bitmap bitmap = BitmapFactory.decodeStream(imageInputStream); in testMakeFromImage_200by200() local
88 BipImage image = new BipImage(sImageHandle, bitmap); in testMakeFromImage_200by200()
90 Assert.assertTrue(bitmap.sameAs(image.getImage())); in testMakeFromImage_200by200()
97 Bitmap bitmap = BitmapFactory.decodeStream(imageInputStream); in testMakeFromImage_600by600() local
98 BipImage image = new BipImage(sImageHandle, bitmap); in testMakeFromImage_600by600()
100 Assert.assertTrue(bitmap.sameAs(image.getImage())); in testMakeFromImage_600by600()

12345678910>>...16