gz/rendering/PixelFormat.hh
Provides supporting functions for PixelFormat enum.
Definition: gz/rendering/PixelFormat.hh:64
@ PF_R8G8B8
< RGB, 1-byte per channel
Definition: gz/rendering/PixelFormat.hh:39
STL class.
PixelFormat
Image pixel format types.
Definition: gz/rendering/PixelFormat.hh:32
@ PF_BAYER_RGGB8
< Bayer RGGB, 1-byte per channel
Definition: gz/rendering/PixelFormat.hh:43
static unsigned int MemorySize(PixelFormat _format, unsigned int _width, unsigned int _height)
Get total memory size in bytes for an image with the given format and dimensions. If an invalid forma...
@ PF_BAYER_GBGR8
< Bayer GBGR, 1-byte per channel
Definition: gz/rendering/PixelFormat.hh:47
static PixelFormat Enum(const std::string &_name)
Get enum value by human-readable name. The given string should match watch is returned by GetName....
@ PF_L8
< Grayscale, 1-byte per channel
Definition: gz/rendering/PixelFormat.hh:37
static unsigned int BytesPerPixel(PixelFormat _format)
Get number of bytes per pixel for given format. If an invalid format is given, 0 will be returned....
static unsigned int BytesPerChannel(PixelFormat _format)
Get number of bytes per channel for given format. If an invalid format is given, 0 will be returned.
static unsigned int ChannelCount(PixelFormat _format)
Get number of channels for given format. If an invalid format is given, 0 will be returned.
@ PF_B8G8R8
< BGR, 1-byte per channel
Definition: gz/rendering/PixelFormat.hh:41
static std::string Name(PixelFormat _format)
Get human-readable name for pixel format value.
@ PF_BAYER_GRGB8
< Bayer GRGB, 1-byte per channel
Definition: gz/rendering/PixelFormat.hh:49
static PixelFormat Sanitize(PixelFormat _format)
Sanitize given format. If the given value is invalid, PF_UNKNOWN will be returned,...
static bool IsValid(PixelFormat _format)
Determine if given format is valid PixelFormat enum.
@ PF_UNKNOWN
< Unknown or errant type
Definition: gz/rendering/PixelFormat.hh:35
@ PF_BAYER_BGGR8
< Bayer BGGR, 1-byte per channel
Definition: gz/rendering/PixelFormat.hh:45
@ PF_COUNT
< Number of pixel format types
Definition: gz/rendering/PixelFormat.hh:59