Struggling to get a data image from the browser widget into an LC image object.
So here is the img src i get back from the browser (much shortened for display here)
data:image/jpeg;base64,/9j…+vp+H3................
The data image appears properly in the browser widget.
The variable I return from the browser in the pImageSrc parameter sure looks like binary image data when I put it into a text field.
I tried the following in testing and none appear to work:
Code: Select all
//tried
put base64Decode(pImageSrc) into URL ("binfile:" & specialfolderpath("desktop") & "/test.png")
//tried
put base64Decode(pImageSrc) into image "test"
//tried
set the text of img "test" to base64Decode(pImageSrc)
//tried
set the filename of img "test" to pImageSrc
//tried
set the width of img "test" to pOrigonalImageWidth
set the height of img "test" to pOrigonalImageHeight
set the imagedata of img "test" to base64Decode(pImageSrc)