Find Jobs
Hire Freelancers

Translating Protocols

$30-75 USD

Κλειστή
Αναρτήθηκε πάνω από 12 χρόνια πριν

$30-75 USD

Πληρωμή κατά την παράδοση
You should be able to draw Windows bmp files on the printer. The format for .bmp files is described below. You will write a Lua program to read the .BMP file and the program will write a postscript file which will draw the [login to view URL] .BMP file formatActually there are several different .BMP file formats, but the one I describe is the Monochrome bitmap format. It can only store pictures in two colors, usually black and white, since my laser printer can only print in black and I usually print on white paper..BMP files tend to be fairly large. They aren't a particularly efficient way to store pictures, although they are going to compare very favorably with the Postscript files you generate for this [login to view URL] order to save storage space, the authors of the .BMP format gave up easy human readability. Here is a description of the first few bytes of the file, disguised as a C struct declaration. #pragma pack(1)struct BMP_header {  char id[2]; /* this always contains the two characters 'B' and 'M'*/  int fileSize;/* total size of file */  int filler;  /* "reserved" -- usually zero */  int startOfData; /* byte number (starting from zero) of file where actual*/ /* bitmap starts */  int headerSize; /* believed to be always 40 */  int width; /* number of pixels in each row */  int height; /* number of rows of pixels */  short planes; /* number of "planes" -- believed to be always 1 */  short bitsPerPixel; /* number of bits per pixel.  1 for monochrome format. */ /* other possible values include 4, 8, 16, 24, and 32. */ /* But I don't describe variations in the rest of the file */ /* which may occur for other values of bitsPerlPixel than 1 */  int compression; /* I believe this value is always 1 for monochrome format*/  int bitMapSize; /* length of bitmap data in bytes  /* I think = (width * height * bitsPerPixel)/8 */  int hresolution; /* seems to be zero */  int vresolution; /* seems to be zero */  int colors; /* seems to be zero */  int importantColors; /* seems to be zero */  unsigned char palette[2][4]; /* There are two colors in the palette array (for mono- */ /* chrome .BMP files)  */                /*black is represented in the palette by the bytes 0,0,0,0 */ /*white by the bytes 255,255,255,0 */};The bitmap data follows, 8 bits per byte, row at a time, until all rows have appeared. If a bit is a zero, the color described by palette[0] is displayed; if a bit is a one, the color described by palette[1] is displayed. In the files I looked at, white was a one bit, and black was a zero bit.[I got this information from the Web, although I retyped it as a header file myself. A google search will reveal dozens of pages talking about .BMP files, and several conversion programs. Nobody will convert them the way I expect you to do it.]You'll want to turn this header declaration into Lua code, by reading the first two bytes as a string, the next four as an integer, etc. (See the sample code below.)TO read a binary file in Lua, you should specify "rb" in the mode argument of the [login to view URL](). Otherwise, Lua will try to treat spaces and newline characters specially, which will completely mess up your input if the binary pattern for those characters happens to appear by [login to view URL] than that, you can read a binary file byte by byte, just like an ASCII file. However, to make any sense of the file, you'll want to read it into a string, and use [login to view URL] to look at it. IMPORTANT: Lua programming and ghost script programming skills are REQUIRED of the freelancer. Please view the project clarification board for the attachments.
Ταυτότητα εργασίας: 1257951

Σχετικά με την εργασία

Απομακρυσμένη Εργασία
Ενεργός/ή 13 χρόνια πριν

Ψάχνεις τρόπο για να κερδίσεις μερικά χρήματα;

Πλεονεκτήματα πλειοδοσίας στο Freelancer

Καθόρισε τον προϋπολογισμό σου και το χρονοδιάγραμμα
Πληρώσου για τη δουλειά σου
Περίγραψε την πρόταση σου
Η εγγραφή και η πλειοδοσία σε εργασίες είναι δωρεάν

Σχετικά με τον πελάτη

Σημαία της UNITED STATES
Chennai, United States
0,0
0
Μέλος από Οκτ 27, 2010

Επαλήθευση Πελάτη

Άλλες δουλειές από αυτόν τον πελάτη

automated plate growth
$30-250 USD
Angular JS with NG Framework
$25-50 USD / hour
Ευχαριστούμε! Σου έχουμε στείλει ένα email με ένα σύνδεσμο για να διεκδικήσεις τη δωρεάν πίστωση σου.
Κάτι πήγε στραβά κατά την προσπάθεια αποστολής του email σου. Παρακαλούμε δοκίμασε ξανά.
Εγγεγραμμένοι Χρήστες Συνολικές Αναρτημένες Δουλειές
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Φόρτωση προεπισκόπησης
Δόθηκε πρόσβαση για Geolocation.
Η σύνδεση σου έχει λήξει και τώρα έχεις αποσυνδεθεί. Παρακαλούμε συνδέσου ξανά.