tim_beynart
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2018
08:36 AM
Re: issue with base64 encoded image
I found my old SDK1 code for this. You can use `filename` as a URI with a poster and you should see the image.
filename = "tmp:/test_file.jpg"
b64 = <b64 String for a JPEG>
ba = CreateObject("roByteArray")
ba.FromBase64String(b64)
ba.AppendFile(filename)
canvasItems.push({url:filename,TargetRect:{x:10,y:10,w:107,h:60}})
m.canvas.SetLayer(1, canvasItems)
m.canvas.Show()
ajitg_4557
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2018
10:29 PM
Re: issue with base64 encoded image
Thanks, tim_beynart to recall your code.
thanks a lot again.
thanks a lot again.
KrunalLathiya
Newbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2020
05:58 AM
Re: issue with base64 encoded image
I have find this similar solution in Python language.
Base64 encoding enables us to convert bytes containing binary or text data to ASCII characters. By encoding the data, we improve the chances of it being processed correctly by various systems. Some systems don’t understand the data in bytes format, so we have to convert the data.
To convert the Image to Base64 String in Python we have to use the Python base64 module that provides b64encode() method.
The purpose of the base64.b64encode() method in Python is to convert the binary data into ASCII-safe “text”. But Python strongly disagrees with that. Python is now very strict about this that bytes.encode() method doesn’t even exist, and so ‘xyz’.encode(‘base64’) would raise an AttributeError.
- « Previous
-
- 1
- 2
- Next »