Hey there,
I have a program which opens bitmap files and prints the content to screen, the code is below...
The next stage is to have the output as the bit stream as I am opening monochrone bitmaps which I believe from the documentation I have read is a 0 and 1, x by y grid with a 54 byte header, I have tried using sprinf("%b", $string); and various other method but to no avail.Code:#!c:/Perl/bin/Perl.exe print "Content-type: text/html\n\n"; print "Read a bitmap\n\n"; open (file, "try.bmp") || die("This file could not be opened"); binmode(file,":raw"); while(<file>){ $string .= $_; } close(file); print $string; print "\nBitmap read";
Any help on this matter would be great, thank you.




Reply With Quote