about summary refs log tree commit diff
path: root/lib/pam.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pam.h')
-rw-r--r--lib/pam.h37
1 files changed, 34 insertions, 3 deletions
diff --git a/lib/pam.h b/lib/pam.h
index aebf529a..0b8c068a 100644
--- a/lib/pam.h
+++ b/lib/pam.h
@@ -136,6 +136,18 @@ struct pam {
         /* The plane number of the opacity plane;  meaningless if
            'haveOpacity' is false or 'visual' is false.
         */
+    int is_seekable;  /* boolean */
+        /* The file 'file' is seekable -- you can set the position of next
+           reading or writing to anything and any time.
+
+           If libnetpbm cannot tell if it is seekable or not, this is false.
+        */
+    pm_filepos raster_pos;
+        /* The file position of the raster (which is also the end of the
+           header).
+
+           Meaningless if 'is_seekable' is false.
+        */
 };
 
 #define PAM_HAVE_ALLOCATION_DEPTH 1
@@ -198,7 +210,7 @@ typedef sample *tuple;
        of the image (see pam.depth above).
     */
 
-#define PAM_OVERALL_MAXVAL 65535
+#define PAM_OVERALL_MAXVAL 65535lu
 
 /* Note: xv uses the same "P7" signature for its thumbnail images (it
    started using it years before PAM and unbeknownst to the designer
@@ -251,8 +263,6 @@ pnm_scalesample(sample const source,
         return (source * newmaxval + (oldmaxval/2)) / oldmaxval;
 }
 
-
-
 void
 pnm_scaletuple(const struct pam * const pamP,
                tuple              const dest,
@@ -293,6 +303,9 @@ pnm_getopacity(const struct pam * const pamP,
 void
 pnm_createBlackTuple(const struct pam * const pamP, tuple * const blackTupleP);
 
+void
+pnm_createWhiteTuple(const struct pam * const pamP, tuple * const whiteTupleP);
+
 tuple
 pnm_allocpamtuple(const struct pam * const pamP);
 
@@ -341,6 +354,12 @@ void
 pnm_writepaminit(struct pam * const pamP);
 
 void
+pnm_formatpamtuples(const struct pam * const pamP,
+                    const tuple *      const tuplerow,
+                    unsigned char *    const outbuf,
+                    unsigned int       const nTuple,
+                    unsigned int *     const rowSizeP);
+void
 pnm_formatpamrow(const struct pam * const pamP,
                  const tuple *      const tuplerow,
                  unsigned char *    const outbuf,
@@ -355,6 +374,14 @@ pnm_writepamrowmult(const struct pam * const pamP,
                     unsigned int       const rptcnt);
 
 void
+pnm_writepamrowpart(const struct pam * const pamP,
+                    const tuple *      const tuplerow,
+                    unsigned int       const firstRow,
+                    unsigned int       const firstCol,
+                    unsigned int       const rowCt,
+                    unsigned int       const colCt);
+
+void
 pnm_writepam(struct pam * const pamP, tuple ** const tuplearray);
 
 void
@@ -564,6 +591,10 @@ tuple
 pnm_backgroundtuple(struct pam *  const pamP,
                     tuple      ** const tuples);
 
+tuple
+pnm_backgroundtuplerow(const struct pam * const pamP,
+                       tuple      *       const tuplerow);
+
 /*----------------------------------------------------------------------------
    These are meant for passing to pm_system() as Standard Input feeder
    and Standard Output accepter.