diff --git a/crates/re_types/definitions/rerun/archetypes/image.fbs b/crates/re_types/definitions/rerun/archetypes/image.fbs index d7f4bccf7b6b0..eb91ab3ed36f7 100644 --- a/crates/re_types/definitions/rerun/archetypes/image.fbs +++ b/crates/re_types/definitions/rerun/archetypes/image.fbs @@ -16,10 +16,16 @@ namespace rerun.archetypes; /// Leading and trailing unit-dimensions are ignored, so that /// `1x640x480x3x1` is treated as a `640x480x3` RGB image. /// +/// Rerun also supports compressed image encoded as JPEG, N12, and YUY2. +/// Using these formats can save a lot of bandwidth and memory. +/// \python To compress an image, use [`rerun.Image.compress`][]. +/// \python To pass in an already encoded image, use [`rerun.ImageEncoded`][]. +/// \rust See [`rerun::components::TensorData`] for more. +/// \cpp See [`rerun::datatypes::TensorBuffer`] for more. +/// /// \cpp Since the underlying `rerun::datatypes::TensorData` uses `rerun::Collection` internally, /// \cpp data can be passed in without a copy from raw pointers or by reference from `std::vector`/`std::array`/c-arrays. /// \cpp If needed, this "borrow-behavior" can be extended by defining your own `rerun::CollectionAdapter`. -/// \python For an easy way to pass in image formats or encoded images, see [`rerun.ImageEncoded`][]. /// /// \example image_simple image="https://static.rerun.io/image_simple/06ba7f8582acc1ffb42a7fd0006fad7816f3e4e4/1200w.png" table Image ( diff --git a/crates/re_types/src/archetypes/image.rs b/crates/re_types/src/archetypes/image.rs index 524ce24a934f5..05ab666e19e22 100644 --- a/crates/re_types/src/archetypes/image.rs +++ b/crates/re_types/src/archetypes/image.rs @@ -31,6 +31,11 @@ use ::re_types_core::{DeserializationError, DeserializationResult}; /// Leading and trailing unit-dimensions are ignored, so that /// `1x640x480x3x1` is treated as a `640x480x3` RGB image. /// +/// Rerun also supports compressed image encoded as JPEG, N12, and YUY2. +/// Using these formats can save a lot of bandwidth and memory. +/// +/// See [`rerun::components::TensorData`] for more. +/// /// ## Example /// /// ### `image_simple`: diff --git a/docs/content/reference/types/archetypes/image.md b/docs/content/reference/types/archetypes/image.md index e67efab56d486..04aac2a6cdc09 100644 --- a/docs/content/reference/types/archetypes/image.md +++ b/docs/content/reference/types/archetypes/image.md @@ -12,6 +12,9 @@ The shape of the `TensorData` must be mappable to: Leading and trailing unit-dimensions are ignored, so that `1x640x480x3x1` is treated as a `640x480x3` RGB image. +Rerun also supports compressed image encoded as JPEG, N12, and YUY2. +Using these formats can save a lot of bandwidth and memory. + ## Components **Required**: [`TensorData`](../components/tensor_data.md) diff --git a/rerun_cpp/src/rerun/archetypes/image.hpp b/rerun_cpp/src/rerun/archetypes/image.hpp index 1b98de979f72e..ff38e84bfeb87 100644 --- a/rerun_cpp/src/rerun/archetypes/image.hpp +++ b/rerun_cpp/src/rerun/archetypes/image.hpp @@ -27,6 +27,10 @@ namespace rerun::archetypes { /// Leading and trailing unit-dimensions are ignored, so that /// `1x640x480x3x1` is treated as a `640x480x3` RGB image. /// + /// Rerun also supports compressed image encoded as JPEG, N12, and YUY2. + /// Using these formats can save a lot of bandwidth and memory. + /// + /// See [`rerun::datatypes::TensorBuffer`] for more. /// Since the underlying `rerun::datatypes::TensorData` uses `rerun::Collection` internally, /// data can be passed in without a copy from raw pointers or by reference from `std::vector`/`std::array`/c-arrays. /// If needed, this "borrow-behavior" can be extended by defining your own `rerun::CollectionAdapter`. diff --git a/rerun_py/rerun_sdk/rerun/archetypes/image.py b/rerun_py/rerun_sdk/rerun/archetypes/image.py index f92faa9add66c..98515218fedb9 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/image.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/image.py @@ -30,7 +30,11 @@ class Image(ImageExt, Archetype): Leading and trailing unit-dimensions are ignored, so that `1x640x480x3x1` is treated as a `640x480x3` RGB image. - For an easy way to pass in image formats or encoded images, see [`rerun.ImageEncoded`][]. + Rerun also supports compressed image encoded as JPEG, N12, and YUY2. + Using these formats can save a lot of bandwidth and memory. + + To compress an image, use [`rerun.Image.compress`][]. + To pass in an already encoded image, use [`rerun.ImageEncoded`][]. Example -------