Lines Matching refs:BitmapUtil
23 import com.android.contacts.common.util.BitmapUtil;
29 * Tests for {@link com.android.contacts.common.util.BitmapUtil}.
34 assertEquals(100, BitmapUtil.getSmallerExtentFromBytes(createJpegRawData(100, 100)));
35 assertEquals(100, BitmapUtil.getSmallerExtentFromBytes(createPngRawData(100, 100)));
39 assertEquals(50, BitmapUtil.getSmallerExtentFromBytes(createJpegRawData(200, 50)));
40 assertEquals(50, BitmapUtil.getSmallerExtentFromBytes(createPngRawData(200, 50)));
44 assertEquals(40, BitmapUtil.getSmallerExtentFromBytes(createJpegRawData(40, 150)));
45 assertEquals(40, BitmapUtil.getSmallerExtentFromBytes(createPngRawData(40, 150)));
49 assertEquals(1, BitmapUtil.findOptimalSampleSize(512, 512));
53 assertEquals(1, BitmapUtil.findOptimalSampleSize(512, 1024));
57 assertEquals(2, BitmapUtil.findOptimalSampleSize(512, 256));
61 assertEquals(2, BitmapUtil.findOptimalSampleSize(512, 230));
65 assertEquals(4, BitmapUtil.findOptimalSampleSize(512, 129));
69 assertEquals(4, BitmapUtil.findOptimalSampleSize(512, 128));
73 assertEquals(1, BitmapUtil.findOptimalSampleSize(-1, 128));
77 assertEquals(1, BitmapUtil.findOptimalSampleSize(128, -1));
81 assertBitmapSize(128, 64, BitmapUtil.decodeBitmapFromBytes(createJpegRawData(128, 64), 1));
82 assertBitmapSize(128, 64, BitmapUtil.decodeBitmapFromBytes(createPngRawData(128, 64), 1));
86 assertBitmapSize(64, 32, BitmapUtil.decodeBitmapFromBytes(createJpegRawData(128, 64), 2));
87 assertBitmapSize(64, 32, BitmapUtil.decodeBitmapFromBytes(createPngRawData(128, 64), 2));
91 assertBitmapSize(25, 20, BitmapUtil.decodeBitmapFromBytes(createJpegRawData(50, 40), 2));
92 assertBitmapSize(25, 20, BitmapUtil.decodeBitmapFromBytes(createPngRawData(50, 40), 2));
96 assertBitmapSize(32, 16, BitmapUtil.decodeBitmapFromBytes(createJpegRawData(128, 64), 4));
97 assertBitmapSize(32, 16, BitmapUtil.decodeBitmapFromBytes(createPngRawData(128, 64), 4));