SkBitmap bitmap; int bpp = bitmap.bytesPerPixel();
SkPixmap pixmap; pixmap.info().bytesPerPixel();In this example, we create a SkPixmap object and retrieve the bytesPerPixel from its SkImageInfo property. This method is useful when working with images that are not directly stored in a SkBitmap object. These examples demonstrate how bytesPerPixel can be used to retrieve information about the bitmap image. The SkBitmap class is part of the Skia Graphics Library, a powerful and portable graphics rendering engine that can be used in a wide range of applications.