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

Bug of gr.ImageMask save image #10255

Open
1 task done
yaosheng216 opened this issue Dec 26, 2024 · 1 comment
Open
1 task done

Bug of gr.ImageMask save image #10255

yaosheng216 opened this issue Dec 26, 2024 · 1 comment
Labels
bug Something isn't working 🖼️ ImageEditor

Comments

@yaosheng216
Copy link

Describe the bug

Hi, author.
I use gr.ImageMask met a bug. Wish you can solve this problem.
I set of ImageMask width and height, in the page save image from gr.ImageMask, but image size is compressed, not the width and height of the original upload.

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import gradio as gr

with gr.Blocks() as demo:
    with gr.Row():
        im = gr.ImageMask(
            type="numpy",
            interactive=True,
            height=150,
            width=500
        )

Screenshot

No response

Logs

No response

System Info

gradio:5.9.1

Severity

I can work around it

@yaosheng216 yaosheng216 added the bug Something isn't working label Dec 26, 2024
@CyberVy
Copy link

CyberVy commented Dec 30, 2024

height: The height of the component, specified in pixels if a number is passed, or in CSS units if a string is passed. This has no effect on the preprocessed image files or numpy arrays, but will affect the displayed images.
width: The width of the component, specified in pixels if a number is passed, or in CSS units if a string is passed. This has no effect on the preprocessed image files or numpy arrays, but will affect the displayed images.

So I think the height and width will not result in this issue, because even though they are not passed in ImageMask, you still can't get the image with correct size. It's a bug of ImageMask itself. #10265

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

No branches or pull requests

3 participants