Previous | Up | Next |
Set the binary content of a bitmap. Typically, this is used when a computer A wants to send a picture to computer B : computer A gets the binary content by _GETbitmap, sends the string to computer B which calls this function.Parameters
ObjBitmap _SETbitmap ( ObjBitmap _bitmap_ S _content_ )
Return value
_bitmap_ any bitmap _content_ new binary content
same bitmap
typeof Bmp = ObjBitmap;;
// fun [S I I] I
fun __receiveBitmapDatas (strDatas, iWidth, iHeight)=
// If the bitmap already exists, it is destroyed
if Bmp != nil then
(
_DSbitmap Bmp;
Bmp = nil
)
else
nil;
// Create a new bitmap
set Bmp = _CRbitmap _channel iWidth iHeight;
if Bmp == nil then // Creation failed
(
_fooS ">> receiveBitmapDatas : Unable to create the bitmap !";
1
)
else // The content is set
(
set Bmp = _SETbitmap Bmp strDatas;
0
);;