gz/rendering/PixelFormat.hh
Go to the documentation of this file.
62 };
Provides supporting functions for PixelFormat enum.
Definition: gz/rendering/PixelFormat.hh:67
static PixelFormat Sanitize(PixelFormat _format)
Sanitize given format. If the given value is invalid, PF_UNKNOWN will be returned,...
static std::string Name(PixelFormat _format)
Get human-readable name for pixel format value.
static unsigned int ChannelCount(PixelFormat _format)
Get number of channels for given format. If an invalid format is given, 0 will be returned.
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...
static bool IsValid(PixelFormat _format)
Determine if given format is valid PixelFormat enum.
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 BytesPerPixel(PixelFormat _format)
Get number of bytes per pixel for given format. If an invalid format is given, 0 will be returned....
static PixelFormat Enum(const std::string &_name)
Get enum value by human-readable name. The given string should match watch is returned by GetName....
PixelFormat
Image pixel format types.
Definition: gz/rendering/PixelFormat.hh:33
@ PF_BAYER_GBGR8
< Bayer GBGR, 1-byte per channel
Definition: gz/rendering/PixelFormat.hh:47
@ PF_B8G8R8
< BGR, 1-byte per channel
Definition: gz/rendering/PixelFormat.hh:41
@ PF_R8G8B8
< RGB, 1-byte per channel
Definition: gz/rendering/PixelFormat.hh:39
@ PF_BAYER_GRGB8
< Bayer GRGB, 1-byte per channel
Definition: gz/rendering/PixelFormat.hh:49
@ PF_BAYER_RGGB8
< Bayer RGGB, 1-byte per channel
Definition: gz/rendering/PixelFormat.hh:43
@ PF_L8
< Grayscale, 1-byte per channel
Definition: gz/rendering/PixelFormat.hh:37
@ 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:61
@ PF_UNKNOWN
< Unknown or errant type
Definition: gz/rendering/PixelFormat.hh:35
@ PF_R8G8B8A8
< RGBA, 1-byte per channel
Definition: gz/rendering/PixelFormat.hh:59