diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2017-01-15 18:08:42 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2017-01-15 18:08:42 +0000 |
commit | 97cb1522e5ab3a431167616fbb41eb630982cb85 (patch) | |
tree | 3da4004c2492bab11faed3a0fdfc637bca95929f | |
parent | 64bb5200cf32dde96ed87284f133f735c2a357cd (diff) | |
download | netpbm-mirror-97cb1522e5ab3a431167616fbb41eb630982cb85.tar.gz netpbm-mirror-97cb1522e5ab3a431167616fbb41eb630982cb85.tar.xz netpbm-mirror-97cb1522e5ab3a431167616fbb41eb630982cb85.zip |
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2880 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r-- | converter/other/tifftopnm.c | 18 |
1 files changed, 11 insertions, 7 deletions
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", |