A bit stuck on creating a new image

Doug Lerner doug at webcrossing.com
Sun Jan 25 08:01:05 EST 2004


Well, I basically want to avoid sending LF characters along the way, which
would disrupt my communications system, which depends on LFs to terminate
the sending of a batch of data.

Except for the line wrap characters that Rev adds every 72 chars, base64
data is guaranteed not to contain linefeed charactgers.

doug

On 1/25/04 9:38 PM, "jbv" <jbv.silences at Club-Internet.fr> wrote:

> 
> 
> Doug,
> 
> the 1st question that comes to my mind is : why do you feel the need to use
> base64encode before sending before sending the data over a socket ?
> 
> I remember doing something similar last year (a client standalone was sending
> imagedata to a CGI script for realtime update of web pages) and I don't
> remember encoding the imagedata before sending it...
> 
> Am I missing something ?
> 
> Thanks,
> JB
> 
> 
>> 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
>> 
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution



More information about the use-livecode mailing list