Functions

  • size_t BitsPerPixel (const fuchsia::images::PixelFormat & pixel_format)

    Overall bits per pixel, across all pixel data in the whole image.

    Defined at line 12 of file ../../sdk/lib/images/cpp/images.cc

  • size_t StrideBytesPerWidthPixel (const fuchsia::images::PixelFormat & pixel_format)

    This is the number of stride bytes per pixel of width. For formats such as

    NV12 that separate Y and UV data, this is the number of stride bytes of the Y

    plane. NV12 has the same stride for the UV data. formats with a different

    stride for UV data vs Y data are not handled yet.

    Defined at line 27 of file ../../sdk/lib/images/cpp/images.cc

  • size_t MaxSampleAlignment (const fuchsia::images::PixelFormat & pixel_format)

    Returns the pixel alignment for the given format.

    This is technically something closer to "max sample alignment" for the given

    format. For example, NV12 returns 2 here because its UV interleaved data has

    2 bytes per sample, despite its Y plane having 1 byte per sample.

    The stride is required to be divisible by this alignment.

    Defined at line 42 of file ../../sdk/lib/images/cpp/images.cc

  • size_t ImageSize (const fuchsia::images::ImageInfo & image_info)

    This would be height * stride, if it weren't for formats like NV12, where it

    isn't. The output is bytes.

    Defined at line 67 of file ../../sdk/lib/images/cpp/images.cc