From 96e9c532d4aecf20081577f45d2bf53518e62c03 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Thu, 29 Feb 2024 18:29:36 +0000 Subject: Add input dimensions to -reportonly git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4851 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- editor/pamcut.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'editor') 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 */ -- cgit 1.4.1