Binary Data???
Mark Smith
mark at maseurope.net
Tue Feb 13 11:30:43 EST 2007
Dave, could you explain in what you're doing - to my non-C eyes it
looks like your'e simply building a 512 * 512 list of bytes of
alternating value 0 and 128.
If it's any help, you can do this with <put numToChar(0) & numToChar
(128) after tBuffer> the required number of times, but I'm guessing
that that is not exactly what you want...
Best,
Mark
On 13 Feb 2007, at 16:02, Dave wrote:
> Hi All,
>
> I would like to pass a large buffer of binary data to an External
> Function, but I'm not sure how to go about it in TranScript.
>
> The C code for it looks a bit like this:
>
> int myXCounter;
> int myYCounter;
> unsigned char* myImagePtr;
>
> myImagePtr = theImagePtr;
> for (myYCounter = 0;myYCounter < 512;myYCounter++)
> {
> for (myXCounter = 0;myXCounter < 512;myXCounter++)
> {
> myImagePtr[0] = 0;
> myImagePtr[1] = 128;
> myImagePtr[2] = 0;
> myImagePtr[3] = 128;
> myImagePtr += 4;
> }
> }
>
> I then would I write this so it is stored inside a TranScript
> variable?
>
> Thanks a lot and All the Best
> Dave
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list