Commit Graph

185 Commits

Author SHA1 Message Date
Vadim Zeitlin
193c1c7394 Create tag for v4.2.0
-----BEGIN PGP SIGNATURE-----
 
 iHUEABEIAB0WIQTr39shsCDuj9FRqI3jAQR94RmJdQUCX95KfAAKCRDjAQR94RmJ
 ddHsAP9aNuHBYnueUqBjE34GjNwgwh8rt01MrUT6qYLBomlClgD+L3Xed/AbZH6k
 k3RLq2Wyd7YPMyi6/I9FbIw5av98Dis=
 =RqwF
 -----END PGP SIGNATURE-----

Merge tag 'v4.2.0' into wx

Update to the latest upstream release and rerun autogen.sh.
2020-12-30 17:56:13 +01:00
Even Rouault
b9fa1f6e4a
test: add testdeflatelaststripextradata.sh 2020-10-16 13:40:11 +02:00
Even Rouault
c4aa76401b
Fix compiler warnings about unused variables when assert() expands to nothing 2020-10-12 19:45:51 +02:00
Attila Oláh
2b9abce31b
Also pass --shared-memory to raw_decode.
This is needed when building for Emscripten with *both* WEBP and JPEG
support.
2020-09-24 17:24:12 +00:00
Attila Oláh
433e052356
Set the --shared-memory linker flag for Emscripten builds.
This is only needed when building with WEBP support, which uses atomics,
therefore the linker needs the --shared-memory flag. The flag cannot be
added globally because not all executables link against libwebp.
2020-09-24 16:22:25 +00: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
Thomas Bernard
5f84fefcf5
ppm2tiff: Add test for 16bpc PPM 2020-03-07 11:46:20 +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
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
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
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
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
Maarten Bent
9f657ff8a7 Rerun autogen.sh 2020-01-16 21:52:35 +01:00
Maarten Bent
a55183aada Create tag for v4.1.0
-----BEGIN PGP SIGNATURE-----
 
 iHQEABEIAB0WIQTr39shsCDuj9FRqI3jAQR94RmJdQUCXb81vgAKCRDjAQR94RmJ
 dbHRAPjy7sZSwOMOGJXpE+/1q0OCWB7iWWQqy7TPb9+8HdtlAQCJXl0nJ423/DJ4
 JKmIRQXuXZ4SP33SCuh34O0VR/HX1g==
 =3q0Z
 -----END PGP SIGNATURE-----

Merge tag 'v4.1.0' into wx

Create tag for v4.1.0

# gpg verification failed.
2020-01-16 21:43:13 +01:00
Even Rouault
8192df23fa
test: add test for single-strip OJPEG file without RowsPerStrip tag (like in CR2 files) 2020-01-07 23:41:26 +01:00
Even Rouault
0356ea76ba
OJPEG: fix broken sanity check added in 4.1.0, and add two OJPEG test files 2019-11-11 23:07:57 +01:00
Even Rouault
f417f056c5
test/: add missing generated .sh files 2019-11-11 23:01:03 +01:00
Bob Friesenhahn
aeb87392ad Fax2tiff.sh needs to remove its output file in advance. Syntax changes so that bash is not required. 2019-11-03 09:55:14 -06:00
Thomas Bernard
4d26884a15
make TIFF_SSIZE_T the same bitwidth as TIFF_SIZE_T
it was previously the same bitwidth as unsigned char *
Pointers can be larger than size_t.
2019-05-31 20:10:51 +02:00
Thomas Bernard
69ce2652ef
Add test to check that libtiff types have the correct size
in configure/CMakeList.txt :

- TIFF_INT8_T/TIFF_UINT8_T is signed/unsigned char
sizeof(char)==1 in C standard
- TIFF_INT16_T/TIFF_UINT16_T is signed/unsigned short
sizeof(short)>=2 in C standard
- TIFF_INT32_T/TIFF_UINT32_T is defined so its sizeof() is 4

- TIFF_INT64_T/TIFF_UINT64_T is defined so its sizeof() is 8

- TIFF_SIZE_T is defined so it has same sizeof() than size_t

- TIFF_SSIZE_T is defined so it has same sizeof() than unsigned char *
2019-05-31 20:10:51 +02:00
Even Rouault
91480d3d3c Merge branch 'defer_strile_writing' into 'master'
Add TIFFDeferStrileArrayWriting() and TIFFForceStrileArrayWriting()

See merge request libtiff/libtiff!82
2019-05-29 20:11:57 +00:00
Even Rouault
eaeca6274a
Add TIFFDeferStrileArrayWriting() and TIFFForceStrileArrayWriting()
Those advanced writing functions must be used in a particular sequence
to make their intended effect. Their aim is to control when/where
the [Strip/Tile][Offsets/ByteCounts] arrays are written into the file.

The purpose of this is to generate 'cloud-optimized geotiff' files where
the first KB of the file only contain the IFD entries without the potentially
large strile arrays. Those are written afterwards.

The typical sequence of calls is:
TIFFOpen()
[ TIFFCreateDirectory(tif) ]
Set fields with calls to TIFFSetField(tif, ...)
TIFFDeferStrileArrayWriting(tif)
TIFFWriteCheck(tif, ...)
 TIFFWriteDirectory(tif)
 ... potentially create other directories and come back to the above directory
TIFFForceStrileArrayWriting(tif): emit the arrays at the end of file

See test/defer_strile_writing.c for a practical example.
2019-05-25 11:37:34 +02:00
Even Rouault
4e74734ded
Add TIFFReadFromUserBuffer()
This function replaces the use of TIFFReadEncodedStrip()/TIFFReadEncodedTile()
when the user can provide the buffer for the input data, for example when
he wants to avoid libtiff to read the strile offset/count values from the
[Strip|Tile][Offsets/ByteCounts] array.
2019-05-23 00:38:59 +02:00
Even Rouault
d2e2b4eeac
test/defer_strile_loading.c: fix warning with Visual C++ 2019-05-22 22:34:27 +02:00
Even Rouault
ef82728f44 Merge branch 'ondemand_strile_offbytecount_loading' into 'master'
Make defer strile offset/bytecount loading available at runtime

See merge request libtiff/libtiff!79
2019-05-21 13:46:23 +00:00
Even Rouault
371ad2658c
Make defer strile offset/bytecount loading available at runtime
... and add per-strile offset/bytecount loading capabilities.

Part of this commit makes the behaviour that was previously met when
libtiff was compiled with -DDEFER_STRILE_LOAD available for default builds
when specifying the new 'D' (Deferred) TIFFOpen() flag. In that mode, the [Tile/Strip][ByteCounts/Offsets]
arrays are only loaded when first accessed. This can speed-up the opening
of files stored on the network when just metadata retrieval is needed.
This mode has been used for years by the GDAL library when compiled with
its embeded libtiff copy.

To avoid potential out-of-tree code (typically codecs) that would use
the td_stripbytecount and td_stripoffset array inconditionnaly assuming they
have been loaded, those have been suffixed with _p (for protected). The
use of the new functions mentionned below is then recommended.

Another addition of this commit is the capability of loading only the
values of the offset/bytecount of the strile of interest instead of the
whole array. This is enabled with the new 'O' (Ondemand) flag of TIFFOpen()
(which implies 'D'). That behaviour has also been used by GDAL, which hacked
into the td_stripoffset/td_stripbytecount arrays directly. The new code
added in the _TIFFFetchStrileValue() and _TIFFPartialReadStripArray() internal
functions is mostly a port of what was in GDAL GTiff driver previously.

Related to that, the public TIFFGetStrileOffset[WithErr]() and TIFFGetStrileByteCount[WithErr]()
functions have been added to API. They are of particular interest when
using sparse files (with offset == bytecount == 0) and you want to detect
if a strile is present or not without decompressing the data, or updating
an existing sparse file.
They will also be used to enable a future enhancement where client code can entirely
skip bytecount loading in some situtations

A new test/defer_strile_loading.c test has been added to test the above
capabilities.
2019-05-10 14:46:45 +02:00
Even Rouault
458c211ae2
Creation: use SHORT type when possible for StripByteCounts/TileByteCounts
This follows the same logic as previous commit.
2019-05-10 11:08:01 +02:00
Even Rouault
b9b93f661e Merge branch 'bug2799' into 'master'
fix fax2tiff

See merge request libtiff/libtiff!55
2019-05-08 08:36:34 +00:00
Thomas Bernard
57c112bfa9
Add output check for tiff2ps
note : the reference files have been generated in master branch
2019-04-03 14:55:29 +02:00
Thomas Bernard
933575f505
add a test for fax2tiff tool 2019-03-22 10:06:01 +01:00
Maarten Bent
c70cb3d7b4 Rerun autogen.sh 2018-11-17 13:42:17 +01:00
Maarten Bent
0725740623 Create tag for v4.0.10
-----BEGIN PGP SIGNATURE-----
 
 iHUEABEIAB0WIQTr39shsCDuj9FRqI3jAQR94RmJdQUCW+b+SgAKCRDjAQR94RmJ
 dVERAQCGCSozFaK8M9k0MEgvsWcg1lMr/5VfAmUCfiLIDL7OygEAz0ZoTuYxpAxt
 gz2+JmWNlJIlseQZemczpJh5lToiXuM=
 =bMQi
 -----END PGP SIGNATURE-----

Merge tag 'v4.0.10' into wx
2018-11-17 13:24:09 +01:00
Even Rouault
4af64003c8
Fix libtiff 4.0.8 regression when reading LZW-compressed strips with scanline API
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2800
2018-08-07 11:54:27 +02:00
Vadim Zeitlin
aa65abe076 Merge remote-tracking branch 'upstream/master' into wx
Regenerate the files produced by autotools removed upstream as our build
system relies on having them.
2018-01-28 17:20:14 +01:00
Even Rouault
c56eda4b7e Remove remaining .cvsignore files 2017-12-01 15:55:10 +01:00
Even Rouault
2440a113ea Remove autoconf/automake generated files, and add them to .gitignore 2017-12-01 15:54:48 +01:00
Even Rouault
8603db6cfa Regenerate autoconf files 2017-11-30 18:10:01 +01:00
Even Rouault
f0a54a4fa0 Remove all $Id and $Headers comments with CVS versions 2017-11-30 18:02:46 +01:00
Bob Friesenhahn
45065882ae * test/Makefile.am: Add some tests for tiff2bw. 2017-11-02 13:51:22 +00:00
Bob Friesenhahn
1cb6c46b9d fax2tiff: Pass the FAX_Client_Data struct as client data 2017-10-29 18:28:43 +00:00
Even Rouault
6dac309a97 * test/Makefile.am: add missing reference to images/quad-lzw-compat.tiff
to fix "make distcheck". Patch by Roger Leigh
2017-08-28 15:43:14 +00:00
Even Rouault
abc862b594 * test/tiffcp-lzw-compat.sh, test/images/quad-lzw-compat.tiff: new files
to test old-style LZW decompression
* test/common.sh, Makefile.am, CMakeList.txt: updated with above
2017-07-11 09:20:31 +00:00
Even Rouault
222083301a * refresh autoconf/make stuff with what is on Ubuntu 16.04 (minor changes) 2017-07-11 09:10:28 +00:00
Even Rouault
f2a3b02040 * .travis.yml, build/travis-ci: new files from
0001-ci-Add-Travis-support-for-Linux-builds-with-Autoconf.patch by
Roger Leigh (sent to mailing list on 2017-06-08)
This patch adds support for the Travis-CI service.

* .appveyor.yml: new file from
0002-ci-Add-AppVeyor-support.patch by Roger Leigh (sent to mailing
list on 2017-06-08)
This patch adds a .appveyor.yml file to the top-level.  This allows
one to opt in to having a branch built on Windows with Cygwin,
MinGW and MSVC automatically when a branch is pushed to GitHub,
GitLab, BitBucket or any other supported git hosting service.

* CMakeLists.txt, test/CMakeLists.txt, test/TiffTestCommon.cmake: apply
patch 0001-cmake-Improve-Cygwin-and-MingGW-test-support.patch from Roger
Leigh (sent to mailing list on 2017-06-08)
This patch makes the CMake build system support running the tests
with MinGW or Cygwin.
2017-06-08 20:46:10 +00:00
Bob Friesenhahn
30366c9f22 * tools/Makefile.am: The libtiff tools bmp2tiff, gif2tiff,
ras2tiff, sgi2tiff, sgisv, and ycbcr are completely removed from
the distribution.  The libtiff tools rgb2ycbcr and thumbnail are
only built in the build tree for testing.  Old files are put in
new 'archive' subdirectory of the source repository, but not in
distribution archives.  These changes are made in order to lessen
the maintenance burden.
2016-06-05 19:53:59 +00:00
Bob Friesenhahn
c7ff695d1b * html/bugs.html: Replace Andrey Kiselev with Bob Friesenhahn for
purposes of security issue reporting.
2016-04-08 02:34:00 +00:00