Sam Hasinoff
2eb5a954cb
Make TIFFTAG_CFAPATTERN variable count
...
The TIFFTAG_CFAPATTERN tag (33422) from TIFF/EP, recently introduced in libtiff
3363eda09d
/ http://bugzilla.maptools.org/show_bug.cgi?id=2457
is described as having a fixed count of 4.
But the TIFF/EP spec says this should support a variable count (= CFARepeatRows * CFARepeatCols):
TIFF/EP, ISO 12234-2:2001
http://www.barrypearson.co.uk/top2009/downloads/TAG2000-22_DIS12234-2.pdf
page 18 and 26
2020-03-08 21:23:16 +01:00
Even Rouault
e95584d3b8
CMake: Skip custom_dir_EXIF_231 test on shared builds to avoid issues on Windows
2020-03-07 17:37:42 +01:00
Even Rouault
d83f5ce943
Merge branch 'EXIF231_GPS_upgrade' into 'master'
...
EXIF 2.32 and GPS TIFF-tags and functionality upgraded.
See merge request libtiff/libtiff!91
2020-03-07 16:01:12 +00:00
Su_Laus
a8193c438f
EXIF 2.32 and GPS tags and functionality upgraded.
...
- 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.
2020-03-07 16:50:18 +01:00
Even Rouault
74cf519c9f
Merge branch 'issue-55' into 'master'
...
ppm2tiff: support any bps value from 1 to 16
Closes #55
See merge request libtiff/libtiff!106
2020-03-07 11:02:38 +00:00
Thomas Bernard
5f84fefcf5
ppm2tiff: Add test for 16bpc PPM
2020-03-07 11:46:20 +01:00
Thomas Bernard
622492cb31
ppm2tiff: remove unused argument warning
2020-03-07 10:56:31 +01:00
Ludolf Holzheid
5582d0bfad
ppm2tiff: support any bps value from 1 to 16
...
fix #55
http://bugzilla.maptools.org/show_bug.cgi?id=2505
Patch originally submited by Ludolf Holzheid <ludolf.holzheid@gmx.de>
2020-03-07 10:56:31 +01:00
Even Rouault
bba9d00d77
Merge branch 'fax-test' into 'master'
...
add test for fax4 decoding
See merge request libtiff/libtiff!114
2020-03-06 09:03:45 +00:00
Thomas Bernard
ff56dc47af
add test for fax4 decoding
...
This will check for regression on #46
https://gitlab.com/libtiff/libtiff/issues/46
http://bugzilla.maptools.org/show_bug.cgi?id=2434
2020-03-05 23:51:32 +01:00
Even Rouault
a712dc3f42
Merge branch 'freebsd-tests' into 'master'
...
make tests pass under FreeBSD.
See merge request libtiff/libtiff!113
2020-03-05 22:26:11 +00:00
Thomas Bernard
ed9d09cf0a
make tests pass under FreeBSD.
...
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.
2020-03-05 23:15:06 +01:00
Even Rouault
a6d3c1d64b
Merge branch 'issue-31' into 'master'
...
HTML
Closes #31
See merge request libtiff/libtiff!111
2020-03-05 11:45:15 +00:00
Even Rouault
d71530462f
Merge branch 'issue-179' into 'master'
...
tif_fax3.h: check for buffer overflow in EXPAND2D before "calling" CLEANUP_RUNS()
Closes #179
See merge request libtiff/libtiff!112
2020-03-05 11:39:34 +00:00
Thomas Bernard
a9f96b79d7
v4.1.0.html: fix for validation
...
long <!----------------> comments were replaced
because they confused some parsers
2020-03-05 11:57:23 +01:00
Thomas Bernard
f5d1d8df7b
add DOCTYPE on v*.html
2020-03-05 11:43:57 +01:00
Thomas Bernard
690cc7a701
fix HTML files so they are valid according to https://validator.w3.org
2020-03-05 11:38:31 +01:00
Thomas Bernard
b351db8be1
tif_fax3.h: check for buffer overflow in EXPAND2D before "calling" CLEANUP_RUNS()
...
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.
2020-03-05 10:27:04 +01:00
Thomas Bernard
535830c277
index.html: fix unclosed <tt> tag
2020-03-01 22:26:55 +01:00
Thomas Bernard
794ec1ad50
html: do not force colors (which are default anyway)
...
If needed, style should be set using CSS.
fixes #31
https://gitlab.com/libtiff/libtiff/issues/31
http://bugzilla.maptools.org/show_bug.cgi?id=2326
2020-03-01 22:25:29 +01:00
Even Rouault
25b274126d
TIFFReadCustomDirectory(): fix potential heap buffer overflow when reading a custom directory, after a regular directory where a codec was active. Fixes https://gitlab.com/libtiff/libtiff/issues/178
2020-03-01 22:22:01 +01:00
Even Rouault
18ca4b4276
Merge branch 'issue-46' into 'master'
...
fix decoding of fax4 images
Closes #46
See merge request libtiff/libtiff!110
2020-03-01 10:39:07 +00:00
Thomas Bernard
72c4acef4b
tif_fax3: better fix for CVE-2011-0192
...
There are some legitimate case which were forbidden by the previous fix
2020-03-01 00:38:59 +01:00
Thomas Bernard
02bb01750f
tif_fax3.h: allow 0 length run in DECODE2D
...
fixes #46
https://gitlab.com/libtiff/libtiff/issues/46
http://bugzilla.maptools.org/show_bug.cgi?id=2434
2020-02-29 23:30:07 +01:00
Even Rouault
bd03e1a27f
Merge branch 'mingwlibm' into 'master'
...
Don't use libm with libtiff due to conflict with libmsvcrt
See merge request libtiff/libtiff!73
2020-02-29 18:08:09 +00:00
Even Rouault
c8c5309b76
Merge branch 'Rational2DoublePrecision_correction' into 'master'
...
tif_dirwrite.c: bugfix DoubleToSrational() for plain signed integers
See merge request libtiff/libtiff!109
2020-02-29 18:04:50 +00:00
Su_Laus
30222c13d6
tif_dirwrite.c: bugfix DoubleToSrational(), which returns plain signed interger values always as unsigned rationals.
...
Add a test into rational_precision2double.c for "-1.0" and some editorials in tif_dirwrite.c.
(code is related to 6df997c786
changes).
2020-02-29 17:59:59 +01:00
Even Rouault
d04e3d26c5
Merge branch 'issue-174' into 'master'
...
tif_fax3.c: check buffer overflow in Fax4Decode()
Closes #174
See merge request libtiff/libtiff!108
2020-02-29 11:35:15 +00:00
Thomas Bernard
df38126420
Fax4Decode(): log error message in case of buffer overrun
2020-02-29 11:28:01 +01:00
Thomas Bernard
c4710ee226
tif_fax3.c: check buffer overflow in Fax4Decode()
...
fixes #174
2020-02-29 11:17:25 +01:00
Even Rouault
a6fa499e20
typo fixes in code comments
2020-02-29 01:17:17 +01:00
Even Rouault
facb37f149
ToRationalEuclideanGCD: remove useless test that confuses Coverity Scan about a potential later modulo by zero
2020-02-28 20:40:27 +01:00
Even Rouault
388a1dba72
tif_dirwrite.c: fix other warnings related to 6df997c786
changes
2020-02-27 22:02:58 +01:00
Even Rouault
721120d0d7
rational_precision2double.c: fix many warnings, and do not build it on CMake on shared lib builds
2020-02-27 22:00:41 +01:00
Even Rouault
edc16ac20a
tif_dirwrite.c: fix various warnings found when building GDAL with internal libtiff after 6df997c786
changes
2020-02-27 21:50:59 +01:00
Even Rouault
8c4b470889
tif_dirwrite.c: qualify ToRationalEuclideanGCD() with static
2020-02-27 21:30:28 +01:00
Even Rouault
27a1338723
Merge branch 'Rational2DoublePrecision' into 'master'
...
Rational with Double Precision Upgrade
See merge request libtiff/libtiff!100
2020-02-27 20:28:18 +00:00
Su_Laus
6df997c786
Rational with Double Precision Upgrade
...
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
2020-02-27 21:11:20 +01:00
Chris Degawa
16377d39ea
mingw-w64 cmake: Don't find libm
...
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.
2020-02-26 23:03:32 +00:00
Even Rouault
06d6e36187
Merge branch 'division-by-zero' into 'master'
...
tools/tiffcp.c: fix potential division by zero
See merge request libtiff/libtiff!83
2020-02-26 21:37:54 +00:00
Even Rouault
bf53c80aea
Merge branch 'fix-unused-warning' into 'master'
...
warnings: mark conditionally used parameters
See merge request libtiff/libtiff!49
2020-02-26 21:31:27 +00:00
Even Rouault
a1b7eac5e8
Merge branch 'master' into 'master'
...
fix issue #78 warnings regarding RichTIFFIPTC data type
Closes #78
See merge request libtiff/libtiff!99
2020-02-26 21:25:42 +00:00
Even Rouault
e3f0b1d894
Merge branch 'win64-handle-casts-warn-fix' into 'master'
...
Avoid warnings about casts between HANDLE and int in Win64 builds
Closes #2
See merge request libtiff/libtiff!93
2020-02-26 21:23:57 +00:00
Even Rouault
2a4d9b4fab
Merge branch 'bug2839' into 'master'
...
raw2tiff: avoid divide by 0
Closes #151
See merge request libtiff/libtiff!103
2020-02-26 21:22:26 +00:00
Even Rouault
2832b9829f
Merge branch 'bug2669' into 'master'
...
tiff2pdf: palette bound check in t2p_sample_realize_palette()
Closes #82
See merge request libtiff/libtiff!104
2020-02-26 21:21:09 +00:00
Even Rouault
e9a124f52f
Merge branch 'int-shift' into 'master'
...
tiffcrop: fix asan runtime error caused by integer promotion
See merge request libtiff/libtiff!105
2020-02-26 21:20:10 +00:00
Even Rouault
a7276b9198
Merge branch 'bug-2538' into 'master'
...
libtiff.html: fix function casing
Closes #68
See merge request libtiff/libtiff!107
2020-02-26 21:17:27 +00:00
Thomas Bernard
bdcf1add10
raw2tiff: avoid divide by 0
...
fixes #151 / http://bugzilla.maptools.org/show_bug.cgi?id=2839
first memcmp() lines before computing corellation
and always avoid divide by 0 anyway
2020-02-16 19:20:37 +01:00
Even Rouault
b4820b2179
Merge branch 'bug2855' into 'master'
...
tiff2ps: fix heap buffer read overflow in PSDataColorContig()
Closes #161
See merge request libtiff/libtiff!102
2020-02-09 13:11:39 +00:00
Thomas Bernard
8c9dca34be
libtiff.html: fix function casing
2020-02-08 18:02:15 +01:00