I'm trying to load an image using the real path and filename of the file.
I'm using wxFileDialog to get the filename and path, I'm using
iLoader::LoadImage to load the image. The error I'm getting is
the file does not exist on VFS. I looked at viewmesh's source code
to get the basic outline of code.
Here's is the code I'm using:
wxFileDialog dialog(this, caption, default_dir, default_filename, wildcard, wxOPEN | wxFILE_MUST_EXIST);
if(dialog.ShowModal() == wxID_OK)
csRef<iImage> hm_img = loader->LoadImage(dialog.GetFilename().c_str(), CS_IMGFMT_TRUECOLOR);
if(hm_img == 0)
// error handling
// do stuff with image
hm_img = 0;
CS version: svn as of aug 25, 2006
Thanks for any help,