You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I have a certain image (shape is 704*832).
After converting it into base64 string, I use ft.Image(src_base64) to render that image on UI, but it turns out to be blank.
The weirdest thing is, if I modify some pixels on that image, everthing will go well.
The script producing this bug is simple and short enough, but the bug can be reproduced on multiple machines.
Code example to reproduce the issue:
importfletasftimportcv2ascvimportbase64img=cv.imread('rotate.png')
#cv.line(img, (0, 0), (511, 511), (255, 0, 0), 5) # modify a few pixels and it can be displayed_, buffer=cv.imencode('.png', img)
string=base64.b64encode(buffer).decode('utf-8')
defmain(page: ft.Page):
page.add(
ft.Image(
src_base64=string,
)
)
ft.app(target=main)
Describe the results you received:
blank image on UI.
Additional information you deem important (e.g. issue happens only occasionally):
I have reproduced this bug on three different machines. If I modify or resize the source, everything is ok.
This magical image is available in attachment.
Flet version (pip show flet):
Name: flet
Version: 0.10.3
Summary: Flet for Python - easily build interactive multi-platform apps in Python
Operating system:
Windows 10
Additional environment details:
The text was updated successfully, but these errors were encountered:
I add page.on_error to see the error, here is the result:
Page error: XmlParserException: name expected at 30:27
Page error: XmlParserException: name expected at 30:27
Page error: XmlParserException: name expected at 30:27
Page error: XmlParserException: name expected at 30:27
Page error: XmlParserException: name expected at 30:27
Page error: XmlParserException: name expected at 30:27
Description
I have a certain image (shape is 704*832).
After converting it into base64 string, I use ft.Image(src_base64) to render that image on UI, but it turns out to be blank.
The weirdest thing is, if I modify some pixels on that image, everthing will go well.
The script producing this bug is simple and short enough, but the bug can be reproduced on multiple machines.
Code example to reproduce the issue:
Describe the results you received:
blank image on UI.
Additional information you deem important (e.g. issue happens only occasionally):
I have reproduced this bug on three different machines. If I modify or resize the source, everything is ok.
This magical image is available in attachment.
Flet version (
pip show flet
):Operating system:
Windows 10
Additional environment details:
The text was updated successfully, but these errors were encountered: