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.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
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.![]()
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.![]()