wxHtmlWindow doesn't show an animated .gif file saved by using wxMemoryFSHandler::AddFile functions (Issue #25996)

14 views
Skip to first unread message

Rossano Paris

unread,
Nov 28, 2025, 7:01:42 AM (5 days ago) Nov 28
to wx-...@googlegroups.com, Subscribed
rossanoparis created an issue (wxWidgets/wxWidgets#25996)

Description

Honestly I'm not sure whether the following description could be considered like a bug or it is a normal behaviour instead.
Anyway I try to report it ...

With the wxHtmlWindow widget, I'd like to show an animated .gif image saved in memory by using the function: wxMemoryFSHandler::AddFile(const wxString& filename, const void* binarydata, size_t size)
html tag used: <img src="memory:myanimation" border="0"/>
What I get, instead of the expected animation, is a static image.

The .gif file is loaded by using the following code:

wxFile file("C:\temp\myanimation.gif", wxFile::read);
std::vector<unsigned char> buffer(file.Length());
file.Read(buffer.data(), file.Length());

I've even tryied saving the image with the code below, but nothing changed, still a static image.

wxImage image;
wxMemoryInputStream mis(buffer.GetData(), buffer.GetDataLen());
image.LoadFile(mis, wxBITMAP_TYPE_GIF);
wxMemoryFSHandler::AddFile("myanimation", image, wxBITMAP_TYPE_GIF);

If I use the normal html tag: <img src="C:\temp\myanimation.gif" border="0"/>
the animation is shown correctly.

Platform and version information

  • wxWidgets version you use: 3.2.2 (master)
  • wxWidgets port you use: MSW
  • OS and its version: Windows 11
    • GTK version:
    • Which GDK backend is used: X11
    • Desktop environment : Gnome
    • Current theme:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/25996@github.com>

Rossano Paris

unread,
Nov 28, 2025, 7:36:38 AM (5 days ago) Nov 28
to wx-...@googlegroups.com, Subscribed

Closed #25996 as completed.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/25996/issue_event/21241855128@github.com>

Rossano Paris

unread,
Nov 28, 2025, 7:36:38 AM (5 days ago) Nov 28
to wx-...@googlegroups.com, Subscribed
rossanoparis left a comment (wxWidgets/wxWidgets#25996)

I'mk going to close this issue because it was my fault ...

The function wxMemoryFSHandler::AddFile(const wxString& filename, const void* binarydata, size_t size) works well.
I forgot to add .gif at end of file name.

Correct way to proceed.
Way to save the file in memory: wxMemoryFSHandler::AddFile("myanimaton.gif", buffer.data(), buffer.GetDataLen())
HTML tag: <img src="memory:myanimation.gif" border="0"/>


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/25996/3589179987@github.com>

Reply all
Reply to author
Forward
0 new messages