nikobarli
Topic Author
Posts: 178
Joined: 26 Apr 2017, 06:23

Cannot read image file using BitmapImage with absolute path ? (C++ SDK 2.0.2f2)

20 Jun 2017, 10:21

I tried to read a PNG file using the following code (the file V1.png exists under D:\ directory, and not broken):
   Ptr<BitmapSource> _source = *new BitmapImage("D:\\V1.png");
But it resulted in an error given by Noesis error callback
Unable to load image 'D:\V1.png', filename Gui\Core\Src\BitmapImage.cpp, line 150)
Could you tell me what's wrong with the code ? Is my URI format was wrong ?
 
User avatar
sfernandez
Site Admin
Posts: 1912
Joined: 22 Dec 2011, 19:20

Re: Cannot read image file using BitmapImage with absolute path ? (C++ SDK 2.0.2f2)

20 Jun 2017, 16:34

Are you using local providers with a non-empty root path? Something like:
Noesis::GUI::SetResourceProvider("Data/UI");
 
nikobarli
Topic Author
Posts: 178
Joined: 26 Apr 2017, 06:23

Re: Cannot read image file using BitmapImage with absolute path ? (C++ SDK 2.0.2f2)

21 Jun 2017, 07:51

Are you using local providers with a non-empty root path? Something like:
Noesis::GUI::SetResourceProvider("Data/UI");
Yes, I am setting local providers with a non-empty root path.
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: Cannot read image file using BitmapImage with absolute path ? (C++ SDK 2.0.2f2)

22 Jun 2017, 15:30

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.
 
nikobarli
Topic Author
Posts: 178
Joined: 26 Apr 2017, 06:23

Re: Cannot read image file using BitmapImage with absolute path ? (C++ SDK 2.0.2f2)

23 Jun 2017, 03:51

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 2 guests