PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → How to convert a byte array to a image to show on the window?
How to convert a byte array to a image to show on the window?
Iniciado por guest, 16,oct. 2015 19:42 - 3 respuestas
Publicado el 16,octubre 2015 - 19:42
My code:
It looks like Windev doesn't have any function to convert a byte array to an image.
So I convert it to buffer. Then I convert this buffer to an image. But nothing shows.
Any suggestion?

sfBuffer is fixed string on 2001
bufBuffer is Buffer
Transfer(&sfBuffer,&arrTemplate,2001)
bufBuffer = sfBuffer

IMG_Template = dTransferToImage(&bufBuffer, imgBVR32, nImageWidth, nImageHeight)

Thank you.
Publicado el 17,octubre 2015 - 00:37
Hello Bruce

The convention on this forum is to put the version number and PCSoft product code in the subject of your post as [WD19] or [WB19] or [WM19]

Most posts also start with "Hello" followed by a request for assistance rather than what looks like a demand for help.

Regards
Al
Publicado el 17,octubre 2015 - 08:33
Hi, seems to me that imgBVR32 - though shown in the example - is not a valid buffer type !?
Publicado el 17,octubre 2015 - 16:20
Thank you, fixed it.