about summary refs log tree commit diff
path: root/editor
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2024-02-29 18:29:36 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2024-02-29 18:29:36 +0000
commit96e9c532d4aecf20081577f45d2bf53518e62c03 (patch)
tree29f2facda0c247f5368ccae904d189366769a3f9 /editor
parent2ae5784b44a06ca5dc4744edb68eb7537a2a970d (diff)
downloadnetpbm-mirror-96e9c532d4aecf20081577f45d2bf53518e62c03.tar.gz
netpbm-mirror-96e9c532d4aecf20081577f45d2bf53518e62c03.tar.xz
netpbm-mirror-96e9c532d4aecf20081577f45d2bf53518e62c03.zip
Add input dimensions to -reportonly
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4851 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor')
-rw-r--r--editor/pamcut.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/editor/pamcut.c b/editor/pamcut.c
index 42ae00bb..13f1486a 100644
--- a/editor/pamcut.c
+++ b/editor/pamcut.c
@@ -454,10 +454,12 @@ rejectOutOfBounds(unsigned int const cols,
 
 
 static void
-reportCuts(int const leftCol,
-           int const rghtCol,
-           int const topRow,
-           int const botRow) {
+reportCuts(int          const leftCol,
+           int          const rghtCol,
+           int          const topRow,
+           int          const botRow,
+           unsigned int const oldWidth,
+           unsigned int const oldHeight) {
 
     /* N.B. column and row numbers can be outside the input image, even
        negative, which implies padding is required.
@@ -469,8 +471,9 @@ reportCuts(int const leftCol,
     assert (rghtCol >= leftCol);
     assert (botRow  >= topRow );
 
-    printf("%d %d %d %d %u %u\n",
-           leftCol, rghtCol, topRow, botRow, newWidth, newHeight);
+    printf("%d %d %d %d %u %u %u %u\n",
+           leftCol, rghtCol, topRow, botRow,
+           oldWidth, oldHeight, newWidth, newHeight);
 }
 
 
@@ -822,7 +825,8 @@ cutOneImage(FILE *             const ifP,
     }
 
     if (cmdline.reportonly) {
-        reportCuts(leftcol, rightcol, toprow, bottomrow);
+        reportCuts(leftcol, rightcol, toprow, bottomrow,
+                   inpam.width, inpam.height);
         drainRaster(&inpam);
     } else {
         outpam = inpam;    /* Initial value -- most fields should be same */