Converting an image from a bit array to base64 string

Posted by Mark Davies on 08-Dec-2014 09:39

Hi,


OE11.3 - Linux

Is there a better way to convert a bit array received from a web service to a memptr that I can then convert into a base64encoded string?

I know how to do it if I am on a Windows server and I can use base64 conversion tool in linux, but I am hoping for a more elegant way that will cater for both linux and windows.


Any ideas?

Thanks in advance.

All Replies

Posted by Peter Judge on 08-Dec-2014 11:23

How are you receiving the bit array? If you're getting SOAP or REST you should already be getting the data encoded in some text-friendly format?
 
-- peter
 
[collapse]
From: Mark Davies [mailto:bounce-markdprosoftitcoza@community.progress.com]
Sent: Monday, 08 December, 2014 10:40
To: TU.OE.General@community.progress.com
Subject: [Technical Users - OE General] Converting an image from a bit array to base64 string
 
Thread created by Mark Davies

Hi,


OE11.3 - Linux

Is there a better way to convert a bit array received from a web service to a memptr that I can then convert into a base64encoded string?

I know how to do it if I am on a Windows server and I can use base64 conversion tool in linux, but I am hoping for a more elegant way that will cater for both linux and windows.


Any ideas?

Thanks in advance.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by Frank Meulblok on 10-Dec-2014 06:08

"I can use base64 conversion tool in linux"

Why rely on external tools, when the ABL has BASE64-ENCODE/BASE64-DECODE functions built-in ?

Posted by Mark Davies on 19-Dec-2014 04:00

Hi Peter,

You are indeed correct. I asked the question before I checked the result of the WS call - is already Base64Encoded (obviously - duh!).

This thread is closed