Max Reimann
commited on
Commit
·
591e364
1
Parent(s):
7cf9886
fix rgba upload bug
Browse files
Whitebox_style_transfer.py
CHANGED
|
@@ -118,6 +118,7 @@ def img_choice_panel(imgtype, urls, default_choice, expanded):
|
|
| 118 |
|
| 119 |
if upload_pressed and uploaded_im is not None:
|
| 120 |
img = Image.open(uploaded_im)
|
|
|
|
| 121 |
buffered = BytesIO()
|
| 122 |
img.save(buffered, format="JPEG")
|
| 123 |
encoded = base64.b64encode(buffered.getvalue()).decode()
|
|
|
|
| 118 |
|
| 119 |
if upload_pressed and uploaded_im is not None:
|
| 120 |
img = Image.open(uploaded_im)
|
| 121 |
+
img = img.convert('RGB')
|
| 122 |
buffered = BytesIO()
|
| 123 |
img.save(buffered, format="JPEG")
|
| 124 |
encoded = base64.b64encode(buffered.getvalue()).decode()
|