diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2007-12-11 23:03:18 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2007-12-11 23:03:18 +0000 |
commit | 405ceae2f5ef0cd237b607889e55455f4cc34640 (patch) | |
tree | 44300a0dfbbfc4df21d6832bdbcc89575b0db8b0 /converter/other/tifftopnm.c | |
parent | aefcdcb26e6f076ece01d3af35e4a004ab105bff (diff) | |
download | netpbm-mirror-405ceae2f5ef0cd237b607889e55455f4cc34640.tar.gz netpbm-mirror-405ceae2f5ef0cd237b607889e55455f4cc34640.tar.xz netpbm-mirror-405ceae2f5ef0cd237b607889e55455f4cc34640.zip |
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@485 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other/tifftopnm.c')
-rw-r--r-- | converter/other/tifftopnm.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/converter/other/tifftopnm.c b/converter/other/tifftopnm.c index ce17b7e1..e228651a 100644 --- a/converter/other/tifftopnm.c +++ b/converter/other/tifftopnm.c @@ -233,8 +233,8 @@ read_directory(TIFF * const tif, pm_error("Input Tiff file is invalid. It has no IMAGELENGTH tag."); if (headerdump) { - pm_message( "%dx%dx%d image", *cols_p, *rows_p, *bps_p * *spp_p ); - pm_message( "%d bits/sample, %d samples/pixel", *bps_p, *spp_p ); + pm_message( "%ux%ux%u image", *cols_p, *rows_p, *bps_p * *spp_p ); + pm_message( "%u bits/sample, %d samples/pixel", *bps_p, *spp_p ); } } @@ -266,11 +266,12 @@ readscanline(TIFF * const tif, /* The TIFFReadScanline man page doesn't tell the format of its 'buf' return value, but it is exactly the same format as the 'buf' input to TIFFWriteScanline. The man page for that doesn't say - anything either, but the source code for Pnmtotiff contains a + anything either, but the source code for Pamtotiff contains a specification. */ rc = TIFFReadScanline(tif, scanbuf, row, plane); + if (rc < 0) pm_error( "Unable to read row %d, plane %d of input Tiff image. " "TIFFReadScanline() failed.", @@ -291,7 +292,7 @@ readscanline(TIFF * const tif, for (sample = 0, bitsleft=8, inP=scanbuf; sample < cols*spp; - sample++) { + ++sample) { if (bitsleft == 0) { ++inP; bitsleft = 8; @@ -322,7 +323,7 @@ readscanline(TIFF * const tif, bytes of each sample appear in a TIFF file, which is contrary to the TIFF spec. */ - uint16 * const scanbuf16 = (uint16 *) scanbuf; + const uint16 * const scanbuf16 = (const uint16 *) scanbuf; unsigned int sample; for (sample = 0; sample < cols*spp; ++sample) |