6#include "../collection.hpp"
7#include "../compiler_utils.hpp"
8#include "../component_batch.hpp"
9#include "../components/blob.hpp"
10#include "../components/draw_order.hpp"
11#include "../components/media_type.hpp"
12#include "../components/opacity.hpp"
13#include "../indicator_component.hpp"
14#include "../result.hpp"
67 std::optional<rerun::components::Opacity>
opacity;
75 static constexpr const char IndicatorComponentName[] =
76 "rerun.components.EncodedImageIndicator";
91 std::optional<rerun::components::MediaType>
media_type = {}
94 image.
blob = image_contents;
116 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
125 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
134 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
142 template <
typename T>
147 struct AsComponents<archetypes::EncodedImage> {
149 static Result<std::vector<ComponentBatch>> serialize(
150 const archetypes::EncodedImage& archetype
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
A class for representing either a usable value, or an error.
Definition result.hpp:14
All built-in archetypes. See Types in the Rerun manual.
Definition rerun.hpp:76
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:22
Archetype: An image encoded as e.g.
Definition encoded_image.hpp:50
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.
EncodedImage with_opacity(rerun::components::Opacity _opacity) &&
Opacity of the image, useful for layering several images.
Definition encoded_image.hpp:122
std::optional< rerun::components::MediaType > media_type
The Media Type of the asset.
Definition encoded_image.hpp:62
std::optional< rerun::components::DrawOrder > draw_order
An optional floating point value that specifies the 2D drawing order.
Definition encoded_image.hpp:72
EncodedImage with_media_type(rerun::components::MediaType _media_type) &&
The Media Type of the asset.
Definition encoded_image.hpp:113
EncodedImage with_draw_order(rerun::components::DrawOrder _draw_order) &&
An optional floating point value that specifies the 2D drawing order.
Definition encoded_image.hpp:131
rerun::components::Blob blob
The encoded content of some image file, e.g. a PNG or JPEG.
Definition encoded_image.hpp:52
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.
Definition encoded_image.hpp:89
std::optional< rerun::components::Opacity > opacity
Opacity of the image, useful for layering several images.
Definition encoded_image.hpp:67
Component: A binary blob of data.
Definition blob.hpp:16
Component: Draw order of 2D elements.
Definition draw_order.hpp:19
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:30
Component: Degree of transparency ranging from 0.0 (fully transparent) to 1.0 (fully opaque).
Definition opacity.hpp:17