Home | History | Annotate | only in /netvirt/usr/src/cmd/lp/filter/postscript/postmd
Up to higher level directory
NameDateSize
Makefile24-Feb-20081.7K
postmd.c24-Feb-200835.4K
postmd.h24-Feb-20083.5K
README24-Feb-20082.7K

README

      1 #
      2 # CDDL HEADER START
      3 #
      4 # The contents of this file are subject to the terms of the
      5 # Common Development and Distribution License, Version 1.0 only
      6 # (the "License").  You may not use this file except in compliance
      7 # with the License.
      8 #
      9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
     10 # or http://www.opensolaris.org/os/licensing.
     11 # See the License for the specific language governing permissions
     12 # and limitations under the License.
     13 #
     14 # When distributing Covered Code, include this CDDL HEADER in each
     15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     16 # If applicable, add the following below this CDDL HEADER, with the
     17 # fields enclosed by brackets "[]" replaced with your own identifying
     18 # information: Portions Copyright [yyyy] [name of copyright owner]
     19 #
     20 # CDDL HEADER END
     21 #
     22 
     23 A program that can be used to display a matrix as a gray scale image on PostScript
     24 printers. May be useful if you have a large matrix and want a simple way to look
     25 for patterns. Although I haven't been anywhere close, I expect a 600x600 matrix
     26 is a very optimistic upper bound on a 300 dpi printer using 5 shades of gray and
     27 8.5x11 inch paper.
     28 
     29 Matrix elements are a series of floating point numbers arranged in the input file
     30 in row major order. By default each matrix is assumed to be square and the number
     31 of rows (and columns) is set to the square root of the number of elements in the
     32 input file. White space, including newlines, is not used to determine the matrix
     33 dimensions. Each matrix element is mapped into an integer in the range 0 to 255
     34 (254 by default) and PostScript's image operator maps that integer into a gray
     35 scale appropriate for your printer.
     36 
     37 The mapping from floating point matrix elements to integers is controlled by an
     38 interval list and grayscale map. The default interval list is "-1,0,1" which
     39 partitions the real line into 7 regions, while the default grayscale map gets
     40 darker as the regions move from left to right along the real line. The -i option
     41 changes the interval list and the -g option modifies the grayscale mapping. Check
     42 the man page for more details.
     43 
     44 By default 6 byte patterns are used, but any number can be selected with the -b
     45 option. 6 byte patterns are a tradeoff that achieves a good (but not necessarily
     46 optimal) performance across the wide variety of currently available PostScript
     47 printers. Decreasing the pattern size often helps some on printers with fast
     48 processors (eg. PS-810s) while increasing the pattern size speeds things up on
     49 older printers (eg. PS-800s). In the limited number of tests I ran -b10 worked
     50 best on PS800s and -b4 gave the best performance on PS-810s. If you want a
     51 different default pattern size change the initialization of bytespp (near line
     52 175 in postmd.c) before you compile the program.
     53 
     54