Converting an image from a bit array to base64 string - Forum - OpenEdge General - Progress Community

Converting an image from a bit array to base64 string

 Forum

Converting an image from a bit array to base64 string

  • 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.

    Regards,

    Mark Davies

  • 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
     
    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.

  • "I can use base64 conversion tool in linux"

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

  • Hi Peter,

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

    Regards,

    Mark Davies