about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Makefile.version2
-rw-r--r--doc/HISTORY7
-rw-r--r--generator/pamstereogram.c4
3 files changed, 11 insertions, 2 deletions
diff --git a/Makefile.version b/Makefile.version
index 29121c90..a146d363 100644
--- a/Makefile.version
+++ b/Makefile.version
@@ -1,3 +1,3 @@
 NETPBM_MAJOR_RELEASE = 10
 NETPBM_MINOR_RELEASE = 35
-NETPBM_POINT_RELEASE = 61
+NETPBM_POINT_RELEASE = 62
diff --git a/doc/HISTORY b/doc/HISTORY
index 5fd68b51..d8195f5e 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -4,6 +4,13 @@ Netpbm.
 CHANGE HISTORY 
 --------------
 
+09.04.12 BJH  Release 10.35.62
+
+              pamstereogram: fix tuple type in output file (and crash
+              with -verbose) with -patfile .
+
+              pamstereogram: fix uninitialized bytes per sample value.
+
 09.03.22 BJH  Release 10.35.61
 
               g3topbm: fix array bound violation.  Introduced in 10.32.
diff --git a/generator/pamstereogram.c b/generator/pamstereogram.c
index 71c541df..0e6e6cc9 100644
--- a/generator/pamstereogram.c
+++ b/generator/pamstereogram.c
@@ -480,6 +480,7 @@ initPatternPixel(outGenerator *     const outGenP,
     outGenP->pam.plainformat = stateP->patPam.plainformat;
     outGenP->pam.depth       = stateP->patPam.depth;
     outGenP->pam.maxval      = stateP->patPam.maxval;
+    strcpy(outGenP->pam.tuple_type, stateP->patPam.tuple_type);
 
     if (cmdline.verbose)
         reportImageParameters("Pattern file", &stateP->patPam);
@@ -498,7 +499,6 @@ createoutputGenerator(struct cmdlineInfo const cmdline,
 
     outGenP->pam.size   = sizeof(struct pam);
     outGenP->pam.len    = PAM_STRUCT_SIZE(tuple_type);
-    outGenP->pam.bytes_per_sample = pnm_bytespersample(outGenP->pam.maxval);
     outGenP->pam.file   = stdout;
     outGenP->pam.height = inPamP->height + 3 * abs(cmdline.guidesize);
         /* Allow room for guides. */
@@ -514,6 +514,8 @@ createoutputGenerator(struct cmdlineInfo const cmdline,
         initRandomColor(outGenP, inPamP, cmdline);
     }
 
+    outGenP->pam.bytes_per_sample = pnm_bytespersample(outGenP->pam.maxval);
+
     *outputGeneratorPP = outGenP;
 }