If you want to use pixel_to_bmap then you should use pixel_for_bitmap on the other side of your client/server to read the information of the pixels into 3 or 4 arrays.

something like this...
Code:

var v_alpha[512];
var v_red[512];
var v_green[512];
var v_blue[512];

function read_bmap(b_bmap)
{
var v_x = 0;
var v_y = 0;
var v_index = 0;
var v_pixel;
var v_format;

v_format = bmap_lock(b_bmap, 0);
if (v_format != 0) // valid bmap?
{
while (v_y < bmap_height(b_bmap))
{
while (v_x < bmap_width(b_bmap))
{
v_index = (v_y*bmap_width(b_bmap))+v_x;
v_pixel = pixel_for_bmap(b_bmap, v_x, v_y);
pixel_to_vec(temp, v_alpha[v_index], v_format, v_pixel);
v_red[v_index] = temp.red;
v_green[v_index] = temp.green;
v_blue[v_index] = temp.blue;
v_x += 1;
}
v_y += 1;
}
}
bmap_unlock(b_bmap);
}

function write_bmap(b_bmap)
{
var v_x = 0;
var v_y = 0;
var v_index = 0;
var v_pixel;
var v_format;

v_format = bmap_lock(b_bmap, 0);
if (v_format != 0) // valid bmap?
{
while (v_y < bmap_height(b_bmap))
{
while (v_x < bmap_width(b_bmap))
{
v_index = (v_y*bmap_width(b_bmap))+v_x;
temp.red = v_red[v_index];
temp.green = v_green[v_index];
temp.blue = v_blue[v_index];
v_pixel = pixel_for_vec(temp, v_alpha[v_index], v_format);
pixel_to_bmap(b_bmap, v_x, v_y, v_pixel);
v_x += 1;
}
v_y += 1;
}
}
bmap_unlock(b_bmap);
}



I don't tested this functions but it should work.
Now you need a function that sends the 4 arrays (v_red, v_green, v_blue and y_alpha) to server or clients.

Last edited by HPW; 03/14/07 22:57.

Evil Blood (v. 0.52) RPG
Commport.de (Social Network Community)