about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2019-04-06 19:27:24 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2019-04-06 19:27:24 +0000
commit6e284f1f2ef5a536f148aa5555dc090575e74281 (patch)
treef2b0f1ba8388d5fcb758953e50f7554d5254d261 /lib
parente1e06a0371364807351aa558c49af0a2edba712f (diff)
downloadnetpbm-mirror-6e284f1f2ef5a536f148aa5555dc090575e74281.tar.gz
netpbm-mirror-6e284f1f2ef5a536f148aa5555dc090575e74281.tar.xz
netpbm-mirror-6e284f1f2ef5a536f148aa5555dc090575e74281.zip
add comments
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3590 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib')
-rw-r--r--lib/pnm.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/pnm.h b/lib/pnm.h
index 0625cb5c..a8aad161 100644
--- a/lib/pnm.h
+++ b/lib/pnm.h
@@ -18,7 +18,18 @@ extern "C" {
 
 
 typedef pixel xel;
+    /* Xels come in three types: PBM, PGM, and PPM; the user of an Xel has to
+       know which as a matter of context (and like a pixel, the user also has
+       to interpret an xel in the context of a certain maxval).  Though the
+       structure is identical to 'pixel', the values are the same only for PPM
+       xels.  For a PGM xel, the 'r' and 'g' components of the 'xel' structure
+       are zero and the 'b' component is the gray level.  For a PBM xel, the
+       'r' and 'g' components are zero and the 'b' component is 0 for black
+       or maxval for white.
+    */
+
 typedef pixval xelval;
+
 #define PNM_OVERALLMAXVAL PPM_OVERALLMAXVAL
 #define PNM_MAXMAXVAL PPM_MAXMAXVAL
 #define pnm_unnormalize ppm_unnormalize