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 tool editor/select bug in displaying image #4677

Closed
1 task done
vincentmin opened this issue Jun 26, 2023 · 2 comments · Fixed by #6169
Closed
1 task done

Image tool editor/select bug in displaying image #4677

vincentmin opened this issue Jun 26, 2023 · 2 comments · Fixed by #6169
Assignees
Labels
bug Something isn't working 🖼️ image Image component
Milestone

Comments

@vincentmin
Copy link

Describe the bug

When using either tool="editor" or tool="select", one can select part of the image. When doing so, the input image updates to reflect the newly selected region. However, the update of the input image is broken in version 3.35.2 and the selected region is not shown; instead the full image is displayed. If one submits the image, the correct selection is passed to the function, rather than the shown input image. So only the UI part seems to be broken. Strangely, if one tries to select a new region, the previous selection is shown (instead of the latest selection).

I checked that the issue is not present in Gradio version 3.20.0.

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import gradio as gr

if name == "main":
demo = gr.Interface(
lambda x: x,
inputs=gr.Image(tool="editor"),
outputs="image",
)

demo.launch(
    server_name="0.0.0.0",
    server_port=7890,
)

Screenshot

No response

Logs

No response

System Info

gradio version=3.35.2
os version = "Ubuntu 20.04.6 LTS"
browser version = chrome 114.0.5735.133

Severity

I can work around it

@vincentmin vincentmin added the bug Something isn't working label Jun 26, 2023
@vincentmin
Copy link
Author

Possibly related to: #3810

@vincentmin
Copy link
Author

This is somewhat unrelated to this issue, but could someone explain exactly the difference between "editor" and "select"? It seems to me that they both offer the same functionality, but "editor" forces you to first press the pencil icon. Does "editor" offer additional functionality that I am missing?
And furthermore, what is the recommended way to let someone crop an image and sketch on it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🖼️ image Image component
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants