Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hello im trying to get a cammera picture from vuforia studio in android but it not seems to work, one of the problems that i have is to transform the base64 data and show it into a widget and visceversa
Thanks
Hi @afherrerac ,
What format is the uploaded image? Here is the Link to the supported file formats for the Image widget.
It is base64 the case is have downloaded an image via rest api the idea is to show it
Hi @andreherrerac95 ,
Could you please share the project with me for testing. I highly appreciate it if you could share the project zip file.
Thank you!
Hi @andreherrerac95 ,
the received data is base64 so you do not need to encode it. For pictures some thing like this:
$http(req).then(
function(response)
{ //here you need to pay attention about the correct type jpg, gif, png
var ret_str='data:image/gif;base64,'+response.data.rows[0].Content;
console.warn(ret_str);
$scope.view.wdg[image_id]['imgsrc']=ret_str; //2d image
// $scope.view.wdg[image_id]['src']=ret_str; //3d image
},
function(response){;}
);
};
So this is all. you need to set the src /imgsrc for 3d/2d images property of the image widget