The Usage of Program raw2ps.c - PowerPoint PPT Presentation

About This Presentation
Title:

The Usage of Program raw2ps.c

Description:

... is a program which converts a free-form ascii file of unsigned characters (pixel ... The user has a complete control over picture placement and size. ... – PowerPoint PPT presentation

Number of Views:51
Avg rating:3.0/5.0
Slides: 6
Provided by: ccc7
Category:
Tags: free | pics | program | raw2ps | usage

less

Transcript and Presenter's Notes

Title: The Usage of Program raw2ps.c


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
    y6.ps
  • raw2ps scene.raw 512 512 4.1 6.8 3.2 3.2
    y6.ps
  • raw2ps texture.raw 512 512 0.7 3.4 3.2 3.2
    y6.ps
  • raw2ps fingerprint.raw 512 512 4.1 3.4 3.2 3.2
    y6.ps
  • raw2ps ladyface.raw 128 128 1.9 1.4 0.8 0.8
    y6.ps
  • raw2ps array150.raw 150 150 5.22 1.4 0.96
    0.96y6.ps
  • lpr -Plw y6.ps
Write a Comment
User Comments (0)
About PowerShow.com