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

Image Save/Copy Issue - Grabs Previous Image Instead of Current One #18

Open
rkuemon opened this issue Apr 16, 2023 · 3 comments
Open

Comments

@rkuemon
Copy link

rkuemon commented Apr 16, 2023

When trying to copy or save an image on the demo webpage, it always takes the previous image instead of the currently displayed one. Additionally, if you attempt to copy or save the first generated image, it results in a transparent 512x512 image instead.

Steps to reproduce:

  1. Generate an image.
  2. Attempt to copy or save the first generated image.
  3. Generate another image.
  4. Attempt to copy or save the second image.

Expected results:

  • The first image should be copied/saved as a proper image.
  • The second image should be copied/saved.

Actual results:

  • The first image results in a transparent 512x512 image when copied/saved.
  • The first image is copied/saved instead of the second image.

Environment:

  • Operating System: Windows 11
  • Browser: Chrome Canary Version 114.0.5715.0 (Official Build) canary (64-bit), launched with --enable-dawn-features=disable_robustness
  • GPU: Radeon RX 7900 XTX

Please investigate this issue, as it prevents users from properly saving or copying the most recent image.

@DustinBrett
Copy link

This is indeed an odd issue. The same thing happens if you try and get the image programmatically from the canvas. I am wondering if it's a WebGPU issue or if the code as is needs some kind of finalization step.

@DustinBrett
Copy link

Interestingly, after moving to using a Web Worker with an OffscreenCanvas this issue went away.

@tom-leamon
Copy link

I am experiencing this issue as well. Thank you @DustinBrett for the suggestion, modifying the code to use an offscreen canvas worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants