Hi all.
Hoping someone can help!
I'm looking to take a b64 image data string (eg. data:image/png;base64,.......) and convert it to an image in AwareIM.
I've tried creating the image in javascript:
var img = document.createElement("img");
img.src="data:image/png;base64,.......";
and pass this to Aware but I get this error: "Unable to set value [object HTMLImageElement] into attribute image"
Any ideas would be awesome, willing to try anything at this point.
I've stored the b64 image data string in an AwareIM attribute, but can't seem to go backwards from the IMAGE_DATA function..
EDIT: The reason I need this as an image is I want to create a word report that needs to contain this image. If it were an html report I could just <img src="data:image/png;base64,......."></img> and that works fine.
converting b64 to image
Re: converting b64 to image
how do you "pass to Aware"?and pass this to Aware but I get this error:
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: converting b64 to image
AwareApp.startProcessWithInit('procName','main','objectName','image='+img);
This is the same way I get the b64 string, which works for that!
This is the same way I get the b64 string, which works for that!
Re: converting b64 to image
Thanks to Vlad for being awesome, I have a solution:
Add a text attribute, with html format.
Populate it with <img src="[b64 string here]"></img>
Call it in the word report using
<<object.HTMLattr,html>>
See the pretty pictures in the word report
Add a text attribute, with html format.
Populate it with <img src="[b64 string here]"></img>
Call it in the word report using
<<object.HTMLattr,html>>
See the pretty pictures in the word report
Re: converting b64 to image
Steve
It works for you???
How?
My word Template:
<<Teste.Teste,html>>
My HTML text content:
It contains an image (pasted from PRTSCREEN) and a formatted text with bold and underlines
The result is that word shows me only the formatted text(it worked perfectly) but doesnt show my image at all.
And If i change the image to an URL image from the web it works ok...
The problem is when useing b64 string..
It works for you???
How?
My word Template:
<<Teste.Teste,html>>
My HTML text content:
It contains an image (pasted from PRTSCREEN) and a formatted text with bold and underlines
The result is that word shows me only the formatted text(it worked perfectly) but doesnt show my image at all.
And If i change the image to an URL image from the web it works ok...
The problem is when useing b64 string..