summary refs log tree commit diff
path: root/pgm.html
diff options
context:
space:
mode:
Diffstat (limited to 'pgm.html')
-rw-r--r--pgm.html130
1 files changed, 65 insertions, 65 deletions
diff --git a/pgm.html b/pgm.html
index f02a67a9..c0fb4d8d 100644
--- a/pgm.html
+++ b/pgm.html
@@ -1,80 +1,80 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
-<TITLE>PGM Format Specification</TITLE>
-<META NAME="manual_section" CONTENT="5">
-</HEAD>
-<BODY>
-<H1>pgm</H1>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
+<html>
+<head>
+<title>PGM Format Specification</title>
+<meta name="manual_section" content="5">
+</head>
+<body>
+<h1>pgm</h1>
 Updated: 09 October 2016
-<BR>
-<A HREF="#index">Table Of Contents</A>
+<br>
+<a href="#index">Table Of Contents</a>
 
-<H2>NAME</H2>
+<h2>NAME</h2>
 
 pgm - Netpbm grayscale image format
 
-<H2 id="description">DESCRIPTION</H2>
+<h2 id="description">DESCRIPTION</h2>
 
 <p>This program is part of <a href="index.html">Netpbm</a>.
 
-<P>The PGM format is a lowest common denominator grayscale file format.
+<p>The PGM format is a lowest common denominator grayscale file format.
 It is designed to be extremely easy to learn and write programs for.
 (It's so simple that most people will simply reverse engineer it
 because it's easier than reading this specification).
 
-<P>A PGM image represents a grayscale graphic image.  There are many
+<p>A PGM image represents a grayscale graphic image.  There are many
 pseudo-PGM formats in use where everything is as specified herein except
 for the meaning of individual pixel values.  For most purposes, a PGM
 image can just be thought of an array of arbitrary integers, and all the
 programs in the world that think they're processing a grayscale image 
 can easily be tricked into processing something else.
 
-<P>The name "PGM" is an acronym derived from "Portable Gray Map."
+<p>The name "PGM" is an acronym derived from "Portable Gray Map."
 
-<P>One official variant of PGM is the transparency mask.  A transparency
+<p>One official variant of PGM is the transparency mask.  A transparency
 mask in Netpbm is represented by a PGM image, except that in place of 
 pixel intensities, there are opaqueness values.  See below.
 
 <h2 id="format">THE FORMAT</h2>
 
-<P>The format definition is as follows.  You can use the <a
+<p>The format definition is as follows.  You can use the <a
 href="libnetpbm.html">libnetpbm</a> C subroutine library to conveniently
 and accurately read and interpret the format.
 
-<P>A PGM file consists of a sequence of one or more PGM images. There are
+<p>A PGM file consists of a sequence of one or more PGM images. There are
 no data, delimiters, or padding before, after, or between images.
 
-<P>Each PGM image consists of the following:
+<p>Each PGM image consists of the following:
 
-<OL>
+<ol>
   
-<LI>A "magic number" for identifying the file type.
+<li>A "magic number" for identifying the file type.
 A pgm image's magic number is the two characters "P5".
 
-<LI>Whitespace (blanks, TABs, CRs, LFs).
+<li>Whitespace (blanks, TABs, CRs, LFs).
 
-<LI>A width, formatted as ASCII characters in decimal.
+<li>A width, formatted as ASCII characters in decimal.
 
-<LI>Whitespace.
+<li>Whitespace.
 
-<LI>A height, again in ASCII decimal.
+<li>A height, again in ASCII decimal.
 
-<LI>Whitespace.
+<li>Whitespace.
 
-<LI>The maximum gray value (Maxval), again in ASCII decimal.  Must be less
+<li>The maximum gray value (Maxval), again in ASCII decimal.  Must be less
 than 65536, and more than zero.
 
-<LI>A single whitespace character (usually a newline).
+<li>A single whitespace character (usually a newline).
 
-<LI>A raster of Height rows, in order from top to bottom.  Each row
+<li>A raster of Height rows, in order from top to bottom.  Each row
 consists of Width gray values, in order from left to right.  Each gray
 value is a number from 0 through Maxval, with 0 being black and Maxval
 being white.  Each gray value is represented in pure binary by either
 1 or 2 bytes.  If the Maxval is less than 256, it is 1 byte.
 Otherwise, it is 2 bytes.  The most significant byte is first.
 
-<P>A row of an image is horizontal.  A column is vertical.  The pixels
+<p>A row of an image is horizontal.  A column is vertical.  The pixels
 in the image are square and contiguous.
 
 <p>Each gray value is a number proportional to the intensity of the
@@ -89,10 +89,10 @@ might be compared.
 
 <p>Note that a common variation from the PGM format is to have the
 gray value be "linear," i.e. as specified above except
-without the gamma adjustment.  <B>pnmgamma</B> takes such a PGM
+without the gamma adjustment.  <b>pnmgamma</b> takes such a PGM
 variant as input and produces a true PGM as output.
 
-<P>Another popular variation from PGM is to substitute the newer sRGB transfer
+<p>Another popular variation from PGM is to substitute the newer sRGB transfer
 function for the BT.709 one.  You can use <b>pnmgamma</b> to convert between
 this variation and true PGM.
 
@@ -106,12 +106,12 @@ compute the intensity of a composite pixel of an "under" and
 (alpha/alpha_maxval).  Note that there is no gamma transfer function
 in the transparency mask.
 
-</OL> 
+</ol> 
 
 <p>Strings starting with "#" may be comments, the same as
 with <a href="pbm.html">PBM</a>.
 
-<P>Note that you can use <B>pamdepth</B> to convert between a the
+<p>Note that you can use <b>pamdepth</b> to convert between a the
 format with 1 byte per gray value and the one with 2 bytes per gray
 value.
 
@@ -123,13 +123,13 @@ calls white space).
 
 <h3 id="plainpgm">Plain PGM</h3>
 
-<P>There is actually another version of the PGM format that is fairly
+<p>There is actually another version of the PGM format that is fairly
 rare: "plain" PGM format.  The format above, which generally
 considered the normal one, is known as the "raw" PGM format.
-See <B><A HREF="pbm.html">pbm</A></B> for some commentary on how plain
+See <b><a href="pbm.html">pbm</a></b> for some commentary on how plain
 and raw formats relate to one another and how to use them.
 
-<P>The difference in the plain format is:
+<p>The difference in the plain format is:
 
 <ul>
 <li>
@@ -149,7 +149,7 @@ No line should be longer than 70 characters.
 
 <p>Here is an example of a small image in the plain PGM format.
 
-<PRE>
+<pre>
 P2
 # feep.pgm
 24 7
@@ -161,9 +161,9 @@ P2
 0  3  0  0  0  0  0  7  0  0  0  0  0 11  0  0  0  0  0 15  0  0  0  0
 0  3  0  0  0  0  0  7  7  7  7  0  0 11 11 11 11  0  0 15  0  0  0  0
 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
-</PRE>
+</pre>
 
-<P>There is a newline character at the end of each of these lines.
+<p>There is a newline character at the end of each of these lines.
 
 <p>Programs that read this format should be as lenient as possible,
 accepting anything that looks remotely like a PGM.
@@ -187,43 +187,43 @@ cases where distinguishing between the particular subformats of PNM is not
 convenient.
 
 
-<H2 id="compatibility">COMPATIBILITY</H2>
+<h2 id="compatibility">COMPATIBILITY</h2>
 
-<P>
+<p>
 Before April 2000, a raw format PGM file could not have a maxval greater
 than 255.  Hence, it could not have more than one byte per sample.  Old
 programs may depend on this.
-<P>
+<p>
 Before July 2000, there could be at most one image in a PGM file.  As
 a result, most tools to process PGM files ignore (and don't read) any
 data after the first image.
 
-<H2 id="seealso">SEE ALSO</H2>
+<h2 id="seealso">SEE ALSO</h2>
 
-<A HREF="pnm.html">pnm</A>,
-<A HREF="pbm.html">pbm</A>,
-<A HREF="ppm.html">ppm</A>,
-<A HREF="pam.html">pam</A>,
-<A HREF="libnetpbm.html">libnetpbm</A>,
-<A HREF="directory.html">programs that process PGM</A>,
+<a href="pnm.html">pnm</a>,
+<a href="pbm.html">pbm</a>,
+<a href="ppm.html">ppm</a>,
+<a href="pam.html">pam</a>,
+<a href="libnetpbm.html">libnetpbm</a>,
+<a href="directory.html">programs that process PGM</a>,
 
-<H2 id="author">AUTHOR</H2>
+<h2 id="author">AUTHOR</h2>
 
 Copyright (C) 1989, 1991 by Jef Poskanzer.
 
-<HR>
-<H2 id="index">Table Of Contents</H2>
-<UL>
-<LI><A HREF="#description">DESCRIPTION</A>
-<LI><A HREF="#description">THE FORMAT</A>
+<hr>
+<h2 id="index">Table Of Contents</h2>
 <ul>
-  <li><A HREF="#plainpgm">Plain PGM</A>
+<li><a href="#description">DESCRIPTION</a>
+<li><a href="#format">THE FORMAT</a>
+<ul>
+  <li><a href="#plainpgm">Plain PGM</a>
     </ul>
-<li><A HREF="#internetmediatype">INTERNET MEDIA TYPE</A>
-<li><A HREF="#filename">FILE NAME</A>
-<LI><A HREF="#compatibility">COMPATIBILITY</A>
-<LI><A HREF="#seealso">SEE ALSO</A>
-<LI><A HREF="#author">AUTHOR</A>
-</UL>
-</BODY>
-</HTML>
+<li><a href="#internetmediatype">INTERNET MEDIA TYPE</a>
+<li><a href="#filename">FILE NAME</a>
+<li><a href="#compatibility">COMPATIBILITY</a>
+<li><a href="#seealso">SEE ALSO</a>
+<li><a href="#author">AUTHOR</a>
+</ul>
+</body>
+</html>