PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WB19] HTML Embedded Image - Encode in base 64
[WB19] HTML Embedded Image - Encode in base 64
Iniciado por guest, 10,mar. 2015 22:45 - No hay respuesta
Publicado el 10,marzo 2015 - 22:45
Hi,

I'm trying to encode image files into html (as URI).

This can be done by encoding the image buffer in base 64.
However, the WX Crypt encodeBase64 gives me complete different results on an image file buffer string than any other standard Base64 encoding scheme out there...

Has anybody already done this?
I just don't seem to get the right encoding string to work (unicode configuration).
img is Buffer //WL.Image //img = dLoadImage("C:\WX Projects\UPM_WIN\CRSL_ProcessDuplicates_256_LBL.png",imgConvertir) img = fLoadBuffer("C:\WX Projects\UPM_WIN\CRSL_ProcessDuplicates_256_LBL.png") TmpImgBase64 is Buffer = Crypt(img,"",compresseLZW+crypteAnsi+encodeBASE64) Trace(TmpImgBase64)
Sample html:
< img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABl0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuODc7gF0AAIO4SURBVHhe7b1neBzZdS2qH+/77o8bnu9zeE7XsnKwLYfrJIf7fK9lycojjSRrNDnnGc6Qw5xzzhkEc845giQyAQIkQIBgzjmn4Qwnar+19qndfbrQEWxyCE7x+zar... etc etc etc" />
All input welcome!

TIA,

Peter H.