aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2020-12-13 22:57:43 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2020-12-13 22:57:43 +0000
commit160db7518867b15be982cd2ac54bb827f76bcc86 (patch)
tree3c53406b71f7268dd254ddaa2b3e4a1e62364cda
parent4feceadc3f1eb309e30c424a23b465353557b5ce (diff)
downloadnetpbm-mirror-160db7518867b15be982cd2ac54bb827f76bcc86.tar.gz
netpbm-mirror-160db7518867b15be982cd2ac54bb827f76bcc86.tar.xz
netpbm-mirror-160db7518867b15be982cd2ac54bb827f76bcc86.zip
Fix comments
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4005 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-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);