From 5d40e67e897955fd269a5f27fe01dcf7afd95210 Mon Sep 17 00:00:00 2001 From: Frank Warmerdam Date: Fri, 6 Feb 2009 15:43:06 +0000 Subject: [PATCH] avoid defaulting image->res_unit to INCH in loadImage() --- ChangeLog | 5 +++++ tools/tiffcrop.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 20a75062..5296cc23 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-02-06 Frank Warmerdam + + * tools/tiffcrop.c: Don't default image->res_unit to INCH. Now the + test suite should pass. + 2009-02-05 Frank Warmerdam * libtiff/tif_dirread.c: Re-incorporated a sanity check on tag size, diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c index 13f134f2..6220fc15 100644 --- a/tools/tiffcrop.c +++ b/tools/tiffcrop.c @@ -1,4 +1,4 @@ -/* $Id: tiffcrop.c,v 1.11 2009-01-23 06:04:31 fwarmerdam Exp $ */ +/* $Id: tiffcrop.c,v 1.12 2009-02-06 15:43:06 fwarmerdam Exp $ */ /* tiffcrop.c -- a port of tiffcp.c extended to include manipulations of * the image data through additional options listed below @@ -4966,7 +4966,7 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts * dump, unsigned TIFFGetField(in, TIFFTAG_IMAGELENGTH, &length); TIFFGetField(in, TIFFTAG_XRESOLUTION, &xres); TIFFGetField(in, TIFFTAG_YRESOLUTION, &yres); - TIFFGetFieldDefaulted(in, TIFFTAG_RESOLUTIONUNIT, &res_unit); + TIFFGetField(in, TIFFTAG_RESOLUTIONUNIT, &res_unit); scanlinesize = TIFFScanlineSize(in); image->bps = bps;