int width = 640; int height = 480; size_t minRowBytes = SkAlign4(width * 3); SkImageInfo info = SkImageInfo::Make(width, height, kRGB_888x_SkColorType, kOpaque_SkAlphaType, nullptr, minRowBytes);
int width = 1024; int height = 768; size_t minRowBytes = SkAlign4(width * 8); SkImageInfo info = SkImageInfo::Make(width, height, kRGBA_F16_SkColorType, kPremul_SkAlphaType, nullptr, minRowBytes);In this example, we set the width and height of the image to 1024 and 768, respectively. We then calculate the minimum number of bytes required for each row of pixels by multiplying the width by 8 (as we have 4 color channels each with 16 bits) and aligning it to 4 bytes. Finally, we create a SkImageInfo object with the specified parameters. Overall, SkImageInfo and its minRowBytes parameter is useful for allocating memory for images and ensuring efficient access to the pixel data. It is part of the Skia library.