-/*static*/ void wxMemoryFSHandler::AddFile(const wxString& filename, const wxBitmap& bitmap, long type)
+#if wxUSE_IMAGE
+/*static*/ void
+wxMemoryFSHandler::AddFile(const wxString& filename,
+ const wxImage& image,
+ wxBitmapType type)
+{
+ if (!CheckHash(filename)) return;
+
+ wxMemoryOutputStream mems;
+ if (image.Ok() && image.SaveFile(mems, type))
+ {
+ m_Hash->Put
+ (
+ filename,
+ new MemFSHashObj
+ (
+ mems,
+ wxImage::FindHandler(type)->GetMimeType()
+ )
+ );
+ }
+ else
+ {
+ wxString s;
+ s.Printf(_("Failed to store image '%s' to memory VFS!"), filename.c_str());
+ wxPrintf(wxT("'%s'\n"), s.c_str());
+ wxLogError(s);
+ }
+}
+
+/*static*/ void
+wxMemoryFSHandler::AddFile(const wxString& filename,
+ const wxBitmap& bitmap,
+ wxBitmapType type)