> I'm doing a little webserver in Gambas. Everything is ok so far, but I'm
> having a hard time dealing with binary files (like images). Is there a
> way to read a file in a raw fashion?
>
> I've tried to do an OPEN file FOR READ, and using a "byte" variable as
> buffer. But the bytes are read in this orden: 1, 0, 3, 2, 5, 4, 7, 6,
> etc... I think it's something about the endiannes.
>

Bytes should be read in logical order 0,1,2,3... but they might be written
in the file in order you describe.
You can read two bytes and swap them, or read them as type "short"..?
Send the piece of your code that does the attempted raw reading.

Usually I read binary files which are created by gambas program, so I
haven't ran into this problem.


Jussi
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to