1 / 5

The Usage of Program raw2ps.c

The Usage of Program raw2ps.c.

fountain
Download Presentation

The Usage of Program raw2ps.c

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Usage of Program raw2ps.c raw2ps is a program which converts a free-form ascii file of unsigned characters (pixel values between 0 and 255) into a PostScript program which produces a printed image when printed on a PostScript printer such as an HP LaserJet. The user has a complete control over picture placement and size. By default, gray levels near zero print darkly, and gray levels near 255 are light. The user can also specify the PostScript code not to include a print command (this is useful if multiple pictures on one page are desired).

  2. Notes ˙This program expects only unsigned characters (pixel values) in the input file. Any header information should be stripped off of the image file. If the gray values are in binary format, they should be converted. This restriction was imposed to keep things as general as possible. • Source Code — raw2ps.c which will be announced in class.

  3. Commands for using raw2ps ♣ From ascii to PostScript generator for image data Syntax raw2ps file rows cols dx dy sizex sizey | lpr [-Plw] For multiple images: • raw2ps file1 rows1 cols1 dx1 dy1 sizex1 sizey1 + > tmp • raw2ps file2 rows2 cols2 dx2 dy2 sizex2 sizey2 + >>tmp ... • raw2ps filen rowsn colsn dxn dyn sizexn sizeyn >>tmp • lpr [-Plw] tmp

  4. Input Parameter Description • rowsj number of rows in the image matrix (no default) • colsj number of columns in the image matrix (no default) • dxj horizontal position of lower left corner of image wrt. lower left corner • of page (current point in TeX mode) (in inches) • dyj vertical position of lower left corner of image wrt. lower left corner of • page (current point in TeX mode) (in inches) • sizexj horizontal size of the printed image • sizeyj vertical size of the printed image

  5. Examples of Image Printing gcc raw2ps.c –lm –o raw2ps raw2ps mandrill.raw 512 512 0.7 6.8 3.2 3.2 + >h0.ps raw2ps scene.raw 512 512 4.1 6.8 3.2 3.2 +>>h0.ps raw2ps texture.raw 512 512 0.7 3.4 3.2 3.2 +>>h0.ps raw2ps fingerprint.raw 512 512 4.1 3.4 3.2 3.2 +>>h0.ps raw2ps ladyface.raw 128 128 1.9 1.4 0.8 0.8 +>>h0.ps raw2ps array150.raw 150 150 5.22 1.4 0.96 0.96>>h0.ps lpr [-Plw] h0.ps

More Related