| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
* Use functions rather than macros to avoid problems with variables in
conditions (since macro arguments are not variables)
* Conditionally add to file lists and test program lists based upon the
configuration options (e.g. JPEG and old-JPEG availability)
* Sync tests, files and option usage with current automake usage
|
|
|
|
| |
(tif_print.c/tiffinfo.c)
|
|
|
|
| |
-Werror=misleading-indentation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a bug caused by the `tif_lastdiroff` optimization when
rewriting directories.
Rewriting the Nth directory temporarily zeroes the pointer to it
(located in the N-1th directory) and relies on `TIFFLinkDirectory`
traversing the whole directory list to find the zeroed pointer and
linking the rewritten directory to it. Since `TIFFLinkDirectory` skips
the traversal when `tif_lastdiroff` is set, this change unsets it
to force the full traversal when rewriting a directory.
A test to catch this particular issue is also added.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a new `tif_lastdiroff` field to the TIFF data structure
and uses it to store the offset of the last written directory.
Appending a new directory required traversing the whole file
to find the last directory. By keeping track of its offset in this
new field, the search is no longer necessary.
Since this offset is only stored in-memory, the first directory
append after opening a file will have to transverse the whole
directory list. Subsequent calls will have access to the last
offset, avoiding the transversal.
|
| |
|
|
|
|
|
|
| |
The issues are in the tests and tiffcrop, not the core library. Real issues, but not high risk.
Use to test if Coverity integration is performing properly on merge.
|
|
|
|
|
|
|
|
|
|
|
| |
* Make libport an OBJECT library when in use, otherwise a dummy
INTERFACE library
* libport.h will work if getopt is present or not present. If
present, will fall back to <unistd.h>, else will define
symbols
* Add generated libport_config.h to define HAVE_GETOPT and HAVE_UNISTD_H
* dummy.c no longer needed with CMake
* libtiff/libtiffxx no longer link with libport
|
|
|
|
|
| |
Only makes sense in the context of Automake. Was carried over
for reference while porting, but is not needed.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| | |
Fix spelling mistakes.
See merge request libtiff/libtiff!183
|
| |
| |
| |
| |
| |
| |
| | |
Found with:
codespell --version
1.17.1
|
|/
|
|
| |
additonal, Varable, greather, alwasy
|
| |
|
| |
|
|
|
|
|
| |
This is needed when building for Emscripten with *both* WEBP and JPEG
support.
|
|
|
|
|
|
| |
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.
|
| |
|
|\
| |
| |
| |
| | |
EXIF 2.32 and GPS TIFF-tags and functionality upgraded.
See merge request libtiff/libtiff!91
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- 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 c8c5309b765ef4ff097d2aaffbdb8f403db8967d (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.
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
add test for fax4 decoding
See merge request libtiff/libtiff!114
|
| |/
| |
| |
| |
| |
| | |
This will check for regression on #46
https://gitlab.com/libtiff/libtiff/issues/46
http://bugzilla.maptools.org/show_bug.cgi?id=2434
|
|/
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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 6df997c786928757caea0dd68d26ea5f098f49df changes).
|
|
|
|
| |
on shared lib builds
|
|\
| |
| |
| |
| | |
Rational with Double Precision Upgrade
See merge request libtiff/libtiff!100
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| | |
CR2 files)
|
| | |
|
| | |
|
|/
|
|
| |
that bash is not required.
|
|
|
|
|
| |
it was previously the same bitwidth as unsigned char *
Pointers can be larger than size_t.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 *
|
|\
| |
| |
| |
| | |
Add TIFFDeferStrileArrayWriting() and TIFFForceStrileArrayWriting()
See merge request libtiff/libtiff!82
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
| |
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.
|
| |
|
|\
| |
| |
| |
| | |
Make defer strile offset/bytecount loading available at runtime
See merge request libtiff/libtiff!79
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
... 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.
|