|
-
Jan 28th, 2003, 02:39 PM
#1
Thread Starter
Junior Member
Bit stream (perl question)
Hey there,
I have a program which opens bitmap files and prints the content to screen, the code is below...
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";
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.
Any help on this matter would be great, thank you.
-
Jan 29th, 2003, 07:20 PM
#2
Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|