Go to file
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
archive Remove all $Id and $Headers comments with CVS versions 2017-11-30 18:02:46 +01:00
build build/gitlab-ci: fix typo 2019-04-03 14:56:33 +02:00
contrib add jbig support to the fuzzer 2018-10-29 11:36:13 +08:00
html Advertise https://libtiff.gitlab.io/libtiff/ as mirror 2019-02-28 13:32:27 +01:00
libtiff Make defer strile offset/bytecount loading available at runtime 2019-05-10 14:46:45 +02:00
m4 Remove and ignore files which are a product of autogen.sh 2018-11-03 09:22:11 -05:00
man Make defer strile offset/bytecount loading available at runtime 2019-05-10 14:46:45 +02:00
port snprintf porting fix for Visual Studio 2003 2018-11-18 20:25:17 -06:00
test Make defer strile offset/bytecount loading available at runtime 2019-05-10 14:46:45 +02:00
tools Merge branch 'bug2799' into 'master' 2019-05-08 08:36:34 +00:00
.appveyor.yml port: Clean up NetBSD sources and headers to build standalone 2018-03-26 14:20:21 +01:00
.gitignore Make defer strile offset/bytecount loading available at runtime 2019-05-10 14:46:45 +02:00
.gitlab-ci.yml show test-suite.log in gitlab-ci 2019-04-03 14:55:46 +02:00
.travis.yml build/gitlab-ci and build/travis-ci: add a 'make dist' step in autoconf_build() target, to check we are release-ready 2017-12-01 11:48:17 +01:00
autogen.sh * libtiff 4.0.0alpha4 released. 2009-08-27 17:40:49 +00:00
ChangeLog libtiff 4.0.10 released. 2018-11-10 09:33:11 -06:00
CMakeLists.txt Make defer strile offset/bytecount loading available at runtime 2019-05-10 14:46:45 +02:00
COMMITTERS Add myself to COMMITTERS 2014-11-19 22:26:42 +00:00
configure.ac Make defer strile offset/bytecount loading available at runtime 2019-05-10 14:46:45 +02:00
configure.com Remove all $Id and $Headers comments with CVS versions 2017-11-30 18:02:46 +01:00
COPYRIGHT
HOWTO-RELEASE HOWTO-RELEASE: Add GPG release file signing procedure. 2018-11-10 13:43:05 -06:00
HOWTO-SECURITY-RELEASE note vs in topic and mailing list url 2012-04-06 16:45:55 +00:00
libtiff-4.pc.in * libtiff-4.pc.in: Added libtiff pkg-config .pc file support. 2010-11-27 20:54:51 +00:00
Makefile.am Makefile.am: update to reflect removal of README.vms and README -> README.md 2017-11-30 18:09:43 +01:00
Makefile.vc Remove all $Id and $Headers comments with CVS versions 2017-11-30 18:02:46 +01:00
nmake.opt Remove builtin support for GUI warning and error message boxes 2018-05-25 08:42:50 +02:00
README.md README.md: use markdown syntax for hyperlinks 2017-12-01 10:52:18 +01:00
RELEASE-DATE libtiff 4.0.10 released. 2018-11-10 09:33:11 -06:00
SConstruct Remove all $Id and $Headers comments with CVS versions 2017-11-30 18:02:46 +01:00
tiff.spec Fix some typos 2018-02-24 21:47:52 +01:00
TODO Remove all $Id and $Headers comments with CVS versions 2017-11-30 18:02:46 +01:00
VERSION libtiff 4.0.10 released. 2018-11-10 09:33:11 -06:00

TIFF Software Distribution

This file is just a placeholder; all the documentation is now in HTML in the html directory. To view the documentation point your favorite WWW viewer at html/index.html;

e.g.

firefox html/index.html

If you don't have an HTML viewer then you can read the HTML source or fetch a PostScript version of this documentation from the directory

http://download.osgeo.org/libtiff/

If you can't hack either of these options then basically what you want to do is:

% ./configure
% make
% su
# make install

More information, email contacts, and mailing list information can be found online at http://www.simplesystems.org/libtiff/

Source code repository

GitLab

Bug database

Bugzilla

Silicon Graphics has seen fit to allow us to give this work away. It is free. There is no support or guarantee of any sort as to its operations, correctness, or whatever. If you do anything useful with all or parts of it you need to honor the copyright notices. I would also be interested in knowing about it and, hopefully, be acknowledged.

The legal way of saying that is:

Copyright (c) 1988-1997 Sam Leffler Copyright (c) 1991-1997 Silicon Graphics, Inc.

Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that (i) the above copyright notices and this permission notice appear in all copies of the software and related documentation, and (ii) the names of Sam Leffler and Silicon Graphics may not be used in any advertising or publicity relating to the software without the specific, prior written permission of Sam Leffler and Silicon Graphics.

THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.