| /development/samples/devbytes/animation/KeyframeAnimation/src/com/example/android/keyframeanimation/ |
| KeyframeAnimation.java | 20 import android.graphics.Bitmap; 75 Bitmap bitmap = Bitmap.createBitmap(400, 400, Bitmap.Config.ARGB_8888); local 76 Canvas canvas = new Canvas(bitmap); 82 return new BitmapDrawable(getResources(), bitmap);
|
| /development/samples/devbytes/animation/PictureViewer/src/com/example/android/pictureviewer/ |
| PictureViewer.java | 20 import android.graphics.Bitmap; 64 Bitmap bitmap = BitmapFactory.decodeResource(getResources(), local 66 drawables[i] = new BitmapDrawable(getResources(), bitmap);
|
| /development/samples/devbytes/graphics/BitmapScaling/src/com/example/android/bitmapscaling/ |
| BitmapScaling.java | 20 import android.graphics.Bitmap; 29 * bitmap. Sub-sampling can speed up load times and reduce the need for large bitmaps 30 * in memory if your target bitmap size is much smaller, although it's good to understand 31 * that you can't get specific Bitmap sizes, but rather power-of-two reductions in sizes. 46 Bitmap bitmap = BitmapFactory.decodeResource(getResources(), local 48 originalImageView.setImageBitmap(bitmap); 51 addScaledImageView(bitmap, i, container); 55 private void addScaledImageView(Bitmap original, int sampleSize, LinearLayout container) { 58 // load time by simply reading less pixels for every pixel value in the final bitmap [all...] |
| /external/freetype/src/raster/ |
| ftrend1.c | 93 /* convert a slot's glyph image into a bitmap */ 102 FT_Bitmap* bitmap = &slot->bitmap; local 124 /* release old bitmap buffer */ 127 FT_FREE( bitmap->buffer ); 134 if ( FT_ALLOC_MULT( bitmap->buffer, bitmap->rows, bitmap->pitch ) ) 140 y_shift = ( (FT_Int)bitmap->rows - slot->bitmap_top ) * 64; 148 /* translate outline to render it into the bitmap */ [all...] |
| /external/glide/library/src/main/java/com/bumptech/glide/load/resource/bitmap/ |
| BitmapDrawableResource.java | 1 package com.bumptech.glide.load.resource.bitmap; 14 * is also responsible for returning the underlying {@link android.graphics.Bitmap} to the given
|
| BitmapTransformation.java | 1 package com.bumptech.glide.load.resource.bitmap; 4 import android.graphics.Bitmap; 12 * A simple {@link com.bumptech.glide.load.Transformation} for transforming {@link android.graphics.Bitmap}s that 20 * public Bitmap transform(BitmapPool pool, Bitmap toTransform, int outWidth, int outHeight) { 25 * return Bitmap.createScaledBitmap(toTransform, outWidth, outHeight, true); 31 public abstract class BitmapTransformation implements Transformation<Bitmap> { 44 public final Resource<Bitmap> transform(Resource<Bitmap> resource, int outWidth, int outHeight) { 49 Bitmap toTransform = resource.get() [all...] |
| CenterCrop.java | 1 package com.bumptech.glide.load.resource.bitmap; 4 import android.graphics.Bitmap; 24 // Bitmap doesn't implement equals, so == and .equals are equivalent here. 27 protected Bitmap transform(BitmapPool pool, Bitmap toTransform, int outWidth, int outHeight) { 28 final Bitmap toReuse = pool.get(outWidth, outHeight, toTransform.getConfig() != null 29 ? toTransform.getConfig() : Bitmap.Config.ARGB_8888); 30 Bitmap transformed = TransformationUtils.centerCrop(toReuse, toTransform, outWidth, outHeight); 39 return "CenterCrop.com.bumptech.glide.load.resource.bitmap";
|
| FileDescriptorBitmapDataLoadProvider.java | 1 package com.bumptech.glide.load.resource.bitmap; 3 import android.graphics.Bitmap; 19 * {@link android.graphics.Bitmap}s from {@link android.os.ParcelFileDescriptor} data. 21 public class FileDescriptorBitmapDataLoadProvider implements DataLoadProvider<ParcelFileDescriptor, Bitmap> { 22 private final ResourceDecoder<File, Bitmap> cacheDecoder; 28 cacheDecoder = new FileToStreamDecoder<Bitmap>(new StreamBitmapDecoder(bitmapPool, decodeFormat)); 35 public ResourceDecoder<File, Bitmap> getCacheDecoder() { 40 public ResourceDecoder<ParcelFileDescriptor, Bitmap> getSourceDecoder() { 50 public ResourceEncoder<Bitmap> getEncoder() {
|
| GlideBitmapDrawableResource.java | 1 package com.bumptech.glide.load.resource.bitmap; 8 * A resource wrapper for {@link com.bumptech.glide.load.resource.bitmap.GlideBitmapDrawable}.
|
| ImageVideoDataLoadProvider.java | 1 package com.bumptech.glide.load.resource.bitmap; 3 import android.graphics.Bitmap; 18 * {@link android.os.ParcelFileDescriptor} as an {@link android.graphics.Bitmap}. 20 public class ImageVideoDataLoadProvider implements DataLoadProvider<ImageVideoWrapper, Bitmap> { 22 private final ResourceDecoder<File, Bitmap> cacheDecoder; 23 private final ResourceEncoder<Bitmap> encoder; 26 public ImageVideoDataLoadProvider(DataLoadProvider<InputStream, Bitmap> streamBitmapProvider, 27 DataLoadProvider<ParcelFileDescriptor, Bitmap> fileDescriptorBitmapProvider) { 37 public ResourceDecoder<File, Bitmap> getCacheDecoder() { 42 public ResourceDecoder<ImageVideoWrapper, Bitmap> getSourceDecoder() [all...] |
| StreamBitmapDataLoadProvider.java | 1 package com.bumptech.glide.load.resource.bitmap; 3 import android.graphics.Bitmap; 19 * {@link android.graphics.Bitmap}s using {@link java.io.InputStream} data. 21 public class StreamBitmapDataLoadProvider implements DataLoadProvider<InputStream, Bitmap> { 25 private final FileToStreamDecoder<Bitmap> cacheDecoder; 31 cacheDecoder = new FileToStreamDecoder<Bitmap>(decoder); 35 public ResourceDecoder<File, Bitmap> getCacheDecoder() { 40 public ResourceDecoder<InputStream, Bitmap> getSourceDecoder() { 50 public ResourceEncoder<Bitmap> getEncoder() {
|
| /external/glide/library/src/main/java/com/bumptech/glide/load/resource/gif/ |
| GifBitmapProvider.java | 4 import android.graphics.Bitmap; 17 public Bitmap obtain(int width, int height, Bitmap.Config config) { 22 public void release(Bitmap bitmap) { 23 if (!bitmapPool.put(bitmap)) { 24 bitmap.recycle();
|
| GifFrameResourceDecoder.java | 3 import android.graphics.Bitmap; 9 import com.bumptech.glide.load.resource.bitmap.BitmapResource; 11 class GifFrameResourceDecoder implements ResourceDecoder<GifDecoder, Bitmap> { 19 public Resource<Bitmap> decode(GifDecoder source, int width, int height) { 20 Bitmap bitmap = source.getNextFrame(); local 21 return BitmapResource.obtain(bitmap, bitmapPool);
|
| /external/pdfium/fpdfsdk/ |
| fpdfppo_embeddertest.cpp | 156 FPDF_BITMAP bitmap = RenderPage(page); local 157 ASSERT_EQ(200, FPDFBitmap_GetWidth(bitmap)); 158 ASSERT_EQ(200, FPDFBitmap_GetHeight(bitmap)); 159 ASSERT_EQ(800, FPDFBitmap_GetStride(bitmap)); 161 std::string digest = HashBitmap(bitmap); 162 FPDFBitmap_Destroy(bitmap); 175 FPDF_BITMAP bitmap = RenderPage(page); local 176 ASSERT_EQ(200, FPDFBitmap_GetWidth(bitmap)); 177 ASSERT_EQ(200, FPDFBitmap_GetHeight(bitmap)); 178 ASSERT_EQ(800, FPDFBitmap_GetStride(bitmap)); 193 FPDF_BITMAP bitmap = RenderPage(page); local [all...] |
| /external/pdfium/xfa/fwl/ |
| cfx_barcode_unittest.cpp | 26 auto bitmap = pdfium::MakeRetain<CFX_DIBitmap>(); variable 27 if (bitmap->Create(640, 480, FXDIB_Rgb32)) 28 bitmap_ = bitmap;
|
| /external/replicaisland/src/com/replica/replicaisland/ |
| FadeDrawableComponent.java | 114 DrawableBitmap bitmap = factory.allocateDrawableBitmap(); local 115 bitmap.resize((int)mTexture.width, (int)mTexture.height); 117 bitmap.setWidth((int)parentObject.width); 118 bitmap.setHeight((int)parentObject.height); 119 bitmap.setOpacity(opacity); 120 bitmap.setTexture(mTexture); 121 mRenderComponent.setDrawable(bitmap);
|
| /external/robolectric/v1/src/test/java/com/xtremelabs/robolectric/shadows/ |
| BitmapTest.java | 3 import android.graphics.Bitmap; 4 import android.graphics.Bitmap.Config; 24 Bitmap originalBitmap = Robolectric.newInstanceOf(Bitmap.class); 25 shadowOf(originalBitmap).appendDescription("Original bitmap"); 26 Bitmap scaledBitmap = Bitmap.createScaledBitmap(originalBitmap, 100, 200, false); 27 assertEquals("Original bitmap scaled to 100 x 200", shadowOf(scaledBitmap).getDescription()); 34 Bitmap bitmap = Bitmap.createBitmap(100, 200, Config.ARGB_8888) local 40 Bitmap bitmap = Bitmap.createBitmap(100, 200, Config.ARGB_8888); local 55 Bitmap bitmap = Bitmap.createBitmap(100, 200, Config.ARGB_8888); local 126 Bitmap bitmap = Robolectric.newInstanceOf(Bitmap.class); local 135 Bitmap bitmap = Robolectric.newInstanceOf(Bitmap.class); local [all...] |
| /external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/ |
| ShadowIconTest.java | 7 import android.graphics.Bitmap; 33 Bitmap bitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888); local 34 Icon icon = Icon.createWithBitmap(bitmap); 36 assertThat(shadowOf(icon).getBitmap()).isEqualTo(bitmap);
|
| /external/skia/gm/ |
| bitmapimage.cpp | 22 return SkString("bitmap-image-srgb-legacy"); 38 // Create matching bitmap. 40 SkBitmap bitmap; variable 41 bitmap.allocPixels(codec->getInfo()); 42 codec->getPixels(codec->getInfo(), bitmap.getPixels(), bitmap.rowBytes()); 45 // The top two squares show an sRGB image, then bitmap, drawn to a legacy canvas. 52 legacyCanvas.drawBitmap(bitmap, 0.0f, 0.0f, nullptr); 56 // The bottom two squares show an sRGB image, then bitmap, drawn to a srgb canvas. 63 srgbCanvas.drawBitmap(bitmap, 0.0f, 0.0f, nullptr) [all...] |
| bitmappremul.cpp | 14 * This GM checks that bitmap pixels are unpremultiplied before being exported 18 * This tests both the ARGB4444 and ARGB8888 bitmap configurations. 25 static void init_bitmap(SkColorType ct, SkBitmap* bitmap) { 26 bitmap->allocPixels(SkImageInfo::Make(SLIDE_SIZE, SLIDE_SIZE, ct, 28 bitmap->eraseColor(SK_ColorWHITE); 32 SkBitmap bitmap; local 33 init_bitmap(kN32_SkColorType, &bitmap); 36 uint32_t* dst = bitmap.getAddr32(0, y); 45 return bitmap; 49 SkBitmap bitmap; local 66 SkBitmap bitmap; local 85 SkBitmap bitmap; local [all...] |
| copyTo4444.cpp | 60 SkBitmap bitmap; local 62 bitmap.allocPixels(imageInfo); 63 SkCanvas offscreen(bitmap); 65 canvas->drawBitmap(bitmap, 0, 0); 67 canvas->drawBitmap(bitmap, 1, 1); 74 if (bitmap.writePixels(redPixmap, 0, 0)) { 75 canvas->drawBitmap(bitmap, 2, 2); 78 if (bitmap.writePixels(bluePixmap, 0, 0)) { 79 canvas->drawBitmap(bitmap, 3, 3);
|
| extractbitmap.cpp | 16 static void create_bitmap(SkBitmap* bitmap) { 19 bitmap->allocN32Pixels(W, H); 21 SkCanvas canvas(*bitmap); 43 SkBitmap bitmap; variable 44 create_bitmap(&bitmap); variable 45 int x = bitmap.width() / 2; 46 int y = bitmap.height() / 2; 50 canvas->drawBitmap(bitmap, 0, 0); 55 // Draw the bottom right fourth of the bitmap over the top left 57 bitmap.extractSubset(&subset, SkIRect::MakeXYWH(x, y, x, y)) [all...] |
| imagemagnifier.cpp | 48 SkBitmap bitmap; local 49 bitmap.allocN32Pixels(WIDTH_HEIGHT, WIDTH_HEIGHT); 50 SkCanvas canvas(bitmap); 64 result.setPixelRef(sk_ref_sp(bitmap.pixelRef()), 0, 0);
|
| makecolorspace.cpp | 18 SkBitmap bitmap; local 19 bitmap.allocPixels(codec->getInfo()); 23 codec->getPixels(codec->getInfo(), bitmap.getPixels(), bitmap.rowBytes(), &opts); 24 return SkImage::MakeFromBitmap(bitmap);
|
| /external/skia/samplecode/ |
| SampleWritePixels.cpp | 18 static void create_bitmap(SkBitmap* bitmap) { 21 bitmap->allocN32Pixels(W, H); 23 SkCanvas canvas(*bitmap); 46 SkBitmap bitmap; local 47 create_bitmap(&bitmap); 48 int x = bitmap.width() / 2; 49 int y = bitmap.height() / 2; 52 bitmap.extractSubset(&subset, SkIRect::MakeXYWH(x, y, x, y)); 56 canvas->writePixels(bitmap, 0, 0);
|