about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--doc/HISTORY13
-rw-r--r--editor/pamrubber.c8
-rw-r--r--lib/libpbm2.c4
-rw-r--r--version.mk2
4 files changed, 19 insertions, 8 deletions
diff --git a/doc/HISTORY b/doc/HISTORY
index 41d21eba..d68cc1aa 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -4,6 +4,17 @@ Netpbm.
 CHANGE HISTORY 
 --------------
 
+21.10.26 BJH  Release 10.96.02
+
+              pamrubber: Fix bug: random behavior with -quad when you specify
+              both points for source or target and the second one is lower in
+              the image than the first.  Always broken (Pamrubber was new in
+              Netpbm 10.54 (March 2011)).
+
+              libnetpbm: When validating computable size of width and height,
+              allow for adding up to 10 instead of 2, to account for rounding
+              up to a multiple of 8 in processing bit maps.
+
 21.09.30 BJH  Release 10.96.01
 
               pamtogif: Fix bug: doesn't ignore the input alpha mask when user
@@ -338,7 +349,7 @@ CHANGE HISTORY
               than just pick one.
 
               pamrubber: Fix bug: -frame doesn't work.  Always broken.
-              (Pamrubber was new in Netpbm 10.54 (March 2011).
+              (Pamrubber was new in Netpbm 10.54 (March 2011)).
 
 19.09.28 BJH  Release 10.88.00
 
diff --git a/editor/pamrubber.c b/editor/pamrubber.c
index fda31203..802d8c20 100644
--- a/editor/pamrubber.c
+++ b/editor/pamrubber.c
@@ -1014,10 +1014,10 @@ prepQuad(void) {
         } else if ((oldCP[0].x > oldCP[1].x) && (oldCP[0].y < oldCP[1].y)) {
             /* top-right and bottom-left */
             quad1 = quadRect(oldCP[1].x, oldCP[0].x, oldCP[0].y, oldCP[1].y);
-        } else if ((oldCP[0].x < oldCP[1].x) && (oldCP[0].y < oldCP[1].y)) {
+        } else if ((oldCP[0].x < oldCP[1].x) && (oldCP[0].y > oldCP[1].y)) {
             /* bottom-left and top-right */
             quad1 = quadRect(oldCP[0].x, oldCP[1].x, oldCP[1].y, oldCP[0].y);
-        } else if ((oldCP[0].x > oldCP[1].x) && (oldCP[0].y < oldCP[1].y)) {
+        } else if ((oldCP[0].x > oldCP[1].x) && (oldCP[0].y > oldCP[1].y)) {
             /* bottom-right and top-left */
             quad1 = quadRect(oldCP[1].x, oldCP[0].x, oldCP[1].y, oldCP[0].y);
         }
@@ -1028,10 +1028,10 @@ prepQuad(void) {
         } else if ((newCP[0].x > newCP[1].x) && (newCP[0].y < newCP[1].y)) {
             /* top-right and bottom-left */
             quad2 = quadRect(newCP[1].x, newCP[0].x, newCP[0].y, newCP[1].y);
-        } else if ((newCP[0].x < newCP[1].x) && (newCP[0].y < newCP[1].y)) {
+        } else if ((newCP[0].x < newCP[1].x) && (newCP[0].y > newCP[1].y)) {
             /* bottom-left and top-right */
             quad2 = quadRect(newCP[0].x, newCP[1].x, newCP[1].y, newCP[0].y);
-        } else if ((newCP[0].x > newCP[1].x) && (newCP[0].y < newCP[1].y)) {
+        } else if ((newCP[0].x > newCP[1].x) && (newCP[0].y > newCP[1].y)) {
             /* bottom-right and top-left */
             quad2 = quadRect(newCP[1].x, newCP[0].x, newCP[1].y, newCP[0].y);
         }
diff --git a/lib/libpbm2.c b/lib/libpbm2.c
index a35004f9..2fec4788 100644
--- a/lib/libpbm2.c
+++ b/lib/libpbm2.c
@@ -72,9 +72,9 @@ validateComputableSize(unsigned int const cols,
    A common operation is adding 1 or 2 to the highest row or
    column number in the image, so we make sure that's possible.
 -----------------------------------------------------------------------------*/
-    if (cols > INT_MAX - 2)
+    if (cols > INT_MAX - 10)
         pm_error("image width (%u) too large to be processed", cols);
-    if (rows > INT_MAX - 2)
+    if (rows > INT_MAX - 10)
         pm_error("image height (%u) too large to be processed", rows);
 }
 
diff --git a/version.mk b/version.mk
index 9582c15b..02cdfa08 100644
--- a/version.mk
+++ b/version.mk
@@ -1,3 +1,3 @@
 NETPBM_MAJOR_RELEASE = 10
 NETPBM_MINOR_RELEASE = 96
-NETPBM_POINT_RELEASE = 1
+NETPBM_POINT_RELEASE = 2