A bit stuck on creating a new image

Doug Lerner doug at webcrossing.com
Sun Jan 25 06:19:12 EST 2004


I am sending the imageData, height, width and name of an imported paint
image over a socket.

Before sending the data I am using base64encode, and before recreating the
image on the other side I am using the base64decode of the data to set the
imageData property and also setting the height and width and name properties
of the templateImage before creating the image.

But the image comes out all scrambled in the top-left corner of the
receiving stack in the wrong size.

I tried both preserving the lfs in the base64 data and also stripping the
linefeeds, but the result is the same in both cases.

I've triple-checked the char count of the number of chars of the imageData
and the number of chars of the base64 data on both sides, before and after
encoding and decoding and everything matches.

Are there some other properties I need to be preserving besides the
imageData, width and height of the image object in order to get it right?

Thanks,

doug



More information about the use-livecode mailing list