Cannot read image file using BitmapImage with absolute path ? (C++ SDK 2.0.2f2)
I tried to read a PNG file using the following code (the file V1.png exists under D:\ directory, and not broken):
But it resulted in an error given by Noesis error callback
Code: Select all
Ptr<BitmapSource> _source = *new BitmapImage("D:\\V1.png");
Could you tell me what's wrong with the code ? Is my URI format was wrong ?Unable to load image 'D:\V1.png', filename Gui\Core\Src\BitmapImage.cpp, line 150)
-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: Cannot read image file using BitmapImage with absolute path ? (C++ SDK 2.0.2f2)
Are you using local providers with a non-empty root path? Something like:
Code: Select all
Noesis::GUI::SetResourceProvider("Data/UI");Re: Cannot read image file using BitmapImage with absolute path ? (C++ SDK 2.0.2f2)
Yes, I am setting local providers with a non-empty root path.Are you using local providers with a non-empty root path? Something like:Code: Select allNoesis::GUI::SetResourceProvider("Data/UI");
Re: Cannot read image file using BitmapImage with absolute path ? (C++ SDK 2.0.2f2)
It is a bug in our default providers, they always prepend the localroot path to the received URI. Could you please create a ticket about it? The workaround right now is implementing your own provider.
Re: Cannot read image file using BitmapImage with absolute path ? (C++ SDK 2.0.2f2)
Thanks. I filed the issue here: https://bugs.noesisengine.com/view.php?id=1114
Who is online
Users browsing this forum: No registered users and 5 guests