diff --git a/ChangeLog b/ChangeLog index dc5e9d36..e91db4c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ GraphicsMagick over ImageMagick (thanks Mikhail) - fix the en_GB translation - use meta to preserve resunit between tiff load and save +- small doc improvements 25/1/08 started 7.14.0 - bump all version numbers for new stable diff --git a/libsrc/conversion/im_vips2tiff.c b/libsrc/conversion/im_vips2tiff.c index 71397f04..15da73e0 100644 --- a/libsrc/conversion/im_vips2tiff.c +++ b/libsrc/conversion/im_vips2tiff.c @@ -1200,13 +1200,11 @@ make_tiff_write( IMAGE *im, const char *filename ) tw->resunit = RESUNIT_CENTIMETER; tw->xres = im->Xres * 10; tw->yres = im->Yres * 10; - if( im_meta_get_string( im, IM_META_RESOLUTION_UNIT, &p ) && - strcmp( p, "in" ) ) { + if( !im_meta_get_string( im, IM_META_RESOLUTION_UNIT, &p ) && + strcmp( p, "in" ) == 0 ) { tw->resunit = RESUNIT_INCH; - tw->xres /= 2.54; - tw->yres /= 2.54; - // do I need this? - g_free( p ); + tw->xres *= 2.54; + tw->yres *= 2.54; } /* Parse mode string. diff --git a/man/im_meta.3 b/man/im_meta.3 index f251cbe3..5a3d9892 100644 --- a/man/im_meta.3 +++ b/man/im_meta.3 @@ -90,6 +90,12 @@ is a convenience function over It copies the string, and then shares that copy between all images derived from this IMAGE. +.B im_meta_get_string(3) +is a convenience function over +.B im_meta_get_area(3). +It returns a pointer to the string being mananged by VIPS. Do not free the +return result! + .B im_meta_set_blob(3) sets a field which is a blob (binary object). A blob is just like string, except that rather than being NULL-terminated, you must pass an explicit diff --git a/man/im_tiff2vips.3 b/man/im_tiff2vips.3 index a061516b..a3fb20f1 100644 --- a/man/im_tiff2vips.3 +++ b/man/im_tiff2vips.3 @@ -102,11 +102,15 @@ The default format is "multibit". "res_cm" - output resolution unit is pixels per centimetre "res_inch" - output resolution unit is pixels per inch -The default format is "res_cm". The unit can optionally be followed by a -":" character and the horizontal and vertical resolution, separated by a "x" -character. You can have a single number with no "x" and set the horizontal -and vertical resolutions together. The default unit is cm, and the default -resolution is taken from the VIPS header. +The default resolution unit is taken from the header field "resolution-unit" +(IM_META_RESOLUTION_UNIT in C). If this field is not set, then VIPS defaults +to cm. + +This may be overridden by the option. The unit can optionally +be followed by a ":" character and the horizontal and vertical resolution, +separated by a "x" character. You can have a single number with no "x" and +set the horizontal and vertical resolutions together. The default unit is +cm, and the default resolution is taken from the VIPS header. is the filename of an ICC profile to embed in the TIFF file