gradio icon indicating copy to clipboard operation
gradio copied to clipboard

gr.Image() with color-sketch on macos upload image size is changed

Open rivergold opened this issue 1 year ago • 1 comments

Describe the bug

gradio==3.50.2

when using gr.Image() with color-sketch on macos, the image which uploaded, the size is changed.

This bug doesn't occur on Windows and Linux.

Have you searched existing issues? 🔎

  • [X] I have searched and found no existing issues

Reproduction

import gradio as gr

with gr.Blocks() as seg2img_interface:
    # Mask img
    widget_mask_img = gr.Image(
        type='pil',
        tool='color-sketch',
        width=1024,
        height=768,
        interactive=True,
        brush_color='#2E8B57',
        brush_radius=40,
        visible=True)

Screenshot

The raw image, which size is 1024*576

seg2img-mask

The upload image size is 2048 * 1152

Logs

No response

System Info

Gradio Environment Information:                                                                                                          ------------------------------                                                                                                           Operating System: Linux                                                                                                                  gradio version: 3.50.2                                                                                                                   gradio_client version: 0.6.1                                                                                                                                                                                                                                                      ------------------------------------------------                                                                                         gradio dependencies in your environment:                                                                                                                                                                                                                                          aiofiles: 23.2.1                                                                                                                         altair: 5.1.1                                                                                                                            fastapi: 0.103.1                                                                                                                         ffmpy: 0.3.1
gradio-client==0.6.1 is not installed.
httpx: 0.25.0
huggingface-hub: 0.20.1
importlib-resources: 6.1.0
jinja2: 3.1.2                                                                                                                            markupsafe: 2.1.1                                                                                                                        matplotlib: 3.8.0                                                                                                                        numpy: 1.25.2
orjson: 3.9.7
packaging: 23.1
pandas: 2.1.1
pillow: 9.4.0
pydantic: 2.3.0
pydub: 0.25.1
python-multipart: 0.0.6
pyyaml: 6.0.1
requests: 2.31.0
semantic-version: 2.10.0
typing-extensions: 4.7.1
uvicorn: 0.23.2
websockets: 11.0.3
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.

gradio_client dependencies in your environment:

fsspec: 2023.9.2
httpx: 0.25.0
huggingface-hub: 0.20.1
packaging: 23.1
requests: 2.31.0
typing-extensions: 4.7.1
websockets: 11.0.3

Severity

Blocking usage of gradio

rivergold avatar Dec 23 '23 10:12 rivergold