Reputation: 31
Im looking to insert a base64 encoded image when creating a new AR.ImageResource in Wikitude SDK iOS.
I can do this directly in HTML img src attribute using javascript as follows
document.getElementById("imageFooterId").src = "data:image/png;base64," + jsonObject[id].picData;
But to render images in the aug view of Wikitude it is required to use the AR.ImageResource and it is a little more difficult to insert a base64 encode image.
I am using the following function call with no luck
tmpImage = new AR.ImageResource("data:image/png;base64," + jsonObject[i].picData, {onError: errorLoadingImage});
Are they any suggestions out there for performing this action?
Upvotes: 0
Views: 334
Reputation: 585
this is currently not supported. I could imagine using a webservice that generates an URL from a base64 image which you can use for the AR.ImageResource. But you would still have to send/load it over the interwebs which is not optimal.
also look at: http://forum.wikitude.com/home/-/message_boards/message/28074
Disclaimer: I work for the company.
Upvotes: 0