forked from rerun-io/rerun
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[2/4] Add new
archetypes.ImageEncoded
with PNG and JPEG support (re…
…run-io#6874) ### What * Part of rerun-io#6844 * Part of rerun-io#3803 Has `do-no-merge` because of current merge-target. ### PR train * Prev: rerun-io#6882 * Next: rerun-io#6883 * Next: rerun-io#6884 ### Coming in follow-up PRs: * Fix image picking, hovering, and visualization in spatial view * Switch to using `ImageEncoded` in all examples * Remove old code for storing JPEGs in tensors ### Fixes * Fixes rerun-io#6520 ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/6874?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/6874?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [x] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! * [x] If have noted any breaking changes to the log API in `CHANGELOG.md` and the migration guide - [PR Build Summary](https://build.rerun.io/pr/6874) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html) To run all checks from `main`, comment on the PR with `@rerun-bot full-check`. --------- Co-authored-by: Andreas Reich <[email protected]>
- Loading branch information
Showing
62 changed files
with
1,728 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
crates/store/re_types/definitions/rerun/archetypes/image_encoded.fbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
include "fbs/attributes.fbs"; | ||
|
||
include "rerun/datatypes.fbs"; | ||
include "rerun/components.fbs"; | ||
|
||
namespace rerun.archetypes; | ||
|
||
|
||
/// An image encoded as e.g. a JPEG or PNG. | ||
/// | ||
/// Rerun also supports uncompressed images with the [archetypes.Image]. | ||
/// | ||
/// \py To compress an image, use [`rerun.Image.compress`][]. | ||
/// | ||
/// \example archetypes/image_encoded | ||
table ImageEncoded ( | ||
"attr.cpp.no_field_ctors", | ||
"attr.docs.category": "Image & tensor", | ||
"attr.docs.unreleased", | ||
"attr.docs.view_types": "Spatial2DView, Spatial3DView: if logged under a projection", | ||
"attr.rust.derive": "PartialEq" | ||
) { | ||
// --- Required --- | ||
|
||
/// The encoded content of some image file, e.g. a PNG or JPEG. | ||
blob: rerun.components.Blob ("attr.rerun.component_required", order: 1000); | ||
|
||
// --- Recommended --- | ||
|
||
/// 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. | ||
media_type: rerun.components.MediaType ("attr.rerun.component_recommended", nullable, order: 2000); | ||
|
||
// --- Optional --- | ||
|
||
/// Opacity of the image, useful for layering several images. | ||
/// | ||
/// Defaults to 1.0 (fully opaque). | ||
opacity: rerun.components.Opacity ("attr.rerun.component_optional", nullable, order: 3000); | ||
|
||
/// An optional floating point value that specifies the 2D drawing order. | ||
/// | ||
/// Objects with higher values are drawn on top of those with lower values. | ||
draw_order: rerun.components.DrawOrder ("attr.rerun.component_optional", nullable, order: 3100); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.