-/*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 ( !CheckDoesntExist(filename) )
+ return;
+
+ wxMemoryOutputStream mems;
+ if ( image.IsOk() && image.SaveFile(mems, type) )
+ {
+ m_Hash[filename] = new wxMemoryFSFile
+ (
+ mems,
+ wxImage::FindHandler(type)->GetMimeType()
+ );
+ }
+ else
+ {
+ wxLogError(_("Failed to store image '%s' to memory VFS!"), filename);
+ }
+}
+
+/*static*/ void
+wxMemoryFSHandler::AddFile(const wxString& filename,
+ const wxBitmap& bitmap,
+ wxBitmapType type)