gradio icon indicating copy to clipboard operation
gradio copied to clipboard

PNG files aren't displayed while uploading

Open nick-konovalchuk opened this issue 2 years ago • 2 comments

Describe the bug

PNG images aren't in All Supported Types, so, they aren't displayed by default. Have to look for them among non-image files with All Files option. No issues with processing, just uploading

Is there an existing issue for this?

  • [X] I have searched the existing issues

Reproduction

import gradio as gr import numpy as np

def sepia(input_img): sepia_filter = np.array([ [0.393, 0.769, 0.189], [0.349, 0.686, 0.168], [0.272, 0.534, 0.131] ]) sepia_img = input_img.dot(sepia_filter.T) sepia_img /= sepia_img.max() return sepia_img

demo = gr.Interface(sepia, "image", "image") demo.launch()

Screenshot

Sorry for a photo, but for some reason ubuntu does not let me take a screenshot while this drop-down list is active

photo_2022-08-29_12-59-02

Logs

No errors

System Info

gradio-3.1.7
Ubuntu 20.04.4 LTS
Firefox

Severity

serious, but I can work around it

nick-konovalchuk avatar Aug 29 '22 10:08 nick-konovalchuk

I have the same issue on Firefox on Ubuntu but Chrome works. The issue seems to be that "image/x-png" MIME type is not recognized. Changing it to "image/png" fixes the problem.

Ttl avatar Sep 15 '22 18:09 Ttl

interesting, will take a look!

aliabid94 avatar Sep 16 '22 21:09 aliabid94

Similar issue here. On a MacBook, I cannot upload a PNG file. Dragging the PNG to the box is fine, though. image

thomas0809 avatar Nov 11 '22 16:11 thomas0809