diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2013-12-07 18:31:33 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2013-12-07 18:31:33 +0000 |
commit | 15cbd7e033d57b4e83e2016931e2ae7df4847d93 (patch) | |
tree | 05ada0f238d6d9fc0b63b144c79b46f92f696860 | |
parent | 756f7d998493a7459e601728175cee220bfca865 (diff) | |
download | netpbm-mirror-15cbd7e033d57b4e83e2016931e2ae7df4847d93.tar.gz netpbm-mirror-15cbd7e033d57b4e83e2016931e2ae7df4847d93.tar.xz netpbm-mirror-15cbd7e033d57b4e83e2016931e2ae7df4847d93.zip |
miscellaneous update
git-svn-id: http://svn.code.sf.net/p/netpbm/code/userguide@2053 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r-- | ppmhist.html | 43 | ||||
-rw-r--r-- | pstopnm.html | 53 |
2 files changed, 58 insertions, 38 deletions
diff --git a/ppmhist.html b/ppmhist.html index 3ed9a6c7..67da8d2b 100644 --- a/ppmhist.html +++ b/ppmhist.html @@ -6,12 +6,10 @@ Updated: 24 June 2005 <BR> <A HREF="#index">Table Of Contents</A> -<A NAME="lbAB"> </A> -<H2>NAME</H2> +<H2 id="name">NAME</H2> ppmhist - print a histogram of the colors in a PPM image -<A NAME="lbAC"> </A> -<H2>SYNOPSIS</H2> +<H2 id="synopsis">SYNOPSIS</H2> <B>ppmhist</B> [<B>-hexcolor</B> | <B>-float</B> | <B>-colorname</B> | <B>-map</B>] @@ -20,8 +18,7 @@ ppmhist - print a histogram of the colors in a PPM image [<B>-sort=</B>{<B>frequency</B>,<B>rgb</B>}] [<I>ppmfile</I>] -<A NAME="lbAD"> </A> -<H2>DESCRIPTION</H2> +<H2 id="description">DESCRIPTION</H2> <p>This program is part of <a href="index.html">Netpbm</a>. @@ -29,8 +26,7 @@ ppmhist - print a histogram of the colors in a PPM image of the colors in the image, i.e. a list of all the colors and how many pixels of each color are in the image. -<a name="output"></a> -<h3>Output Format</h3> +<h3 id="output">Output Format</h3> <p>The output is in one of two basic formats: a report for humans and a PPM image for use by programs. The PPM image is actually quite @@ -74,8 +70,7 @@ need some kind of palette. The image is a single row with one column for each distinct color in the image. -<A NAME="lbAE"> </A> -<H2>OPTIONS</H2> +<H2 id="options">OPTIONS</H2> <DL COMPACT> @@ -92,8 +87,8 @@ the blue, with the least intense first. <DT><B>-hexcolor</B> -<DD>Print the color components in hexadecimal. See <a -href="#output">output format</a>. +<DD>Print the color components in hexadecimal. See <a href="#output">output +format</a>. <p>You may not specify this option along with <b>-float</b> or <b>map</b>. @@ -134,8 +129,7 @@ system color dictionary, the program fails. </DL> -<A NAME="lbAF"> </A> -<H2>SEE ALSO</H2> +<H2 id="seealso">SEE ALSO</H2> <B><A HREF="ppm.html">ppm</A></B>, @@ -147,22 +141,21 @@ system color dictionary, the program fails. <B><A HREF="ppmchange.html">ppmchange</A></B> -<P> -<A NAME="lbAG"> </A> -<H2>AUTHOR</H2> +<H2 id="author">AUTHOR</H2> Copyright (C) 1989 by Jef Poskanzer. <HR> -<A NAME="index"> </A> -<H2>Table Of Contents</H2> +<H2 id="index">Table Of Contents</H2> <UL> -<LI><A HREF="#lbAB">NAME</A> -<LI><A HREF="#lbAC">SYNOPSIS</A> -<LI><A HREF="#lbAD">DESCRIPTION</A> -<LI><A HREF="#lbAE">OPTIONS</A> -<LI><A HREF="#lbAF">SEE ALSO</A> -<LI><A HREF="#lbAG">AUTHOR</A> +<LI><A HREF="#synopsis">SYNOPSIS</A> +<LI><A HREF="#description">DESCRIPTION</A> + <ul> + <li><a href="#output">Output Format</a> + </ul> +<LI><A HREF="#options">OPTIONS</A> +<LI><A HREF="#seealso">SEE ALSO</A> +<LI><A HREF="#author">AUTHOR</A> </UL> </BODY> </HTML> diff --git a/pstopnm.html b/pstopnm.html index c722c46c..9aef79f9 100644 --- a/pstopnm.html +++ b/pstopnm.html @@ -2,7 +2,7 @@ <HTML><HEAD><TITLE>Pstopnm User Manual</TITLE></HEAD> <BODY> <H1>pstopnm</H1> -Updated: 04 July 2011 +Updated: 06 December 2013 <BR> <A HREF="#index">Table Of Contents</A> @@ -198,17 +198,29 @@ dots per inch the virtual printer prints on the virtual page. <p>The simplest thing is for you to tell <b>pstopnm</b> exactly what output device resolution to use, using the <b>-dpi</b> option. If you say for example <b>-dpi=300</b> and the bordered subject image is 2 -inches by 2 inches, the PNM output will be 600 pixels by 600 pixels. +inches by 3 inches, the PNM output will be 600 pixels by 900 pixels. +Using this method, the output device resolution has to be the same in +both directions. <p>Or you can set the output image dimensions with <b>-xsize</b> and -<b>-ysize</b>. For example, if you say <b>-xsize=1000 -ysize=1000</b> -and the bordered subject image is 2 inches by 2 inches, the output -image is 1000 by 1000 pixels, with each pixel representing 1/500 inch -of input image. +<b>-ysize</b>. For example, if you say <b>-xsize=1200 -ysize=1800</b> and the +bordered subject image is 2 inches wide by 3 inches high, the output image is +1200 by 1800 pixels, with each pixel representing 1/600 inch of input image. + +<p>In the unlikely event that you want different output device resolutions in +the two directions, you could use <b>-xsize</b> and <b>-ysize</b> to do that. +In the above example, if you change <b>-ysize</b> to 900, a pixel still +represents 1/600 inch horizontally, but 1/300 inch vertically. <p>If you specify one of <b>-xsize</b> and <b>-ysize</b> and not the -other, <b>pstopnm</b> defaults the other such that the output image -has the same aspect ratio as the bordered subject image. +other, <b>pstopnm</b> defaults the other such that the output device +resolution is the same in both directions. + +<p>The "x" and "y" of <b>-xsize</b> and <b>-ysize</b> +refer to the image being printed on the page, not the page. So if +<b>pstopnm</b> prints it in landscape orientation, "x" would pertain +to the vertical direction on the page, i.e. the vertical direction in the +output PNM image. <p>If you specify neither the output size nor the output device resolution, <b>pstopnm</b> does some weird computation which exists @@ -219,7 +231,7 @@ mainly for historical reasons: default to 612 and 792 pixels, respectively. <p>The final case, the default, is where you don't specify any size or -resolution options of <b>-nocrop</b>. This is the most complicated +resolution options or <b>-nocrop</b>. This is the most complicated case. In this case, <b>pstopnm</b> first chooses an output device resolution that would generate the number of pixels indicated by <b>-xmax</b> and <b>-ymax</b> from the bordered subject image. Then, @@ -237,18 +249,20 @@ File Conversions</a> by Andrew T. Young. <h4 id="reversible">Reversible Conversion</h4> <p>If you're trying to do the equivalent of the naive -<kbd>pstopnm | pnmtops</kbd>, the following steps will do it. +<kbd>pnmtops | pstopnm</kbd>, the following steps will do it. <pre> <kbd> - $ pnmtops -nocenter -equalpixels -dpi 72 -noturn testimg.ppm > testimg.ps + $ pnmtops -nocenter -equalpixels -dpi 72 -noturn testimg.ppm > testimg.ps $ pstopnm -xborder=0 -yborder=0 -xsize=<i>XSIZE</i> -ysize=<I>YSIZE</I> \ - -stdout -quiet testimg.ps + -portrait -stdout -quiet testimg.ps >testimg2.ppm </kbd> </pre> <i>XSIZE</i> and <i>YSIZE</i> above are the image dimensions, which you can -get from .ps file can awk or sed: +get from testimg.ps like in the following example (the grep, awk and echo +commands are just to help demonstrate how the other commands work - you +wouldn't use those in a program). <pre> <kbd> @@ -259,6 +273,10 @@ get from .ps file can awk or sed: 227 149 $ xysize=$(awk '/%%BoundingBox/ {print "-xsize="$4,"-ysize="$5}' testimg.ps) + $ echo $xysize + + -xsize=227 -ysize=149 + $ pstopnm -xborder=0 -yborder=0 $xysize ... testimg.ps </kbd> </pre> @@ -289,10 +307,19 @@ See <a href="#dimensions">the Dimensions section</a>. <DD>renders the image in landscape orientation. +<p>If you specify neither <b>-portrait</b> nor <b>-landscape</b>, +<b>pstopnm</b> chooses the orientation that best fits the image on the +output page. + +<p>Landscape means printed sideways on the page, not printed the long way. +Those are different things if the long edge of the page is the top one. + <DT><B>-portrait</B> <DD>renders the image in portrait orientation. +<p>See <b>-landscape</b>. + <DT><B>-nocrop</B> <DD>This option causes <b>pstopnm</b> to make the output image |