summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Add DNG tags up to version 1.6.0.0 and some TIFF/EP tags and update ↵Su_Laus2023-04-251-1/+1
| | | | | | | | | | | documentation Amend MR !337 'Add support for DNG tags up to version 1.6.0.0 and some TIFF/EP tags' from Sami Liedes: - Set most tags to OkToChange=1. - Define BATTERYLEVEL tag as ASCII and convert values of rational variant to ASCII. - TIFF documentation updated for tags recognized by LibTiff (DNG 1.6 and others). - TIFF/EP tags added, which are equivalent to EXIF tags. This addresses part of #418 as well. - Definition of tags reformatted (clang-format off) for better readability of tag comments in tiff.h and tif_dirinfo.c
* Even faster TIFFSetDirectory() using IFD list.Su Laus2023-03-262-10/+322
|
* Optimize relative seeking with TIFFSetDirectorySu Laus2023-03-122-59/+559
|
* test (cmake): skip script tests if tools aren't builtSam James2023-02-221-81/+85
| | | | | | | | | | | In Gentoo, we avoid building the tools for multilib (32-bit, x86) builds on amd64/x86_64 because we only need the library to keep binary applications working. This causes a test failure in e.g. tiffcp-thumbnail.sh as the 'thumbnail' binary isn't built. Skip it if unavailable. Fixes: https://gitlab.com/libtiff/libtiff/-/issues/421 Signed-off-by: Sam James <sam@gentoo.org>
* test (autotools): skip script tests if tools aren't builtSam James2023-02-221-1/+6
| | | | | | | | | | In Gentoo, we avoid building the tools for multilib (32-bit, x86) builds on amd64/x86_64 because we only need the library to keep binary applications working. This causes a test failure in e.g. tiffcp-thumbnail.sh as the 'thumbnail' binary isn't built. Skip it if unavailable. Fixes: https://gitlab.com/libtiff/libtiff/-/issues/421
* test_ifd_loop_detection: fix Coverity Scan issue CID 1520750: Null pointer ↵Su_Laus2023-02-081-7/+11
| | | | dereferences (NULL_RETURNS) line 55.
* test_ifd_loop_detection: Added test to check loops in SubIFDs that are chained.Su Laus2023-02-043-0/+138
|
* Add test for Fax3 decoding issues (refs #513)Even Rouault2023-01-215-2/+27
|
* Fax3: fix failure to decode some fax3 images (fixes #513)Even Rouault2023-01-212-2/+6
| | | | Patch by @jsummers26
* Add tests for IFD loop detectionEven Rouault2022-12-136-1/+192
|
* tiffvers.h: add TIFFLIB_MAJOR_VERSION, TIFFLIB_MINOR_VERSION, ↵Even Rouault2022-12-101-0/+25
| | | | | | TIFFLIB_MICRO_VERSION defines Also add a TIFFLIB_AT_LEAST() macro
* Reformatting in test/ using 'pre-commit run'pre-commit run by Even Rouault2022-12-0821-5007/+6177
|
* Remove vim/emacs formatting footersEven Rouault2022-12-0811-29/+0
|
* Add test case for scenario of issue #489Even Rouault2022-11-293-1/+116
|
* Emit explicit error message when tif_max_single_mem_alloc is exceededEven Rouault2022-11-231-6/+45
|
* test_open_options: test TIFFOpenOptionsSetMaxSingleMemAlloc()Even Rouault2022-11-231-1/+20
|
* Rename test_error_handlers to test_open_optionsEven Rouault2022-11-233-10/+10
|
* Remove TIFFSetErrorHandlerExtR() and TIFFSetWarningHandlerExtR() that were ↵Even Rouault2022-11-211-18/+9
| | | | temporarily added in master
* Rework TIFFOpenExt() and similar to use an opaque TIFFOpenOptions* opts ↵Even Rouault2022-11-211-8/+6
| | | | argument, with alloc, free and setters
* Add TIFFOpenExt(), TIFFOpenWExt() and TIFFFdOpenExt() with re-entrant error ↵Even Rouault2022-11-213-1/+159
| | | | | | | | | | | | | handlers Rename TIFFClientOpenEx() to TIFFClientOpenExt() Rework signature of the re-entrant error handlers and of TIFFSetWarningHandlerExt() and TIFFSetErrorHandlerExt() Use structures that can be extended as extra argument. Leverages and ammends https://gitlab.com/libtiff/libtiff/-/merge_requests/409
* tiffinfo: Updated to parse through SubIFDs and show their tags.Su Laus2022-10-085-0/+4
|
* rational_precision2double.c: Fix issue from Coverity Scan.Su_Laus2022-10-061-2/+2
|
* Fix CMake build to be compatible with FetchContentJeremy Maitin-Shepard2022-10-031-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent versions of CMake have improved support for including dependencies, using the FetchContent module, which allows a dependency to be imported as a subproject and then later found automatically by calls to `find_package`. This change makes libtiff's CMake better behaved when used as a sub-project: - CMake has a single global namespace for all target names in all sub-projects. This commit renames the following CMake targets: - port -> tiff_port - mkg3states -> tiff_mkg3states - faxtable -> tiff_faxtable - release -> tiff_release - When building TIFF as a sub-project, it is not normally useful to create install rules for its targets. This commit adds a `tiff-install` option that controls whether the install rules are added and defaults to OFF when libtiff is included as a sub-project. - Previously, libtiff set `BUILD_SHARED_LIBS` to ON by default. With this commit, that default is only set if libtiff is the top-level project. - When using `find_package(TIFF)`, the targets `TIFF::TIFF` and `TIFF::CXX` are defined. This commit makes libtiff itself define those targets as aliases, to allow other cmake projects to use either `find_package` or `FetchContent` interchangeably. - Adds ZSTD_HAVE_DECOMPRESS_STREAM variable which may be set to bypass `check_symbol_exists` call. Fixes https://gitlab.com/libtiff/libtiff/-/issues/472.
* build: Make rational2double static only for automakeRoger Leigh2022-06-241-2/+11
| | | | This copies the same logic as used by CMake.
* Add options for disabling tools, tests, contrib and docsRoger Leigh2022-05-291-0/+4
|
* cmake: allow running the tests with a read-only source directoryAlex Richardson2022-05-151-1/+3
| | | | | | | | | | | | | | Prior to this commit CTest would invoke all simple_tests tests with the current working directory set to the source directory. However, some of the tests (e.g. rewrite) will output files to the current working directory and will therefore fail when run with a read-only source directory. This can happen e.g. when testing a cross-compiled version of libtiff where the sources are mounted read-only in the virtual machine. Simply changing the working directory to CMAKE_CURRENT_BINARY_DIR allows all but raw_decode to pass. The raw_decode test looks for files in the source directory, and uses the `srcdir` environment variable to find, so we also have to add a set_tests_properties() call to specify that env var.
* test_signed_tags.c: fix CID 1504376Even Rouault2022-05-101-2/+1
|
* Reading of signed tags added (fixes #40)Su Laus2022-05-083-1/+357
|
* Fix some CMake warningsSu Laus2022-03-171-2/+2
|
* Predictor 2 (horizontal differenciation): support 64-bitEven Rouault2022-02-094-0/+4
| | | | | | There's no reason not to support 64-bit. The TIFF 6 specification doesn't say anything about that (and even mention 4-bit, which we don't support)
* Fix Coverity Scan report issues for custom_dir_EXIF_231.c and test_directory.cSu Laus2022-02-082-16/+33
|
* Correct CMake testingcmake-testRoger Leigh2022-01-233-155/+134
| | | | | | | | * 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
* Fix Segmentation fault printing GPS directory if Altitude tag is present ↵Su Laus2021-11-263-1/+4
| | | | (tif_print.c/tiffinfo.c)
* test/rational_precision2double.c: add missing curly braces to fix ↵Even Rouault2021-09-061-1/+2
| | | | -Werror=misleading-indentation
* tif_dirwrite.c: Fix TIFFRewriteDirectory discarding directoriesFacundo Tuesca2021-09-051-15/+100
| | | | | | | | | | | | | | 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.
* test_directory.c: fix compiler warningsEven Rouault2021-09-011-1/+8
|
* Add field to keep track of last written directoryFacundo Tuesca2021-08-283-2/+247
| | | | | | | | | | | | | | 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.
* Fix build with CMake 3.10Kai Pastor2021-07-041-12/+12
|
* Fix high-impact Coverity issues (resource leaks).Roger Leigh2021-03-071-2/+12
| | | | | | 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.
* libport: Adjust header and library to only define and link if requiredRoger Leigh2021-02-081-24/+36
| | | | | | | | | | | * 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
* cmake: Remove unnecessary extra_dist usageRoger Leigh2021-02-081-5/+0
| | | | | Only makes sense in the context of Automake. Was carried over for reference while porting, but is not needed.
* custom_dir_EXIF_231: Remove case statement fallthroughRoger Leigh2021-02-061-98/+124
|
* custom_dir_EXIF_231: Correct use of strncpyRoger Leigh2021-02-061-1/+2
|
* Correct include orderRoger Leigh2021-02-061-2/+1
|
* ascii_tag: Use PRI format flags and remove unnecessary castsRoger Leigh2021-01-271-4/+4
|
* check_tag: Use PRI format flags and remove unnecessary castsRoger Leigh2021-01-271-12/+12
|
* custom_dir_EXIF_231: Use PRI format flags and remove unnecessary castsRoger Leigh2021-01-271-2/+2
|
* short_tag: Use PRI format flags and remove unnecessary castsRoger Leigh2021-01-271-4/+4
|
* strip_rw: Use PRI format flags and remove unnecessary castsRoger Leigh2021-01-271-15/+15
|
* Use standard C99 integer typesRoger Leigh2021-01-2112-117/+116
|