about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--lib/pam.h42
1 files changed, 15 insertions, 27 deletions
diff --git a/lib/pam.h b/lib/pam.h
index 5edc8a01..aebf529a 100644
--- a/lib/pam.h
+++ b/lib/pam.h
@@ -220,33 +220,6 @@ struct pamtuples {
 };
 
 
-typedef float * pnm_transformMap;
-    /* This is an array of transform maps.  transform[N] is the
-       array that is the map for Plane N.
-
-       Transform maps define a transformation between PAM sample value
-       to normalized libnetpbm "samplen" value, i.e. what you get back
-       from pnm_readpamrown() or pass to pnm_writepamrown().
-       Typically, it's a gamma transfer function generated by
-       pnm_creategammatransform() or pnm_createungammatransform().
-
-       NULL for any transform means just plain normalization -- divide
-       the PAM sample value by the maxval to get the samplen, multiply
-       samplen by the maxval and round to get PAM sample value.
-
-       NULL for map table, or 'transform' member not present (pam
-       structure is too small to contain it) means ALL transforms
-       are plain normalization.
-
-       Each transform map is an array indexed by a PAM sample
-       value, containing 'float' values.  So it must have 'maxval'
-       entries.  The sample -> samplen transformation is just the
-       obvious table lookup.  The samplen -> sample transformation is
-       more complicated -- if the samplen value is between map[N]
-       and map[N+1], then the sample value is N.  And only transforms
-       where map[N+1] > map[N] are allowed.
-    */
-
 /* Declarations of library functions. */
 
 /* We don't have a specific PAM function for init and nextimage, because
@@ -438,6 +411,21 @@ void
 pnm_writepamn(struct pam * const pamP,
               tuplen **    const tuplenarray);
 
+typedef samplen * pnm_transformMap;
+    /* This defines a transformation between PAM sample value
+       to normalized libnetpbm "samplen" value, i.e. what you get back
+       from pnm_readpamrown() or pass to pnm_writepamrown().
+       Typically, it's a gamma transfer function generated by
+       pnm_creategammatransform() or pnm_createungammatransform().
+
+       It is an array indexed by a PAM sample value, containing 'float'
+       values.  So it must have 'maxval' entries.  The sample -> samplen
+       transformation is just the obvious table lookup.  The samplen -> sample
+       transformation is more complicated -- if the samplen value is between
+       map[N] and map[N+1], then the sample value is N.  And only transforms
+       where map[N+1] > map[N] are allowed.
+    */
+
 samplen
 pnm_normalized_sample(struct pam * const pamP,
                       sample       const sample);