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

Can not show cropped image correctly #5152

Closed
1 task done
li-chengkun opened this issue Aug 9, 2023 · 4 comments · Fixed by #6169
Closed
1 task done

Can not show cropped image correctly #5152

li-chengkun opened this issue Aug 9, 2023 · 4 comments · Fixed by #6169
Assignees
Labels
bug Something isn't working 🖼️ image Image component
Milestone

Comments

@li-chengkun
Copy link

Describe the bug

When I crop image in input "Image" component, it seems can not show the cropped image correctly.
Just like the below image shows. The output is just shows the what we submmitted, but we can see the output get right result, but the input Image component can not show the cropped image.
image

And when I click the input "Image" component, now it shows cropped image correctly! But after clicking the submit button, the output is the original image!
image
So is there anyone can help me resolve this problem?

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import gradio as gr
def f(image):
    print(image)
    return image

interface = gr.Interface(
    fn=f,
    inputs=gr.Image(type="filepath", source='upload', tool="select"),
    outputs = gr.Image(type="filepath", label=None),
    title="Image Search",
)
interface.launch()

interface.close()

Screenshot

No response

Logs

No response

System Info

Gradio==3.39.0
OS: Ubuntu 20.04

Severity

Blocking usage of gradio

@li-chengkun li-chengkun added the bug Something isn't working label Aug 9, 2023
@abidlabs abidlabs added the 🖼️ image Image component label Aug 9, 2023
@abidlabs abidlabs added this to the Component Cleanup milestone Aug 9, 2023
@abidlabs
Copy link
Member

abidlabs commented Aug 9, 2023

Sorry @li-chengkun yes it's broken right now. We'll fix the cropper as part of #5055

@abidlabs abidlabs modified the milestones: Component Cleanup, 4.0 Aug 9, 2023
@li-chengkun
Copy link
Author

Thank you for the reply. And i find it performs well in lower version, like 3.15.0. But the lower versions don't have components I want. So I would greatly appreciate it if you could fix this problem

@henryruhs

This comment was marked as abuse.

@abidlabs
Copy link
Member

abidlabs commented Oct 6, 2023

@henryruhs what's the duplicate issue?

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.

4 participants