fyne-io / fyne

Cross platform GUI toolkit in Go inspired by Material Design
https://fyne.io/
Other
25.1k stars 1.4k forks source link

The "NewRichTextFromMarkdown" widget cannot display an image in '.gif' format. #4237

Open GoHippo opened 1 year ago

GoHippo commented 1 year ago

Checklist

Describe the bug

2023/09/11 22:25:09 Fyne error: Failed to load image 2023/09/11 22:25:09 Cause: image: unknown format 2023/09/11 22:25:09 At: C:/Users/user/go/pkg/mod/fyne.io/fyne/v2@v2

How to reproduce

run code with NewRichTextFromMarkdown and image ".gif".

Screenshots

No response

Example code

widget.NewRichTextFromMarkdown("![this gif](./test.gif)")

Fyne version

v2.4.0

Go compiler version

v1.19

Operating system and version

Windows 10

Additional Information

I don't know if it's a bug or the shape of the image ".gif" was not added by the developer.

andydotxyz commented 1 year ago

Are you looking for an animated Gif? That is not currently part of the toolkit (see the widget added in fyne-x). If you just want the first frame of the gif to appear you can import image/gif I think, and it should work...