Lines Matching refs:pixels
103 void *pixels = OH_Drawing_BitmapGetPixels(bitmap1);
104 if (pixels != nullptr) {
106 OH_Drawing_Bitmap *bitmap = OH_Drawing_BitmapCreateFromPixels(&imageInfo, pixels, rowBytes);
123 bitmap = OH_Drawing_BitmapCreateFromPixels(&imageInfo, pixels, rowBytes2);
147 uint8_t *pixels = new uint8_t[width * height * 4];
150 OH_Drawing_Bitmap *bitmap1 = OH_Drawing_BitmapCreateFromPixels(nullptr, pixels, rowBytes);
152 // 2. OH_Drawing_BitmapCreateFromPixels the second parameter pixels is empty
156 OH_Drawing_Bitmap *bitmap3 = OH_Drawing_BitmapCreateFromPixels(&imageInfo, pixels, 0);
160 OH_Drawing_Bitmap *bitmap4 = OH_Drawing_BitmapCreateFromPixels(&imageInfo, pixels, rowBytes);
165 OH_Drawing_Bitmap *bitmap5 = OH_Drawing_BitmapCreateFromPixels(&imageInfo, pixels, rowBytes);
173 delete[] pixels;
188 uint8_t *pixels = new uint8_t[width * height * 4];
190 // 1. OH_Drawing_BitmapCreateFromPixels initializes a 48*48 image, but the memory allocated for pixels is 47*48
194 // 2. OH_Drawing_BitmapCreateFromPixels initializes a 48*48 image, but the memory allocated for pixels is 48*47
198 // 3. OH_Drawing_BitmapCreateFromPixels initializes a 48*48 image, but the memory allocated for pixels is 48*48 and
208 delete[] pixels;
226 uint8_t *pixels = new uint8_t[width * height * 4];
231 OH_Drawing_Bitmap *bitmap = OH_Drawing_BitmapCreateFromPixels(&imageInfo, pixels, rowBytes);
235 delete[] pixels;
267 void *pixels = OH_Drawing_BitmapGetPixels(bitmap1);
268 if (pixels != nullptr) {
270 OH_Drawing_Bitmap *bitmap = OH_Drawing_BitmapCreateFromPixels(&imageInfo, pixels, rowBytes);
287 bitmap = OH_Drawing_BitmapCreateFromPixels(&imageInfo, pixels, rowBytes2);
329 void *pixels = OH_Drawing_BitmapGetPixels(bitmap1);
330 if (pixels != nullptr) {
332 OH_Drawing_Bitmap *bitmap = OH_Drawing_BitmapCreateFromPixels(&imageInfo, pixels, rowBytes);
349 bitmap = OH_Drawing_BitmapCreateFromPixels(&imageInfo, pixels, rowBytes2);
487 void *pixels = OH_Drawing_BitmapGetPixels(bitmap2);
488 EXPECT_NE(pixels, nullptr);
490 OH_Drawing_Bitmap *bitmap3 = OH_Drawing_BitmapCreateFromPixels(&imageInfo, pixels, rowBytes);
586 void *pixels = OH_Drawing_BitmapGetPixels(cBitmap);
587 EXPECT_NE(pixels, nullptr);
632 void *pixels = OH_Drawing_BitmapGetPixels(nullptr);
633 EXPECT_EQ(pixels, nullptr);
696 void *pixels = OH_Drawing_BitmapGetPixels(cBitmap);
697 EXPECT_NE(pixels, nullptr);
728 void *pixels = new uint32_t[width * height];
731 bool res = OH_Drawing_BitmapReadPixels(bitmap, &imageInfo, pixels, width * 4, 0, 0);
760 void *pixels = new uint32_t[width * height];
763 bool res = OH_Drawing_BitmapReadPixels(nullptr, &imageInfo, pixels, width * 4, 0, 0);
767 res = OH_Drawing_BitmapReadPixels(bitmap, nullptr, pixels, width * 4, 0, 0);
775 res = OH_Drawing_BitmapReadPixels(bitmap, &imageInfo, pixels, 0, 0, 0);
779 res = OH_Drawing_BitmapReadPixels(bitmap, &imageInfo, pixels, width * 4, 0, 1);
783 res = OH_Drawing_BitmapReadPixels(bitmap, &imageInfo, pixels, width * 4, 1, 0);
822 void *pixels = new uint32_t[width * height];
823 bool res = OH_Drawing_BitmapReadPixels(bitmap, &imageInfo, pixels, width * 4, 0, 0);
828 res = OH_Drawing_BitmapReadPixels(bitmap, &imageInfo2, pixels, width * 4, 0, 0);
841 res = OH_Drawing_BitmapReadPixels(bitmap, &imageInfo4, pixels, width * 3, 0, 0);
846 res = OH_Drawing_BitmapReadPixels(bitmap, &imageInfo5, pixels, width * 4, 1000, 0);
851 res = OH_Drawing_BitmapReadPixels(bitmap, &imageInfo6, pixels, width * 4, 0, 1000);
874 void *pixels = new uint32_t[width * height];
877 bool res = OH_Drawing_BitmapReadPixels(bitmap, &imageInfo, pixels, width * 4, 0, 0);