From 97cb1522e5ab3a431167616fbb41eb630982cb85 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sun, 15 Jan 2017 18:08:42 +0000 Subject: cleanup git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2880 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- converter/other/tifftopnm.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'converter/other') diff --git a/converter/other/tifftopnm.c b/converter/other/tifftopnm.c index fb0a7739..fbc6f268 100644 --- a/converter/other/tifftopnm.c +++ b/converter/other/tifftopnm.c @@ -219,26 +219,30 @@ struct tiffDirInfo { static void -tiffToImageDim(unsigned int const tiffCols, - unsigned int const tiffRows, +tiffToImageDim(unsigned int const tiffWidth, + unsigned int const tiffHeight, unsigned short const orientation, unsigned int * const imageColsP, unsigned int * const imageRowsP) { - +/*---------------------------------------------------------------------------- + Determine the image dimensions (as *imageColsP and *imageRowsP) from the + width, height, and orientation of the TIFF raster ('tiffWidth', + 'tiffHeight', and 'orientation', respectively. +-----------------------------------------------------------------------------*/ switch (orientation) { case ORIENTATION_TOPLEFT: case ORIENTATION_TOPRIGHT: case ORIENTATION_BOTRIGHT: case ORIENTATION_BOTLEFT: - *imageColsP = tiffCols; - *imageRowsP = tiffRows; + *imageColsP = tiffWidth; + *imageRowsP = tiffHeight; break; case ORIENTATION_LEFTTOP: case ORIENTATION_RIGHTTOP: case ORIENTATION_RIGHTBOT: case ORIENTATION_LEFTBOT: - *imageColsP = tiffRows; - *imageRowsP = tiffCols; + *imageColsP = tiffHeight; + *imageRowsP = tiffWidth; break; default: pm_error("Invalid value for orientation tag in TIFF directory: %u", -- cgit 1.4.1