gradio
gradio copied to clipboard
PNG files aren't displayed while uploading
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
Logs
No errors
System Info
gradio-3.1.7
Ubuntu 20.04.4 LTS
Firefox
Severity
serious, but I can work around it
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.
interesting, will take a look!
Similar issue here. On a MacBook, I cannot upload a PNG file. Dragging the PNG to the box is fine, though.