Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add button for copying and saving images #7156

Merged
merged 21 commits into from
Aug 13, 2024
Merged

Conversation

emilk
Copy link
Member

@emilk emilk commented Aug 12, 2024

What

Screenshot 2024-08-12 at 19 42 55

Saving an image now also works on web, which it didn't do in 0.17

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!
  • If have noted any breaking changes to the log API in CHANGELOG.md and the migration guide

To run all checks from main, comment on the PR with @rerun-bot full-check.

@emilk emilk added ui concerns graphical user interface 📺 re_viewer affects re_viewer itself exclude from changelog PRs with this won't show up in CHANGELOG.md labels Aug 12, 2024
@emilk emilk marked this pull request as ready for review August 12, 2024 19:14
@Wumpf Wumpf self-requested a review August 13, 2024 08:53
@Wumpf
Copy link
Member

Wumpf commented Aug 13, 2024

Why exclude from changelog? Wasn't aware we had this previously already 😳

@Wumpf
Copy link
Member

Wumpf commented Aug 13, 2024

Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that code dupl makes me very sad, but giving it a pass-as-is anyways (although I'd really really appreciate fixing that)

Don't think it's time to close the linked ticket already or at least need a new one for EncodedImage which can't be saved and has a preview inconsistent from that (see also notes on Slack)

for x in 0..w {
// NOTE: the name `y` is already taken for the coordinate, so we use `luma` here.
let [luma, u, v] = match pixel_format {
PixelFormat::NV12 => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplication of the decoding makes me very uneasy. I'd rather we divide above's ImageInfo::from_xyz to get colors as well and then use that again. Otherwise, we'll keep on adding duplicated decoding logic.

Or easier just split this out into a standalone color_at_postion_for_pixel_format function that takes a blob, format and coordinate which you then can call here and above

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I unified it now, but at the cost of making it harder to add a new PixelFormat that is not chroma-downsampled. I'll leave it for the next person to improve.

@emilk emilk added include in changelog and removed exclude from changelog PRs with this won't show up in CHANGELOG.md labels Aug 13, 2024
@emilk
Copy link
Member Author

emilk commented Aug 13, 2024

Why exclude from changelog? Wasn't aware we had this previously already 😳

We had it, but only if you selected the TensorBufferComponent, so the feature moved

@emilk emilk merged commit c25de89 into main Aug 13, 2024
35 of 36 checks passed
@emilk emilk deleted the emilk/copy-and-save-images branch August 13, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog 📺 re_viewer affects re_viewer itself ui concerns graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Visualize images in selection view
2 participants