jkramer
05-04-2005, 07:02 AM
Hi,
I'm trying to write a Lisp routine that reads a B/W bmp-file, and draws a construction point on a Workplane for every black pixel that's in the bmp. This way, I can "import" a bmp to OSD. I'm tired of doing all kind of tricks to get logos etc. into OSD....
Anyway, I'm using the Lisp function read-byte to read each byte of the file. This works fine UNTIL it encounters an FF byte (11111111 in binary). Ehhh.... maybe it's 2 or 3 successive FF bytes, by the way....
From that point on, each byte that is read will be FF, even if it isn't FF at all :(
Can it be that it thinks that FF is eof or something???
I attached the test-Lisp-file (beware to test it only on small files.... or be very patient....)
Anyone have a clue what's wrong???
Thanks!!!
Regards,
Jaap
I'm trying to write a Lisp routine that reads a B/W bmp-file, and draws a construction point on a Workplane for every black pixel that's in the bmp. This way, I can "import" a bmp to OSD. I'm tired of doing all kind of tricks to get logos etc. into OSD....
Anyway, I'm using the Lisp function read-byte to read each byte of the file. This works fine UNTIL it encounters an FF byte (11111111 in binary). Ehhh.... maybe it's 2 or 3 successive FF bytes, by the way....
From that point on, each byte that is read will be FF, even if it isn't FF at all :(
Can it be that it thinks that FF is eof or something???
I attached the test-Lisp-file (beware to test it only on small files.... or be very patient....)
Anyone have a clue what's wrong???
Thanks!!!
Regards,
Jaap