From 6e284f1f2ef5a536f148aa5555dc090575e74281 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 6 Apr 2019 19:27:24 +0000 Subject: add comments git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3590 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- lib/pnm.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib') 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 -- cgit 1.4.1