According to http://bugzilla.maptools.org/show_bug.cgi?id=2125#c6
callers are not allowed to modify pointer or array values returned from
TIFFGetField or the like. So, make this explicit in the documentation
by specifying these things as const. Note that this is not an ABI
change, since C does not encode const in libraries. Also, this is
not really an API change, since the varargs call strips away all
the types anyway. So it really is more of a documentation change.
fixes#11
- Existing EXIF field definition of tags is upgraded to EXIF version 2.3.2
- EXIF-GPS structure, tags and access functions are added as special CustomDirectory (like it was done for EXIF).
- Test program custom_dir_EXIF_231.c added to test writing/reading of EXID IFD and GPS IFD tags
and to highlight some quirks of IFD-handling and peculiarities of reading/writing the different data types.
- Reading error for FileSource and SceneType tags corrected.
- EXIF_GPS_upgrade rebased onto c8c5309b76 (Merge branch 'Rational2DoublePrecision_correction' into 'master')
and adapted:
- tif_dirinfo.c: All rational tags set to TIFF_SETGET_FLOAT but only the GPSTAG_ tags set to TIFF_SETGET_DOUBLE.
- custom_dir_EXIF_231.c: Editorials amended and gcc warnigs fixed.
- CMakeLists.txt: add_test(NAME "custom_dir_EXIF_231" COMMAND "custom_dir_EXIF_231") added.
the -I option for the GNU diff and the FreeBSD diff
behaves differently regarding escaping the ( ) and |
By using two -I option, we avoid using such charracters.
fixes#179
this fixes the regression introduced in 02bb0175 / 72c4acef
( merge request !110 )
It may be a better fix to do the overflow check in SETVALUE() but the
macro do { } while(0) construct makes it difficult to quit the loop
properly.
Unfortunately, custom rational tags (TIFF_RATIONAL with field_bit=FIELD_CUSTOM) are defined as TIFF_SETGET_DOUBLE
but for the reading interface and LibTiff internally they are stored ALLWAYS as floating point SINGLE precision.
Double precision custom rational tags are not supported by LibTiff.
For the GPS tags in WGS84 a higher accuracy / precision is needed.
Therefore, this upgrade is made, keeping the old interface for the already defined tags and allowing a double precision definition,
as well as calculating rationals with higher accuracy / precision.
This higher accuracy can be used for newly defined tags like that in EXIF/GPS.
Refer also to the very old Bugzilla issue 2542 (#69)
A test file rational_precision2double.c is added, which shows prevention of the old interface to the already defined custom rational tags
with the standard library as well as with the upgraded library.
Also TIFFTAG_XRESOLUTION, TIFFTAG_YRESOLUTION, TIFFTAG_XPOSITION, TIFFTAG_YPOSITION amended from TIFF_SETGET_DOUBLE to TIFF_SETGET_FLOAT and testcase inserted in rational_precision2double.c
mingw-w64 will provide libm symbols by default without -lm and mingw-64's
libm is just a stub.
This is just to make sure that on systems with msys2 and also cygwin, cmake
doesn't find a libm that actually contains math functions.