Rerun C++ SDK
|
Archetype: An image encoded as e.g. More...
#include <rerun/archetypes/encoded_image.hpp>
Public Types | |
using | IndicatorComponent = rerun::components::IndicatorComponent< IndicatorComponentName > |
Indicator component, used to identify the archetype when converting to a list of components. | |
Public Member Functions | |
EncodedImage (EncodedImage &&other)=default | |
EncodedImage | with_media_type (rerun::components::MediaType _media_type) && |
The Media Type of the asset. | |
EncodedImage | with_opacity (rerun::components::Opacity _opacity) && |
Opacity of the image, useful for layering several images. | |
EncodedImage | with_draw_order (rerun::components::DrawOrder _draw_order) && |
An optional floating point value that specifies the 2D drawing order. | |
Static Public Member Functions | |
static Result< EncodedImage > | from_file (const std::filesystem::path &filepath) |
Create a new EncodedImage from the contents of a file on disk, e.g. a PNG or JPEG. | |
static EncodedImage | from_bytes (rerun::Collection< uint8_t > image_contents, std::optional< rerun::components::MediaType > media_type={}) |
Create a new EncodedImage from the contents of an image file, like a PNG or JPEG. | |
Public Attributes | |
rerun::components::Blob | blob |
The encoded content of some image file, e.g. a PNG or JPEG. | |
std::optional< rerun::components::MediaType > | media_type |
The Media Type of the asset. | |
std::optional< rerun::components::Opacity > | opacity |
Opacity of the image, useful for layering several images. | |
std::optional< rerun::components::DrawOrder > | draw_order |
An optional floating point value that specifies the 2D drawing order. | |
Static Public Attributes | |
static constexpr const char | IndicatorComponentName [] |
Archetype: An image encoded as e.g.
a JPEG or PNG.
Rerun also supports uncompressed images with the archetypes::Image
. For images that refer to video frames see archetypes::VideoFrameReference
.
|
inlinestatic |
Create a new EncodedImage
from the contents of an image file, like a PNG or JPEG.
If no MediaType
is specified, the Rerun Viewer will try to guess one from the data at render-time. If it can't, rendering will fail with an error.
|
inline |
The Media Type of the asset.
Supported values:
image/jpeg
image/png
If omitted, the viewer will try to guess from the data blob. If it cannot guess, it won't be able to render the asset.
|
inline |
Opacity of the image, useful for layering several images.
Defaults to 1.0 (fully opaque).
|
inline |
An optional floating point value that specifies the 2D drawing order.
Objects with higher values are drawn on top of those with lower values.
std::optional<rerun::components::MediaType> rerun::archetypes::EncodedImage::media_type |
The Media Type of the asset.
Supported values:
image/jpeg
image/png
If omitted, the viewer will try to guess from the data blob. If it cannot guess, it won't be able to render the asset.
std::optional<rerun::components::Opacity> rerun::archetypes::EncodedImage::opacity |
Opacity of the image, useful for layering several images.
Defaults to 1.0 (fully opaque).
std::optional<rerun::components::DrawOrder> rerun::archetypes::EncodedImage::draw_order |
An optional floating point value that specifies the 2D drawing order.
Objects with higher values are drawn on top of those with lower values.
|
staticconstexpr |