Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5fe20d0e9a | ||
|
|
56dc5d3643 | ||
|
|
cbdd9d2125 | ||
|
|
b143627531 | ||
|
|
57dd777d7f | ||
|
|
dbe6a90580 | ||
|
|
8e6f386c49 | ||
|
|
e159dadb88 | ||
|
|
e9d46c62f8 | ||
|
|
09f53a86cf | ||
|
|
88cf9dbb48 | ||
|
|
0511296c94 | ||
|
|
a061d98081 | ||
|
|
9401a882aa | ||
|
|
4d28af5fe6 | ||
|
|
515e4f2bc2 | ||
|
|
62f39af062 | ||
|
|
072957460f | ||
|
|
0ac97aa7a5 | ||
|
|
a0b623c780 | ||
|
|
b9907aa479 | ||
|
|
a566b83b13 | ||
|
|
4eb791fea0 | ||
|
|
85f2ac8e0b | ||
|
|
6dcd2c25ee | ||
|
|
c2b7837a8c | ||
|
|
f5c18577de | ||
|
|
c7ea716f16 | ||
|
|
0ce7d7766c | ||
|
|
ed141286a3 | ||
|
|
bac73dc5ca | ||
|
|
b4da2ac82f | ||
|
|
6ba36f159f | ||
|
|
67c1cab666 | ||
|
|
e92f761ea4 | ||
|
|
e34eaa8eff | ||
|
|
d2dc308fdc | ||
|
|
6086925a5b | ||
|
|
c5cccfb4f6 | ||
|
|
5e11d05c18 | ||
|
|
4011893a4e | ||
|
|
e1d3346169 | ||
|
|
02c6feb42b | ||
|
|
4d8c7527d3 | ||
|
|
8635958dc7 | ||
|
|
6816940248 | ||
|
|
e54aa4b57f | ||
|
|
e8de4dc1f9 | ||
|
|
803d8dbec5 | ||
|
|
118805c02f | ||
|
|
a7590ca213 | ||
|
|
292a2490b2 | ||
|
|
0f5b81947b | ||
|
|
e47dce81cd | ||
|
|
d1c0719e00 | ||
|
|
3e0dcf0ec6 | ||
|
|
14da830be4 | ||
|
|
ecbe2cf216 | ||
|
|
8aac9d95af | ||
|
|
e75f78c141 | ||
|
|
67fd283d27 | ||
|
|
0a3bfa04a9 | ||
|
|
7d65dfe021 | ||
|
|
2fe99e10f1 | ||
|
|
a4310ab85e | ||
|
|
25880744f3 | ||
|
|
fe10872e53 | ||
|
|
ecc4ddbf1f | ||
|
|
ce46f002ec | ||
|
|
ff5997ea12 | ||
|
|
89eecc280f | ||
|
|
0b80e677a2 | ||
|
|
78397815cd | ||
|
|
babfe37160 | ||
|
|
c312774121 | ||
|
|
a16c51a28e | ||
|
|
3994cf3b3b | ||
|
|
1d594d5fc1 | ||
|
|
b4c5eb7e17 | ||
|
|
9daf3da323 | ||
|
|
2bf2848cf5 | ||
|
|
01089de169 | ||
|
|
ffad0bc578 | ||
|
|
56f641129c | ||
|
|
bf73d790f7 | ||
|
|
503219da43 | ||
|
|
82b8411c8c | ||
|
|
a5a163f06a | ||
|
|
fa06f02aab | ||
|
|
0fcd2a642b | ||
|
|
dd3def4006 | ||
|
|
0272e97d06 | ||
|
|
0d6509eb70 | ||
|
|
d71308116f | ||
|
|
3a081531ba | ||
|
|
639a014af9 | ||
|
|
88895cd02b | ||
|
|
d5711831e5 | ||
|
|
ec20ee993a | ||
|
|
13d41b167f | ||
|
|
9315cc3397 | ||
|
|
142f912a69 | ||
|
|
fe5a2810de | ||
|
|
ea0dc4a8f2 | ||
|
|
03b66fd95f | ||
|
|
698115e819 | ||
|
|
6fd6986c09 | ||
|
|
33433b0090 | ||
|
|
25f53b9933 | ||
|
|
3016bce2c3 | ||
|
|
05c9a45472 | ||
|
|
4e1b837946 | ||
|
|
e9cb627e29 | ||
|
|
8bd0d494b8 | ||
|
|
c082666e17 | ||
|
|
bcf7eac34d | ||
|
|
e5be40ee28 | ||
|
|
aad5b70b37 | ||
|
|
f308b319be | ||
|
|
8164e15eec | ||
|
|
4622d2f5a3 | ||
|
|
6c8b10ca3f | ||
|
|
1d277003a0 | ||
|
|
df2764ca3f | ||
|
|
efadbbd874 | ||
|
|
38efe34ede | ||
|
|
2d9071e849 | ||
|
|
1625c3114b | ||
|
|
14b2d89909 | ||
|
|
4333ed5dd5 | ||
|
|
250bd8afce | ||
|
|
0c732d9c0a | ||
|
|
fcd4c86c49 | ||
|
|
f3a6521f45 | ||
|
|
e00ac465d1 | ||
|
|
0d70d63634 | ||
|
|
4ac1b20576 | ||
|
|
042d50e1b3 | ||
|
|
673347a742 | ||
|
|
fc963427c3 | ||
|
|
c4fc25bdcc | ||
|
|
7eace5c973 | ||
|
|
f515f425e1 | ||
|
|
f6f1391bab | ||
|
|
2c467d30af | ||
|
|
0aea4676e8 | ||
|
|
e6bc557f1d | ||
|
|
9e8897b5ed | ||
|
|
81375b4afe | ||
|
|
e6f3d60187 | ||
|
|
c474fb8a4e | ||
|
|
1b9252f152 | ||
|
|
f12dfbd463 | ||
|
|
6885ac0a3c | ||
|
|
280232e02b | ||
|
|
2e7cbc82e5 | ||
|
|
59fe2f3c8d | ||
|
|
a8e96e6504 | ||
|
|
ead511b2c9 | ||
|
|
1131c06841 | ||
|
|
cf020332ec | ||
|
|
2b6b70183d | ||
|
|
7b22c1d92b | ||
|
|
ae8538435b | ||
|
|
520b0de907 | ||
|
|
da0fde79d6 | ||
|
|
fc202ff1df | ||
|
|
c1d998262a | ||
|
|
e8233c42f2 | ||
|
|
ea6f6bd7bc | ||
|
|
97aa7f403e | ||
|
|
43e154894d | ||
|
|
382a2eb68d | ||
|
|
50d393086d | ||
|
|
2d80b3bf89 | ||
|
|
0faef2b82d | ||
|
|
7cc3a06c28 | ||
|
|
634bce6706 | ||
|
|
81435b7fa3 | ||
|
|
43eb249300 | ||
|
|
be8466a442 | ||
|
|
0dbcfc5bd2 | ||
|
|
d1279f0f9c | ||
|
|
e8ef85398f | ||
|
|
106593b350 | ||
|
|
3dddadcda3 | ||
|
|
631897af01 | ||
|
|
2ebfffb0e8 | ||
|
|
7be20ccaab | ||
|
|
f29d27bc9e | ||
|
|
340834ac68 | ||
|
|
dc769d5871 | ||
|
|
ce85ec85f0 | ||
|
|
5a4e05aad2 | ||
|
|
de441ecdaa |
+22
-4
@@ -24,10 +24,15 @@
|
||||
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||
# OF THIS SOFTWARE.
|
||||
|
||||
cmake_minimum_required(VERSION 3.9.0)
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
# Default policy is from 3.9.0
|
||||
cmake_policy(VERSION 3.9.0)
|
||||
# Default policy is from 3.10
|
||||
cmake_policy(VERSION 3.10)
|
||||
|
||||
if(POLICY CMP0074)
|
||||
# Allow find_package() to use the ZLIB_ROOT variable, if available.
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
endif()
|
||||
|
||||
# Find CMake modules in cmake/
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
|
||||
@@ -50,6 +55,13 @@ else()
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set(TIFF_STATIC_LIBS_DEFAULT FALSE)
|
||||
else()
|
||||
set(TIFF_STATIC_LIBS_DEFAULT TRUE)
|
||||
endif()
|
||||
|
||||
option(tiff-static "build TIFF static libraries" ${TIFF_STATIC_LIBS_DEFAULT})
|
||||
option(tiff-tools "build TIFF tools" ON)
|
||||
option(tiff-tests "build TIFF tests" ON)
|
||||
option(tiff-contrib "build TIFF contrib" ON)
|
||||
@@ -57,6 +69,12 @@ option(tiff-docs "build TIFF documentation" ON)
|
||||
option(tiff-deprecated "build TIFF deprecated features" OFF)
|
||||
option(tiff-install "install TIFF targets" ${TIFF_INSTALL_DEFAULT})
|
||||
|
||||
if (tiff-static)
|
||||
set(TIFF_BUILD_LIB_VALUE STATIC)
|
||||
else()
|
||||
set(TIFF_BUILD_LIB_VALUE SHARED)
|
||||
endif()
|
||||
|
||||
# Disable deprecated features to ensure clean build
|
||||
if (tiff-deprecated)
|
||||
add_definitions(-DTIFF_DISABLE_DEPRECATED)
|
||||
@@ -225,7 +243,7 @@ message(STATUS " LZMA2 support: Requested:${lzma} Availabi
|
||||
message(STATUS " ZSTD support: Requested:${zstd} Availability:${ZSTD_USABLE} Support:${ZSTD_SUPPORT}")
|
||||
message(STATUS " WEBP support: Requested:${webp} Availability:${WebP_FOUND} Support:${WEBP_SUPPORT}")
|
||||
message(STATUS "")
|
||||
message(STATUS " C++ support: ${cxx} (requested) ${CXX_SUPPORT} (availability)")
|
||||
message(STATUS " C++ support: ${tiff-cxx} (requested) ${CXX_SUPPORT} (availability)")
|
||||
message(STATUS "")
|
||||
# message(STATUS " X Athena Widgets support: ${HAVE_XAW}")
|
||||
message(STATUS " OpenGL support: Requested:${tiff-opengl} Availability:${HAVE_OPENGL} Support:${OPENGL_SUPPORT}")
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ Notes on releasing.
|
||||
3. Create doc/releases/vX.X.rst and add it to git with 'git add doc/releases/vX.X.rst'.
|
||||
Update doc/releases/index.rst to point to the new file
|
||||
Take ChangeLog entries and rst-ify in there.
|
||||
Easist thing to do is take doc/releases/vX.(X-1).rst and use it as a template.
|
||||
Easiest thing to do is take doc/releases/vX.(X-1).rst and use it as a template.
|
||||
|
||||
4. Add vX.X.rst file to the list of 'rst_sources' files in the doc/Makefile.am.
|
||||
|
||||
|
||||
+26
@@ -21,3 +21,29 @@ 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.
|
||||
|
||||
# Lempel-Ziv & Welch Compression (tif_lzw.c) license
|
||||
The code of tif_lzw.c is derived from the compress program whose code is
|
||||
derived from software contributed to Berkeley by James A. Woods,
|
||||
derived from original work by Spencer Thomas and Joseph Orost.
|
||||
|
||||
The original Berkeley copyright notice appears below in its entirety:
|
||||
|
||||
Copyright (c) 1985, 1986 The Regents of the University of California.
|
||||
All rights reserved.
|
||||
|
||||
This code is derived from software contributed to Berkeley by
|
||||
James A. Woods, derived from original work by Spencer Thomas
|
||||
and Joseph Orost.
|
||||
|
||||
Redistribution and use in source and binary forms are permitted
|
||||
provided that the above copyright notice and this paragraph are
|
||||
duplicated in all such forms and that any documentation,
|
||||
advertising materials, and other materials related to such
|
||||
distribution and use acknowledge that the software was developed
|
||||
by the University of California, Berkeley. The name of the
|
||||
University may not be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
20240911
|
||||
20250911
|
||||
|
||||
+7
-15
@@ -4,27 +4,19 @@ retval=0
|
||||
|
||||
set -x
|
||||
|
||||
case `uname` in
|
||||
Darwin*)
|
||||
glibtoolize --force --copy || retval=$?
|
||||
;;
|
||||
*)
|
||||
libtoolize --force --copy || retval=$?
|
||||
;;
|
||||
esac
|
||||
aclocal -I ./m4 || retval=$?
|
||||
autoheader || retval=$?
|
||||
automake --foreign --add-missing --copy || retval=$?
|
||||
autoconf || retval=$?
|
||||
autoreconf --install --force || retval=$?
|
||||
|
||||
# Get latest config.guess and config.sub from upstream master since
|
||||
# these are often out of date.
|
||||
# these are often out of date. This requires network connectivity and
|
||||
# sometimes the site is down, a failure here does not result in
|
||||
# failure of the whole script.
|
||||
for file in config.guess config.sub
|
||||
do
|
||||
echo "$0: getting $file..."
|
||||
wget -q --timeout=5 -O config/$file.tmp \
|
||||
wget --timeout=5 -O config/$file.tmp \
|
||||
"https://git.savannah.gnu.org/cgit/config.git/plain/${file}" \
|
||||
&& mv -f config/$file.tmp config/$file \
|
||||
&& chmod a+x config/$file || retval=$?
|
||||
&& chmod a+x config/$file
|
||||
rm -f config/$file.tmp
|
||||
done
|
||||
|
||||
|
||||
@@ -4,4 +4,5 @@ project(test)
|
||||
find_package(Tiff CONFIG REQUIRED)
|
||||
|
||||
add_executable(test test.c)
|
||||
set_target_properties(test PROPERTIES LINKER_LANGUAGE CXX)
|
||||
target_link_libraries(test PRIVATE TIFF::tiff)
|
||||
|
||||
@@ -5,4 +5,5 @@ find_package(Tiff CONFIG REQUIRED)
|
||||
|
||||
add_executable(test test.c)
|
||||
target_include_directories(test PRIVATE ${TIFF_INCLUDE_DIR})
|
||||
set_target_properties(test PROPERTIES LINKER_LANGUAGE CXX)
|
||||
target_link_libraries(test PRIVATE ${TIFF_LIBRARIES})
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
# OF THIS SOFTWARE.
|
||||
|
||||
# C++ support
|
||||
option(cxx "Enable C++ stream API building (requires C++ compiler)" ON)
|
||||
option(tiff-cxx "Enable C++ stream API building (requires C++ compiler)" ON)
|
||||
set(CXX_SUPPORT FALSE)
|
||||
if (cxx)
|
||||
if (tiff-cxx)
|
||||
enable_language(CXX)
|
||||
set(CXX_SUPPORT TRUE)
|
||||
endif()
|
||||
|
||||
@@ -40,7 +40,7 @@ if (old-jpeg AND JPEG_SUPPORT)
|
||||
endif()
|
||||
|
||||
if (JPEG_SUPPORT)
|
||||
# Check for jpeg12_read_scanlines() which has been added in libjpeg-turbo 2.2
|
||||
# Check for jpeg12_read_scanlines() which has been added in libjpeg-turbo 3.0
|
||||
# for dual 8/12 bit mode.
|
||||
include(CheckCSourceCompiles)
|
||||
include(CMakePushCheckState)
|
||||
|
||||
@@ -25,8 +25,12 @@
|
||||
|
||||
# libLerc
|
||||
set(LERC_SUPPORT FALSE)
|
||||
set(LERC_STATIC FALSE)
|
||||
find_package(LERC)
|
||||
option(lerc "use libLerc (required for LERC compression)" ${LERC_FOUND})
|
||||
if (lerc AND LERC_FOUND AND ZIP_SUPPORT)
|
||||
set(LERC_SUPPORT TRUE)
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
set(LERC_STATIC TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -39,7 +39,12 @@ VERS_2 {
|
||||
} VERS_1;
|
||||
")
|
||||
set(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
|
||||
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
|
||||
if (CMAKE_VERSION GREATER_EQUAL 3.29 AND CMAKE_C_COMPILER_LINKER_ID STREQUAL "LLD" AND CMAKE_C_COMPILER_LINKER_VERSION GREATER_EQUAL 17)
|
||||
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} -Wl,--undefined-version "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
|
||||
else()
|
||||
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
|
||||
endif()
|
||||
|
||||
check_c_source_compiles("int main(void){return 0;}" HAVE_LD_VERSION_SCRIPT)
|
||||
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
|
||||
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
|
||||
|
||||
@@ -29,7 +29,9 @@ include(TestBigEndian)
|
||||
# CPU endianness
|
||||
test_big_endian(HOST_BIG_ENDIAN)
|
||||
if(HOST_BIG_ENDIAN)
|
||||
add_definitions(-DWORDS_BIGENDIAN)
|
||||
set(WORDS_BIGENDIAN TRUE)
|
||||
else()
|
||||
set(WORDS_BIGENDIAN FALSE)
|
||||
endif()
|
||||
|
||||
# IEEE floating point
|
||||
|
||||
+14
-19
@@ -24,8 +24,8 @@ dnl OF THIS SOFTWARE.
|
||||
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.64)
|
||||
AC_INIT([LibTIFF Software],[4.7.0],[tiff@lists.osgeo.org],[tiff])
|
||||
AC_PREREQ([2.69])
|
||||
AC_INIT([LibTIFF Software],[4.7.1],[tiff@lists.osgeo.org],[tiff])
|
||||
AC_CONFIG_AUX_DIR(config)
|
||||
AC_CONFIG_MACRO_DIR(m4)
|
||||
AC_LANG(C)
|
||||
@@ -41,7 +41,7 @@ dnl Versioning.
|
||||
dnl Don't fill the ALPHA_VERSION field, if not applicable.
|
||||
LIBTIFF_MAJOR_VERSION=4
|
||||
LIBTIFF_MINOR_VERSION=7
|
||||
LIBTIFF_MICRO_VERSION=0
|
||||
LIBTIFF_MICRO_VERSION=1
|
||||
LIBTIFF_ALPHA_VERSION=
|
||||
LIBTIFF_VERSION=$LIBTIFF_MAJOR_VERSION.$LIBTIFF_MINOR_VERSION.$LIBTIFF_MICRO_VERSION$LIBTIFF_ALPHA_VERSION
|
||||
dnl This (LIBTIFF_RELEASE_DATE) is used to set the #define TIFFLIB_VERSION in tiffvers.h.
|
||||
@@ -77,9 +77,9 @@ dnl 5. If any interfaces have been added since the last public release, then
|
||||
dnl increment age.
|
||||
dnl 6. If any interfaces have been removed since the last public release,
|
||||
dnl then set age to 0.
|
||||
LIBTIFF_CURRENT=7
|
||||
LIBTIFF_CURRENT=8
|
||||
LIBTIFF_REVISION=0
|
||||
LIBTIFF_AGE=1
|
||||
LIBTIFF_AGE=2
|
||||
LIBTIFF_VERSION_INFO=$LIBTIFF_CURRENT:$LIBTIFF_REVISION:$LIBTIFF_AGE
|
||||
|
||||
# This is a special hack for OpenBSD and MirOS systems. The dynamic linker
|
||||
@@ -104,8 +104,8 @@ AC_SUBST(LIBTIFF_VERSION_INFO)
|
||||
AC_SUBST(LIBTIFF_RELEASE_DATE)
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC_C99
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O # Necessary if objects are placed in subdirectories.
|
||||
|
||||
dnl We want warnings. As many warnings as possible.
|
||||
VL_PROG_CC_WARNINGS()
|
||||
@@ -192,7 +192,7 @@ AC_C_CONST
|
||||
AC_C_BIGENDIAN
|
||||
AC_TYPE_OFF_T
|
||||
AC_TYPE_SIZE_T
|
||||
AC_HEADER_TIME
|
||||
|
||||
AC_STRUCT_TM
|
||||
|
||||
dnl If the `fseeko' function is available, define `HAVE_FSEEKO'. Define
|
||||
@@ -614,12 +614,12 @@ dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_ARG_ENABLE(old-jpeg,
|
||||
AS_HELP_STRING([--disable-old-jpeg],
|
||||
[disable support for Old JPEG compresson (read-only, enabled by default)]),
|
||||
[disable support for Old JPEG compression (read-only, enabled by default)]),
|
||||
[HAVE_OJPEG=${enableval}], [HAVE_OJPEG=yes])
|
||||
|
||||
if test "$HAVE_JPEG" = "yes" -a "$HAVE_OJPEG" = "yes" ; then
|
||||
AC_DEFINE(OJPEG_SUPPORT, 1,
|
||||
[Support Old JPEG compresson (read-only)])
|
||||
[Support Old JPEG compression (read-only)])
|
||||
else
|
||||
HAVE_OJPEG=no
|
||||
fi
|
||||
@@ -687,14 +687,6 @@ dnl Check for liblerc.
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
HAVE_LERC=no
|
||||
STATIC_LERC=no
|
||||
|
||||
if test "$enable_static" = "no"; then
|
||||
static_lerc=no
|
||||
else
|
||||
static_lerc=yes
|
||||
fi
|
||||
AM_CONDITIONAL([STATIC_LERC], [ test "$static_lerc" = yes ])
|
||||
|
||||
AC_ARG_ENABLE(lerc,
|
||||
AS_HELP_STRING([--disable-lerc],
|
||||
@@ -746,6 +738,9 @@ if test "$HAVE_LERC" = "yes" ; then
|
||||
LIBDIR="-R $with_lerc_lib_dir $LIBDIR"
|
||||
fi
|
||||
|
||||
if test "$enable_static" != "no"; then
|
||||
AC_DEFINE([LERC_STATIC], 1, [Define to 1 when building a static libtiff with LERC enabled.])
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(HAVE_LERC, test "$HAVE_LERC" = 'yes')
|
||||
@@ -1262,7 +1257,7 @@ LOC_MSG([ Pixar log-format algorithm: ${HAVE_PIXARLOG}])
|
||||
LOC_MSG([ JPEG support: ${HAVE_JPEG}])
|
||||
LOC_MSG([ Old JPEG support: ${HAVE_OJPEG}])
|
||||
if test "$HAVE_JPEGTURBO_DUAL_MODE_8_12" = "yes"; then
|
||||
LOC_MSG([ JPEG 8/12 bit dual mode: ${HAVE_JPEGTURBO_DUAL_MODE_8_12} (libjpeg turbo >= 2.2 dual mode)])
|
||||
LOC_MSG([ JPEG 8/12 bit dual mode: ${HAVE_JPEGTURBO_DUAL_MODE_8_12} (libjpeg turbo >= 3.0 dual mode)])
|
||||
else
|
||||
LOC_MSG([ JPEG 8/12 bit dual mode: ${HAVE_JPEG12}])
|
||||
fi
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
# OF THIS SOFTWARE.
|
||||
|
||||
add_executable(addtiffo addtiffo.c tif_overview.c tif_ovrcache.c tif_ovrcache.h)
|
||||
set_target_properties(addtiffo PROPERTIES LINKER_LANGUAGE CXX)
|
||||
target_link_libraries(addtiffo tiff tiff_port)
|
||||
|
||||
if(WEBP_SUPPORT AND EMSCRIPTEN)
|
||||
|
||||
@@ -165,7 +165,7 @@ uint32_t TIFF_WriteOverview(TIFF *hTIFF, uint32_t nXSize, uint32_t nYSize,
|
||||
|
||||
TIFFSetSubDirectory(hTIFF, nBaseDirOffset);
|
||||
|
||||
return nOffset;
|
||||
return (uint32_t)nOffset;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
@@ -617,6 +617,8 @@ void TIFF_ProcessFullResBlock(TIFF *hTIFF, int nPlanarConfig, int bSubsampled,
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Silence Coverity Scan warning about checking return. */
|
||||
/* coverity[check_return:SUPPRESS] */
|
||||
TIFFReadEncodedStrip(
|
||||
hTIFF, TIFFComputeStrip(hTIFF, nSYOff, (tsample_t)iSample),
|
||||
pabySrcTile, TIFFStripSize(hTIFF));
|
||||
|
||||
@@ -100,9 +100,9 @@ TIFFOvrCache *TIFFCreateOvrCache(TIFF *hTIFF, toff_t nDirOffset)
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
psCache->pabyRow1Blocks =
|
||||
(unsigned char *)_TIFFmalloc(psCache->nBytesPerRow);
|
||||
(unsigned char *)_TIFFmalloc((tmsize_t)psCache->nBytesPerRow);
|
||||
psCache->pabyRow2Blocks =
|
||||
(unsigned char *)_TIFFmalloc(psCache->nBytesPerRow);
|
||||
(unsigned char *)_TIFFmalloc((tmsize_t)psCache->nBytesPerRow);
|
||||
|
||||
if (psCache->pabyRow1Blocks == NULL || psCache->pabyRow2Blocks == NULL)
|
||||
{
|
||||
@@ -118,8 +118,8 @@ TIFFOvrCache *TIFFCreateOvrCache(TIFF *hTIFF, toff_t nDirOffset)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
_TIFFmemset(psCache->pabyRow1Blocks, 0, psCache->nBytesPerRow);
|
||||
_TIFFmemset(psCache->pabyRow2Blocks, 0, psCache->nBytesPerRow);
|
||||
_TIFFmemset(psCache->pabyRow1Blocks, 0, (tmsize_t)psCache->nBytesPerRow);
|
||||
_TIFFmemset(psCache->pabyRow2Blocks, 0, (tmsize_t)psCache->nBytesPerRow);
|
||||
|
||||
psCache->nBlockOffset = 0;
|
||||
|
||||
@@ -153,20 +153,78 @@ static void TIFFWriteOvrRow(TIFFOvrCache *psCache)
|
||||
/* -------------------------------------------------------------------- */
|
||||
if (TIFFIsByteSwapped(psCache->hTIFF))
|
||||
{
|
||||
uint64_t n;
|
||||
if (psCache->nBitsPerPixel == 16)
|
||||
{
|
||||
n = (psCache->nBytesPerBlock * psCache->nSamples) / 2;
|
||||
#ifdef SIZEOF_SIZE_T
|
||||
#if SIZEOF_SIZE_T <= 4
|
||||
if (n > INT32_MAX)
|
||||
#else
|
||||
if (n > INT64_MAX)
|
||||
#endif
|
||||
#else
|
||||
#pragma message( \
|
||||
"---- Error: SIZEOF_SIZE_T not defined. Generate a compile error. ----")
|
||||
SIZEOF_SIZE_T
|
||||
#endif
|
||||
{
|
||||
TIFFErrorExt(TIFFClientdata(psCache->hTIFF),
|
||||
"TIFFWriteOvrRow()",
|
||||
"Integer overflow of number of 'short' to swap");
|
||||
n = 0;
|
||||
}
|
||||
TIFFSwabArrayOfShort((uint16_t *)psCache->pabyRow1Blocks,
|
||||
(psCache->nBytesPerBlock * psCache->nSamples) /
|
||||
2);
|
||||
(tmsize_t)n);
|
||||
}
|
||||
|
||||
else if (psCache->nBitsPerPixel == 32)
|
||||
{
|
||||
n = (psCache->nBytesPerBlock * psCache->nSamples) / 4;
|
||||
#ifdef SIZEOF_SIZE_T
|
||||
#if SIZEOF_SIZE_T <= 4
|
||||
if (n > INT32_MAX)
|
||||
#else
|
||||
if (n > INT64_MAX)
|
||||
#endif
|
||||
#else
|
||||
#pragma message( \
|
||||
"---- Error: SIZEOF_SIZE_T not defined. Generate a compile error. ----")
|
||||
SIZEOF_SIZE_T
|
||||
#endif
|
||||
{
|
||||
TIFFErrorExt(TIFFClientdata(psCache->hTIFF),
|
||||
"TIFFWriteOvrRow()",
|
||||
"Integer overflow of number of 'long' to swap");
|
||||
n = 0;
|
||||
}
|
||||
TIFFSwabArrayOfLong((uint32_t *)psCache->pabyRow1Blocks,
|
||||
(psCache->nBytesPerBlock * psCache->nSamples) /
|
||||
4);
|
||||
(tmsize_t)n);
|
||||
}
|
||||
|
||||
else if (psCache->nBitsPerPixel == 64)
|
||||
TIFFSwabArrayOfDouble(
|
||||
(double *)psCache->pabyRow1Blocks,
|
||||
(psCache->nBytesPerBlock * psCache->nSamples) / 8);
|
||||
{
|
||||
n = (psCache->nBytesPerBlock * psCache->nSamples) / 8;
|
||||
#ifdef SIZEOF_SIZE_T
|
||||
#if SIZEOF_SIZE_T <= 4
|
||||
if (n > INT32_MAX)
|
||||
#else
|
||||
if (n > INT64_MAX)
|
||||
#endif
|
||||
#else
|
||||
#pragma message( \
|
||||
"---- Error: SIZEOF_SIZE_T not defined. Generate a compile error. ----")
|
||||
SIZEOF_SIZE_T
|
||||
#endif
|
||||
{
|
||||
TIFFErrorExt(TIFFClientdata(psCache->hTIFF),
|
||||
"TIFFWriteOvrRow()",
|
||||
"Integer overflow of number of 'double' to swap");
|
||||
n = 0;
|
||||
}
|
||||
TIFFSwabArrayOfDouble((double *)psCache->pabyRow1Blocks,
|
||||
(tmsize_t)n);
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
@@ -262,7 +320,7 @@ static void TIFFWriteOvrRow(TIFFOvrCache *psCache)
|
||||
psCache->pabyRow1Blocks = psCache->pabyRow2Blocks;
|
||||
psCache->pabyRow2Blocks = pabyData;
|
||||
|
||||
_TIFFmemset(pabyData, 0, psCache->nBytesPerRow);
|
||||
_TIFFmemset(pabyData, 0, (tmsize_t)psCache->nBytesPerRow);
|
||||
|
||||
psCache->nBlockOffset++;
|
||||
|
||||
@@ -286,7 +344,7 @@ unsigned char *TIFFGetOvrBlock(TIFFOvrCache *psCache, int iTileX, int iTileY,
|
||||
int iSample)
|
||||
|
||||
{
|
||||
long nRowOffset;
|
||||
toff_t nRowOffset;
|
||||
|
||||
if (iTileY > psCache->nBlockOffset + 1)
|
||||
TIFFWriteOvrRow(psCache);
|
||||
@@ -318,7 +376,7 @@ unsigned char *TIFFGetOvrBlock_Subsampled(TIFFOvrCache *psCache, int iTileX,
|
||||
int iTileY)
|
||||
|
||||
{
|
||||
int nRowOffset;
|
||||
toff_t nRowOffset;
|
||||
|
||||
if (iTileY > psCache->nBlockOffset + 1)
|
||||
TIFFWriteOvrRow(psCache);
|
||||
|
||||
@@ -23,15 +23,19 @@
|
||||
# OF THIS SOFTWARE.
|
||||
|
||||
add_executable(tiff-bi tiff-bi.c)
|
||||
set_target_properties(tiff-bi PROPERTIES LINKER_LANGUAGE CXX)
|
||||
target_link_libraries(tiff-bi tiff tiff_port)
|
||||
|
||||
add_executable(tiff-grayscale tiff-grayscale.c)
|
||||
set_target_properties(tiff-grayscale PROPERTIES LINKER_LANGUAGE CXX)
|
||||
target_link_libraries(tiff-grayscale tiff tiff_port CMath::CMath)
|
||||
|
||||
add_executable(tiff-palette tiff-palette.c)
|
||||
set_target_properties(tiff-palette PROPERTIES LINKER_LANGUAGE CXX)
|
||||
target_link_libraries(tiff-palette tiff tiff_port)
|
||||
|
||||
add_executable(tiff-rgb tiff-rgb.c)
|
||||
set_target_properties(tiff-rgb PROPERTIES LINKER_LANGUAGE CXX)
|
||||
target_link_libraries(tiff-rgb tiff tiff_port CMath::CMath)
|
||||
|
||||
if(WEBP_SUPPORT AND EMSCRIPTEN)
|
||||
|
||||
@@ -23,4 +23,5 @@
|
||||
# OF THIS SOFTWARE.
|
||||
|
||||
add_executable(iptcutil iptcutil.c)
|
||||
set_target_properties(iptcutil PROPERTIES LINKER_LANGUAGE CXX)
|
||||
target_link_libraries(iptcutil tiff tiff_port)
|
||||
|
||||
@@ -296,6 +296,9 @@ int formatIPTC(FILE *ifile, FILE *ofile)
|
||||
else
|
||||
fprintf(ofile, "%d#%d=", (unsigned int)dataset,
|
||||
(unsigned int)recnum);
|
||||
/* Silence Coverity Scan warning about tainted_data: Passing tainted
|
||||
* expression *str to formatString, which uses it as an offset. */
|
||||
/* coverity[tainted_data:SUPPRESS] */
|
||||
formatString(ofile, str, taglen);
|
||||
free(str);
|
||||
|
||||
|
||||
@@ -83,34 +83,83 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
|
||||
TIFFClose(tif);
|
||||
return 0;
|
||||
}
|
||||
/* another hack to work around an OOM in tif_fax3.c */
|
||||
uint32_t tilewidth = 0;
|
||||
uint32_t imagewidth = 0;
|
||||
TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tilewidth);
|
||||
TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &imagewidth);
|
||||
tilewidth = __TIFFSafeMultiply(uint32_t, tilewidth, 2);
|
||||
imagewidth = __TIFFSafeMultiply(uint32_t, imagewidth, 2);
|
||||
if (tilewidth * 2 > MAX_SIZE || imagewidth * 2 > MAX_SIZE ||
|
||||
tilewidth == 0 || imagewidth == 0)
|
||||
|
||||
if (TIFFIsTiled(tif))
|
||||
{
|
||||
TIFFClose(tif);
|
||||
return 0;
|
||||
/* another hack to work around an OOM in tif_fax3.c */
|
||||
uint32_t tilewidth = 0;
|
||||
uint32_t imagewidth = 0;
|
||||
TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tilewidth);
|
||||
TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &imagewidth);
|
||||
tilewidth = __TIFFSafeMultiply(uint32_t, tilewidth, 2);
|
||||
imagewidth = __TIFFSafeMultiply(uint32_t, imagewidth, 2);
|
||||
if (tilewidth * 2 > MAX_SIZE || imagewidth * 2 > MAX_SIZE ||
|
||||
tilewidth == 0 || imagewidth == 0)
|
||||
{
|
||||
TIFFClose(tif);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// check the size of the non-tiled image
|
||||
uint32_t rowsize = 0;
|
||||
TIFFGetField(tif, TIFFTAG_ROWSPERSTRIP, &rowsize);
|
||||
uint32_t stripsize = TIFFStripSize(tif);
|
||||
rowsize = __TIFFSafeMultiply(uint32_t, rowsize, 2);
|
||||
stripsize = __TIFFSafeMultiply(uint32_t, stripsize, 2);
|
||||
if (rowsize * 2 > MAX_SIZE || stripsize * 2 > MAX_SIZE ||
|
||||
rowsize == 0 || stripsize == 0)
|
||||
{
|
||||
TIFFClose(tif);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t size = __TIFFSafeMultiply(uint32_t, w, h);
|
||||
|
||||
if (size > MAX_SIZE || size == 0)
|
||||
{
|
||||
TIFFClose(tif);
|
||||
return 0;
|
||||
}
|
||||
|
||||
raster = (uint32_t *)_TIFFmalloc(size * sizeof(uint32_t));
|
||||
int ret = 0;
|
||||
if (raster != NULL)
|
||||
{
|
||||
TIFFReadRGBAImage(tif, w, h, raster, 0);
|
||||
|
||||
if (!TIFFIsTiled(tif))
|
||||
{
|
||||
// Allocate a buffer to hold one scanline
|
||||
tsize_t scanlineSize = TIFFScanlineSize(tif);
|
||||
void *buffer = _TIFFmalloc(scanlineSize);
|
||||
if (!buffer)
|
||||
{
|
||||
fprintf(stderr, "Memory allocation failed\n");
|
||||
ret = 1;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
// Read each scanline
|
||||
for (uint32_t row = 0; row < h; row++)
|
||||
{
|
||||
if (TIFFReadScanline(tif, buffer, row, 0) < 0)
|
||||
{
|
||||
_TIFFfree(buffer);
|
||||
ret = 1;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
_TIFFfree(buffer);
|
||||
}
|
||||
cleanup:
|
||||
_TIFFfree(raster);
|
||||
}
|
||||
TIFFClose(tif);
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef STANDALONE
|
||||
@@ -190,4 +239,4 @@ int main(int argc, char *argv[])
|
||||
return nRet;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@@ -12,7 +12,7 @@
|
||||
Load the TIFF data from the file into memory. Return
|
||||
a pointer to a valid DIB (or NULL for errors).
|
||||
Uses the TIFFRGBA interface to libtiff.lib to convert
|
||||
most file formats to a useable form. We just keep the 32 bit
|
||||
most file formats to a usable form. We just keep the 32 bit
|
||||
form of the data to display, rather than optimizing for the
|
||||
display.
|
||||
|
||||
@@ -291,7 +291,7 @@ DECLAREContigPutFunc(putContig1bitTile);
|
||||
static int getStripContig1Bit(TIFFRGBAImage *img, uint32_t *uraster, uint32_t w,
|
||||
uint32_t h);
|
||||
|
||||
// typdef struct TIFFDibImage {
|
||||
// typedef struct TIFFDibImage {
|
||||
// TIFFRGBAImage tif;
|
||||
// dibinstalled;
|
||||
// } TIFFDibImage ;
|
||||
|
||||
@@ -85,7 +85,7 @@ HDIB LoadTIFFinDIB(LPSTR lpFileName)
|
||||
TIFFGetField(tif, TIFFTAG_ROWSPERSTRIP, &RowsPerStrip);
|
||||
TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &PhotometricInterpretation);
|
||||
|
||||
LineSize = TIFFScanlineSize(tif); // Number of byte in ine line
|
||||
LineSize = TIFFScanlineSize(tif); // Number of byte in one line
|
||||
|
||||
SamplePerPixel = (int)(LineSize / imageWidth);
|
||||
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||
# OF THIS SOFTWARE.
|
||||
|
||||
cmake_minimum_required(VERSION 3.2.0)
|
||||
|
||||
include(Sphinx)
|
||||
|
||||
if (BUILD_SPHINX AND SPHINX_BUILD)
|
||||
|
||||
@@ -124,6 +124,7 @@ rst_sources = \
|
||||
releases/v4.5.1.rst \
|
||||
releases/v4.6.0.rst \
|
||||
releases/v4.7.0.rst \
|
||||
releases/v4.7.1.rst \
|
||||
rfcs/index.rst \
|
||||
rfcs/rfc1_psc.rst \
|
||||
rfcs/rfc2_restoring_needed_tools.rst \
|
||||
|
||||
+77
-23
@@ -20,7 +20,7 @@ This structure looks like this:
|
||||
::
|
||||
|
||||
typedef struct {
|
||||
ttag_t field_tag; /* field's tag */
|
||||
uint32_t field_tag; /* field's tag */
|
||||
short field_readcount; /* read count / TIFF_VARIABLE / TIFF_VARIABLE2 / TIFF_SPP */
|
||||
short field_writecount; /* write count / TIFF_VARIABLE / TIFF_VARIABLE2 */
|
||||
TIFFDataType field_type; /* type of associated data */
|
||||
@@ -31,7 +31,7 @@ This structure looks like this:
|
||||
} TIFFFieldInfo;
|
||||
|
||||
|
||||
.. c:member:: ttag_t TIFFFieldInfo.field_tag
|
||||
.. c:member:: uint32_t TIFFFieldInfo.field_tag
|
||||
|
||||
The tag number. For instance 277 for the
|
||||
SamplesPerPixel tag. Builtin tags will generally have a ``#define`` in
|
||||
@@ -229,27 +229,81 @@ architecture can then be avoided.
|
||||
Adding New Builtin Tags
|
||||
-----------------------
|
||||
|
||||
A similar approach is taken to the above. However, the :c:struct:`TIFFFieldInfo`
|
||||
should be added to the :c:expr:`tiffFieldInfo[]` list in :file:`tif_dirinfo.c`.
|
||||
Ensure that new tags are added in sorted order by the tag number.
|
||||
A similar approach is taken to the above. However, the :c:struct:`_TIFFField`
|
||||
information should be added to the :c:expr:`tiffFields[]` list in
|
||||
:file:`tif_dirinfo.c`. This :c:struct:`_TIFFField` structure is like
|
||||
TIFFFieldInfo structure but has additional members:
|
||||
|
||||
Normally new built-in tags should be defined with :c:macro:`FIELD_CUSTOM`; however, if
|
||||
it is desirable for the tag value to have it's own field in the :c:struct:`TIFFDirectory`
|
||||
structure, then you will need to ``#define`` a new :c:macro:`FIELD_` value for it, and
|
||||
add appropriate handling as follows:
|
||||
The tags in the :c:expr:`tiffFields[]` list need not to be in sorted
|
||||
order by the tag number. Sorting is done when setting up the
|
||||
:c:expr:`TIFFFieldArray` at IFD initialization.
|
||||
|
||||
.. highlight:: c
|
||||
|
||||
::
|
||||
|
||||
typedef struct _TIFFField {
|
||||
uint32_t field_tag; /* field's tag */
|
||||
short field_readcount; /* read count / TIFF_VARIABLE / TIFF_VARIABLE2 / TIFF_SPP */
|
||||
short field_writecount; /* write count / TIFF_VARIABLE / TIFF_VARIABLE2 */
|
||||
TIFFDataType field_type; /* type of associated data */
|
||||
uint32_t field_anonymous; /* if true, this is a unknown / anonymous tag */
|
||||
TIFFSetGetFieldType set_field_type; /* type to be passed to TIFFSetField and TIFFGetField */
|
||||
TIFFSetGetFieldType get_field_type; /* not used */
|
||||
unsigned short field_bit; /* bit in fieldsset bit vector */
|
||||
unsigned char field_oktochange; /* if true, can change while writing */
|
||||
unsigned char field_passcount; /* if true, pass dir count on set */
|
||||
char *field_name; /* ASCII name */
|
||||
TIFFFieldArray *field_subfields; /* if field points to child ifds, child ifd field definition array */
|
||||
};
|
||||
|
||||
|
||||
.. c:member:: uint32_t _TIFFField.field_anonymous
|
||||
|
||||
Used internally to indicate auto-registered tags.
|
||||
See :c:func:`TIFFFieldIsAnonymous`.
|
||||
|
||||
.. c:member:: TIFFSetGetFieldType _TIFFField.set_field_type
|
||||
|
||||
| The enummeration identifier gives a hint and defines the `vararg`
|
||||
parameters passed to :c:func:`TIFFSetField` and :c:func:`TIFFGetField`.
|
||||
| For example :c:enum:`TIFF_SETGET_UINT64` defines a single
|
||||
``uint64_t`` parameter to be passed to `TIFFSetField()` and
|
||||
`TIFFGetField()`, respectively.
|
||||
| To distinguish the three different array types, there are three
|
||||
strings before the value type within the enummeration identifier
|
||||
(e.g. TIFF_SETGET_C0_UINT64):
|
||||
| "**_C0_**" for fixed arrays and thus no count parameter is required
|
||||
for TIFFSetField() and TIFFGetField(), respectively.
|
||||
The array length is constant and given by `field_readcount` or
|
||||
`field_writecount`, respectively.
|
||||
| "**_C16_**" and "**_C32_**" are for variable arrays with ``uint16_t``
|
||||
or ``uint32_t`` count parameter required for TIFFSetField() and
|
||||
TIFFGetField(), respectively. But then, `field_readcount` and
|
||||
`field_writecount` has to be set to -1 for _C16_ and -3 for _C32_,
|
||||
respectively.
|
||||
|
||||
.. c:member:: TIFFSetGetFieldType _TIFFField.get_field_type
|
||||
|
||||
Currently, this parameter is not used for TIFFGetField().
|
||||
Nevertheless, it is set as a copy of set_field_type or set to
|
||||
`TIFF_SETGET_UNDEFINED`.
|
||||
|
||||
Normally new built-in tags should be defined with :c:macro:`FIELD_CUSTOM`
|
||||
and then only two points need to be done:
|
||||
|
||||
#. Define the tag in :file:`tiff.h`.
|
||||
#. Add a field to the directory structure in :file:`tif_dir.h`
|
||||
and define a ``FIELD_*`` bit (also update the definition of
|
||||
#. Add an entry in the :c:expr:`tiffFields[]` array list defined at the
|
||||
top of :file:`tif_dirinfo.c`.
|
||||
|
||||
However, if it is desirable for the tag value to have its own field in
|
||||
the :c:struct:`TIFFDirectory` structure, then you will also need to
|
||||
``#define`` a new :c:macro:`FIELD_` value for it, and add appropriate
|
||||
handling as follows:
|
||||
|
||||
#. Add a field to the :c:struct:`TIFFDirectory` structure in :file:`tif_dir.h`
|
||||
and define a ``FIELD_*`` bit number (also update the definition of
|
||||
:c:macro:`FIELD_CODEC` to reflect your addition).
|
||||
#. Add an entry in the :c:struct:`TIFFFieldInfo` array defined at the top of
|
||||
:file:`tif_dirinfo.c`.
|
||||
|
||||
.. note::
|
||||
|
||||
Note that you must keep this array sorted by tag
|
||||
number and that the widest variant entry for a tag should come
|
||||
first (e.g. :c:macro:`LONG` before :c:macro:`SHORT`).
|
||||
#. Add entries in :c:func:`_TIFFVSetField` and :c:func:`_TIFFVGetField`
|
||||
for the new tag.
|
||||
#. (*optional*) If the value associated with the tag is not a scalar value
|
||||
@@ -259,7 +313,7 @@ add appropriate handling as follows:
|
||||
:c:func:`TIFFWriteDirectory`. You're best off finding a similar tag and
|
||||
cribbing code.
|
||||
#. Add support to :c:func:`TIFFPrintDirectory` in :file:`tif_print.c`
|
||||
to print the tag's value.
|
||||
to print the tag's value.
|
||||
|
||||
If you want to maintain portability, beware of making assumptions
|
||||
about data types. Use the typedefs (:c:type:`uint16_t`, etc. when dealing with
|
||||
@@ -311,6 +365,6 @@ algorithm is used* follow these steps:
|
||||
|
||||
Note that space has been allocated in the ``FIELD_*`` bit space for
|
||||
codec-private tags. Define your bits as ``FIELD_CODEC+<offset>`` to
|
||||
keep them away from the core tags. If you need more tags than there
|
||||
is room for, just increase :c:macro:`FIELD_SETLONGS` at the top of
|
||||
:file:`tiffiop.h`.
|
||||
keep them away from the core tags. If you need more tags than there
|
||||
is room for, just increase :c:macro:`td_fieldsset` at the top of
|
||||
:file:`tif_dir.h`.
|
||||
|
||||
+1
-1
@@ -105,7 +105,7 @@ The default generator for UNIX is ``Unix Makefiles``, and on Windows is
|
||||
``NMake Makefiles`` or ``MSBuild`` depending upon the setup.
|
||||
Run :command:`cmake --help` to list all the
|
||||
generators available for your platform. For example, to use the Ninja
|
||||
`build system <https://martine.github.io/ninja/>`_ on UNIX or
|
||||
`build system <https://ninja-build.org/>`_ on UNIX or
|
||||
Windows:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ ext_source_user = None
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
project = 'LibTIFF'
|
||||
copyright = '1988-2022, LibTIFF contributors'
|
||||
copyright = '1988-2025, LibTIFF contributors'
|
||||
author = 'LibTIFF contributors'
|
||||
|
||||
# The full version, including alpha/beta/rc tags
|
||||
|
||||
@@ -66,7 +66,7 @@ Furthermore, a **custom defined data structure** *user_data* for the
|
||||
error handler can be given along.
|
||||
|
||||
Please refer to :doc:`/functions/TIFFOpenOptions` for how to setup the
|
||||
application-specific handler introduced with libtiff 4.5.
|
||||
application-specific handler introduced with ``libtiff`` 4.5.
|
||||
|
||||
Note
|
||||
----
|
||||
@@ -101,5 +101,6 @@ See also
|
||||
|
||||
:doc:`TIFFWarning` (3tiff),
|
||||
:doc:`TIFFOpen` (3tiff),
|
||||
:doc:`/functions/TIFFOpenOptions`,
|
||||
:doc:`libtiff` (3tiff),
|
||||
printf (3)
|
||||
|
||||
@@ -11,13 +11,13 @@ Synopsis
|
||||
#include <tiffio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
.. c:function:: int TIFFGetField(TIFF* tif, ttag_t tag, ...)
|
||||
.. c:function:: int TIFFGetField(TIFF* tif, uint32_t tag, ...)
|
||||
|
||||
.. c:function:: int TIFFVGetField(TIFF* tif, ttag_t tag, va_list ap)
|
||||
.. c:function:: int TIFFVGetField(TIFF* tif, uint32_t tag, va_list ap)
|
||||
|
||||
.. c:function:: int TIFFGetFieldDefaulted(TIFF* tif, ttag_t tag, ...)
|
||||
.. c:function:: int TIFFGetFieldDefaulted(TIFF* tif, uint32_t tag, ...)
|
||||
|
||||
.. c:function:: int TIFFVGetFieldDefaulted(TIFF* tif, ttag_t tag, va_list ap)
|
||||
.. c:function:: int TIFFVGetFieldDefaulted(TIFF* tif, uint32_t tag, va_list ap)
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
@@ -28,12 +28,12 @@ Synopsis
|
||||
|
||||
.. c:function:: int TIFFSetMode(TIFF* tif, int mode)
|
||||
|
||||
.. c:type:: tsize_t (*TIFFReadWriteProc)(thandle_t, tdata_t, tsize_t)
|
||||
.. c:type:: tmsize_t (*TIFFReadWriteProc)(thandle_t, void *, tmsize_t)
|
||||
.. c:type:: toff_t (*TIFFSeekProc)(thandle_t, toff_t, int)
|
||||
.. c:type:: int (*TIFFCloseProc)(thandle_t)
|
||||
.. c:type:: toff_t (*TIFFSizeProc)(thandle_t)
|
||||
.. c:type:: int (*TIFFMapFileProc)(thandle_t, tdata_t*, toff_t*)
|
||||
.. c:type:: void (*TIFFUnmapFileProc)(thandle_t, tdata_t, toff_t)
|
||||
.. c:type:: int (*TIFFMapFileProc)(thandle_t, void **base, toff_t *size)
|
||||
.. c:type:: void (*TIFFUnmapFileProc)(thandle_t, void *base, toff_t size)
|
||||
|
||||
.. c:function:: TIFF* TIFFClientOpen(const char* filename, const char* mode, thandle_t clientdata, TIFFReadWriteProc readproc, TIFFReadWriteProc writeproc, TIFFSeekProc seekproc, TIFFCloseProc closeproc, TIFFSizeProc sizeproc, TIFFMapFileProc mapproc, TIFFUnmapFileProc unmapproc)
|
||||
|
||||
@@ -62,7 +62,7 @@ If an existing file is opened for writing, all previous data is
|
||||
overwritten.
|
||||
|
||||
If a file is opened for reading, the first TIFF directory in the file
|
||||
is automatically read.
|
||||
is automatically read.
|
||||
If a file is opened for writing or appending, a default directory
|
||||
is automatically created for writing subsequent data.
|
||||
This directory has all the default values specified in TIFF Revision 6.0:
|
||||
@@ -96,7 +96,7 @@ file should be closed using its file descriptor *fd*.
|
||||
:c:func:`TIFFOpenExt` (added in libtiff 4.5) is like :c:func:`TIFFOpen`,
|
||||
but options, such as re-entrant error and warning handlers and a limit in byte
|
||||
that libtiff internal memory allocation functions are allowed to request per call
|
||||
may be passed with the *opts* argument. The *opts* argument may be NULL.
|
||||
may be passed with the *opts* argument. The *opts* argument may be NULL.
|
||||
Refer to :doc:`TIFFOpenOptions` for allocating and filling the *opts* argument
|
||||
parameters. The allocated memory for :c:type:`TIFFOpenOptions`
|
||||
can be released straight after successful execution of the related
|
||||
@@ -130,6 +130,13 @@ memory; c.f. :c:func:`mmap` (2) and :c:func:`munmap` (2).
|
||||
The *clientdata* parameter is an opaque "handle" passed to the client-specified
|
||||
routines passed as parameters to :c:func:`TIFFClientOpen`.
|
||||
|
||||
.. note::
|
||||
In contrast to the return values of :c:func:`mmap` (2) and :c:func:`munmap` (2),
|
||||
the return values of *mapproc* and *unmapproc* must be:
|
||||
TRUE for success and FALSE to indicate an error.
|
||||
``libtiff`` built in functions :c:func:`_tiffMapProc` and :c:func:`_tiffUnmapProc`
|
||||
can be found in tif_unix.c as well as in tif_win32.c.
|
||||
|
||||
:c:func:`TIFFClientOpenExt` (added in libtiff 4.5) is like :c:func:`TIFFClientOpen`,
|
||||
but options argument *opts* like for :c:func:`TIFFOpenExt` can be passed.
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@ Synopsis
|
||||
|
||||
.. c:function:: void TIFFOpenOptionsSetWarningHandlerExtR(TIFFOpenOptions* opts, TIFFErrorHandlerExtR handler, void* warnhandler_user_data)
|
||||
|
||||
.. c:function:: void TIFFOpenOptionsSetWarnAboutUnknownTags(TIFFOpenOptions *opts, int warn_about_unknown_tags)
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
@@ -71,6 +73,11 @@ The *errorhandler_user_data* argument may be NULL.
|
||||
:c:func:`TIFFOpenOptionsSetErrorHandlerExtR` but for the warning handler,
|
||||
which is invoked through :c:func:`TIFFWarningExtR`
|
||||
|
||||
:c:func:`TIFFOpenOptionsSetWarnAboutUnknownTags` sets whether libtiff should
|
||||
emit a warning when encountering a unknown tag. This function has been added in
|
||||
libtiff 4.7.1 and the default value is FALSE (change of behaviour compared to
|
||||
earlier versions).
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ Description
|
||||
The routines described here provide a high-level interface through which
|
||||
TIFF images may be read into memory.
|
||||
Images may be strip- or tile-based and have a variety of different
|
||||
characteristics: bits/sample, samples/pixel, photometric, etc.
|
||||
characteristics: bits/sample, samples/pixel, photometric, orientation, etc.
|
||||
Decoding state is encapsulated in a :c:type:`TIFFRGBAImage`
|
||||
structure making it possible to capture state for multiple images
|
||||
and quickly switch between them.
|
||||
@@ -59,7 +59,7 @@ If the raster dimensions are smaller than the image, the image data
|
||||
is cropped to the raster bounds.
|
||||
If the raster height is greater than that of the image, then the
|
||||
image data are placed in the lower part of the raster.
|
||||
(Note that the raster is assume to be organized such that the pixel
|
||||
(Note that the raster is assumed to be organized such that the pixel
|
||||
at location (*x*, *y*) is *raster* [ *y* × *width* + *x* ];
|
||||
with the raster origin in the *lower-left hand corner*.)
|
||||
|
||||
@@ -87,7 +87,7 @@ Alternate raster formats
|
||||
To use the core support for reading and processing TIFF images, but
|
||||
write the resulting raster data in a different format one need only
|
||||
override the "put methods" used to store raster data.
|
||||
These methods are are defined in the :c:type:`TIFFRGBAImage`
|
||||
These methods are defined in the :c:type:`TIFFRGBAImage`
|
||||
structure and initially setup by :c:func:`TIFFRGBAImageBegin`
|
||||
to point to routines that pack raster data in the default
|
||||
ABGR pixel format.
|
||||
@@ -144,16 +144,36 @@ Details of doing this are a bit involved, it is best to make a copy
|
||||
of an existing get method and modify it to suit the needs of an
|
||||
application.
|
||||
|
||||
.. _TIFFRGBAImage_Restriction_Notes:
|
||||
|
||||
Notes
|
||||
-----
|
||||
|
||||
Samples must be either 1, 2, 4, 8, or 16 bits.
|
||||
In C++ the *stopOnError* parameter defaults to 0.
|
||||
|
||||
``SamplesPerPixel`` must be either 1, 2, 4, 8, or 16 bits.
|
||||
Colorimetric samples/pixel must be either 1, 3, or 4 (i.e.
|
||||
``SamplesPerPixel`` -``ExtraSamples``).
|
||||
``SamplesPerPixel`` minus ``ExtraSamples``).
|
||||
|
||||
Palette image colormaps that appear to be incorrectly written
|
||||
as 8-bit values are automatically scaled to 16-bits.
|
||||
|
||||
Within the :c:type:`TIFFRGBAImage` structure the TIFF orientation
|
||||
and also the required orientation in the raster can be defined.
|
||||
However, the lower level :c:func:`TIFFRGBAImageGet` functions
|
||||
- also called by :c:func:`TIFFReadRGBAImage` and :c:func:`TIFFReadRGBAImageOriented` -
|
||||
can mirror the image orientations across both axes, but cannot rotate them.
|
||||
Therefore, images with a TIFF orientation of 5 (LeftTop) to 8 (LeftBottom)
|
||||
are not stored correctly in the raster, as this would require an additional
|
||||
rotation of 90 degrees and an exchange of width and height dimension.
|
||||
|
||||
If an alpha channel is used in an image, there are two common representations
|
||||
that are available: straight (unassociated) alpha and premultiplied (associated)
|
||||
alpha, which is specified by the value of ExtraSamples tag.
|
||||
For files with unassociated alpha, the :c:func:`TIFFRGBAImage` reading routines
|
||||
multiply the RGB values by the alpha channel values before saving them in the raster.
|
||||
The other TIFFReadxxx (like :c:func:`TIFFReadScanline`) functions do not do this.
|
||||
|
||||
Return values
|
||||
-------------
|
||||
|
||||
@@ -231,4 +251,5 @@ See also
|
||||
:doc:`TIFFReadRGBAImage` (3tiff),
|
||||
:doc:`TIFFReadRGBAStrip` (3tiff),
|
||||
:doc:`TIFFReadRGBATile` (3tiff),
|
||||
:doc:`TIFFcolor` (3tiff),
|
||||
:doc:`libtiff` (3tiff)
|
||||
|
||||
@@ -10,7 +10,7 @@ Synopsis
|
||||
|
||||
#include <tiffio.h>
|
||||
|
||||
.. c:function:: int TIFFReadEncodedTile(TIFF* tif, ttile_t tile, tdata_t buf, tsize_t size)
|
||||
.. c:function:: tmsize_t TIFFReadEncodedTile(TIFF* tif, uint32_t tile, void *buf, tmsize_t size)
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
@@ -79,18 +79,12 @@ image have been requested.
|
||||
Notes
|
||||
-----
|
||||
|
||||
In C++ the *stopOnError* parameter defaults to 0.
|
||||
|
||||
``SamplesPerPixel`` must be either 1, 2, 4, 8, or 16 bits.
|
||||
Colorimetric samples/pixel must be either 1, 3, or 4 (i.e.
|
||||
``SamplesPerPixel`` minus ``ExtraSamples``).
|
||||
|
||||
Palettte image colormaps that appear to be incorrectly written
|
||||
as 8-bit values are automatically scaled to 16-bits.
|
||||
|
||||
:c:func:`IFFReadRGBAImage` is just a wrapper around the more general
|
||||
:doc:`TIFFRGBAImage` facilities.
|
||||
|
||||
For general notes see
|
||||
:ref:`TIFFRGBImage notes <TIFFRGBAImage_Restriction_Notes>`.
|
||||
|
||||
Return values
|
||||
-------------
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ The raster is assumed to be an array of ``ImageWidth`` × ``RowsPerStrip``
|
||||
(:c:macro:`TIFFTAG_IMAGEWIDTH`) and ``RowsPerStrip`` is the maximum lines
|
||||
in a strip (:c:macro:`TIFFTAG_ROWSPERSTRIP`).
|
||||
|
||||
:c:func:`TIFFReadRGBAStripExt` provides the paramater `stop_on_error`.
|
||||
:c:func:`TIFFReadRGBAStripExt` provides the parameter `stop_on_error`.
|
||||
Its behaviour is described at :doc:`TIFFReadRGBAImage`.
|
||||
|
||||
The *row* value should be the row of the first row in the strip
|
||||
@@ -48,13 +48,6 @@ are converted to RGBA values.
|
||||
Notes
|
||||
-----
|
||||
|
||||
Samples must be either 1, 2, 4, 8, or 16 bits.
|
||||
Colorimetric samples/pixel must be either 1, 3, or 4 (i.e. ``SamplesPerPixel``
|
||||
- ``ExtraSamples``).
|
||||
|
||||
Palette image colormaps that appear to be incorrectly written as 8-bit values
|
||||
are automatically scaled to 16-bits.
|
||||
|
||||
:c:func:`TIFFReadRGBAStrip` is just a wrapper around the more general
|
||||
:doc:`TIFFRGBAImage` facilities. It's main advantage over the similar
|
||||
:c:func:`TIFFReadRGBAImage` function is that for large images a single
|
||||
@@ -62,6 +55,9 @@ buffer capable of holding the whole image doesn't need to be allocated,
|
||||
only enough for one strip. The :c:func:`TIFFReadRGBATile` function
|
||||
does a similar operation for tiled images.
|
||||
|
||||
For general notes see
|
||||
:ref:`TIFFRGBImage notes <TIFFRGBAImage_Restriction_Notes>`.
|
||||
|
||||
Return values
|
||||
-------------
|
||||
|
||||
|
||||
@@ -50,13 +50,6 @@ types are converted to RGBA values.
|
||||
Notes
|
||||
-----
|
||||
|
||||
Samples must be either 1, 2, 4, 8, or 16 bits.
|
||||
Colorimetric samples/pixel must be either 1, 3, or 4 (i.e.
|
||||
``SamplesPerPixel`` - ``ExtraSamples``).
|
||||
|
||||
Palette image colormaps that appear to be incorrectly written as 8-bit
|
||||
values are automatically scaled to 16-bits.
|
||||
|
||||
:c:func:`TIFFReadRGBATile` is just a wrapper around the more general
|
||||
:doc:`TIFFRGBAImage` facilities. It's main advantage over the similar
|
||||
:c:func:`TIFFReadRGBAImage` function is that for large images a single
|
||||
@@ -64,6 +57,9 @@ buffer capable of holding the whole image doesn't need to be allocated,
|
||||
only enough for one tile. The :c:func:`TIFFReadRGBAStrip` function
|
||||
does a similar operation for stripped images.
|
||||
|
||||
For general notes see
|
||||
:ref:`TIFFRGBImage notes <TIFFRGBAImage_Restriction_Notes>`.
|
||||
|
||||
Return values
|
||||
-------------
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Synopsis
|
||||
|
||||
#include <tiffio.h>
|
||||
|
||||
.. c:function:: tsize_t TIFFReadRawStrip(TIFF* tif, tstrip_t strip, tdata_t buf, tsize_t size)
|
||||
.. c:function:: tmsize_t TIFFReadRawStrip(TIFF* tif, uint32_t strip, void *buf, tmsize_t size)
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
@@ -10,7 +10,7 @@ Synopsis
|
||||
|
||||
#include <tiffio.h>
|
||||
|
||||
.. c:function:: tsize_t TIFFReadRawTile(TIFF* tif, ttile_t tile, tdata_t buf, tsize_t size)
|
||||
.. c:function:: tmsize_t TIFFReadRawTile(TIFF* tif, uint32_t tile, void *buf, tmsize_t size)
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
@@ -10,7 +10,7 @@ Synopsis
|
||||
|
||||
#include <tiffio.h>
|
||||
|
||||
.. c:function:: int TIFFReadScanline(TIFF* tif, tdata_t buf, uint32_t row, tsample_t sample)
|
||||
.. c:function:: int TIFFReadScanline(TIFF* tif, void *buf, uint32_t row, uint16_t sample)
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
@@ -10,7 +10,7 @@ Synopsis
|
||||
|
||||
#include <tiffio.h>
|
||||
|
||||
.. c:function:: tsize_t TIFFReadTile(TIFF* tif, tdata_t buf, uint32_t x, uint32_t y, uint32_t z, tsample_t sample)
|
||||
.. c:function:: tmsize_t TIFFReadTile(TIFF* tif, void *buf, uint32_t x, uint32_t y, uint32_t z, uint16_t sample)
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
@@ -22,7 +22,7 @@ contents with :c:func:`TIFFReadDirectory`. The parameter *dirnum*
|
||||
specifies the subfile/directory as an integer number, with the first
|
||||
directory numbered zero.
|
||||
:c:func:`TIFFSetDirectory()` only works with main-IFD chains because
|
||||
allways starts with the first main-IFD and thus is able to reset
|
||||
always starts with the first main-IFD and thus is able to reset
|
||||
the SubIFD reading chain to the main-IFD chain.
|
||||
|
||||
:c:func:`TIFFSetSubDirectory` acts like :c:func:`TIFFSetDirectory`,
|
||||
|
||||
@@ -11,9 +11,9 @@ Synopsis
|
||||
#include <tiffio.h>
|
||||
#include <stdarg.h>"
|
||||
|
||||
.. c:function:: int TIFFSetField(TIFF* tif, ttag_t tag, ...)
|
||||
.. c:function:: int TIFFSetField(TIFF* tif, uint32_t tag, ...)
|
||||
|
||||
.. c:function:: int TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
|
||||
.. c:function:: int TIFFVSetField(TIFF* tif, uint32_t tag, va_list ap)
|
||||
|
||||
.. c:function:: int TIFFUnsetField(TIFF* tif, uint32_t tag)
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ 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) :c:func:`TIFFOpen` flag,
|
||||
the loading of strile offset/bytecount is defered.
|
||||
the loading of strile offset/bytecount is deferred.
|
||||
In that mode, the ``StripOffsets`` / ``StripByteCounts`` or
|
||||
``TileOffsets`` / ``TileByteCounts`` arrays are only loaded when first
|
||||
accessed. This can speed-up the opening of files stored on the network
|
||||
|
||||
@@ -65,6 +65,9 @@ or :c:func:`TIFFClientOpenExt`.
|
||||
Furthermore, a **custom defined data structure** *user_data* for the
|
||||
warning handler can be given along.
|
||||
|
||||
Please refer to :doc:`/functions/TIFFOpenOptions` for how to setup the
|
||||
application-specific handler introduced with ``libtiff`` 4.5.
|
||||
|
||||
Note
|
||||
----
|
||||
|
||||
@@ -87,7 +90,7 @@ Return values
|
||||
returns a reference to the previous warning handler function.
|
||||
|
||||
:c:func:`TIFFWarningHandlerExtR` returns an integer as "stop" to control the call
|
||||
of furhter warning handler functions within :c:func:`TIFFWarningExtR`:
|
||||
of further warning handler functions within :c:func:`TIFFWarningExtR`:
|
||||
|
||||
- 0: both functions :c:func:`TIFFWarningHandler` and :c:func:`TIFFWarningHandlerExt` are called.
|
||||
- non-zero: no further warning message function is called.
|
||||
@@ -97,5 +100,6 @@ See also
|
||||
|
||||
:doc:`TIFFError` (3tiff),
|
||||
:doc:`TIFFOpen` (3tiff),
|
||||
:doc:`/functions/TIFFOpenOptions`,
|
||||
:doc:`libtiff` (3tiff),
|
||||
printf (3)
|
||||
|
||||
@@ -57,7 +57,9 @@ is incomplete, but you will at least get all the valid data in the file
|
||||
before that. When the file is complete, just use
|
||||
:c:func:`TIFFWriteDirectory` as usual to finish it off cleanly.
|
||||
|
||||
The :c:func:`TIFFSetWriteOffset` sets the current write offset.
|
||||
The :c:func:`TIFFSetWriteOffset` sets the current write offset for image data
|
||||
(i.e.pixels). The offset for writing the directory (:ref:`IFD <ImageFileDirectory>`)
|
||||
data is not affected.
|
||||
This should only be used to set the offset to a known previous location
|
||||
(very carefully), or to 0 so that the next write gets appended to the end
|
||||
of the file.
|
||||
|
||||
@@ -10,7 +10,7 @@ Synopsis
|
||||
|
||||
#include <tiffio.h>
|
||||
|
||||
.. c:function:: tsize_t TIFFWriteEncodedStrip(TIFF* tif, tstrip_t strip, tdata_t buf, tsize_t size)
|
||||
.. c:function:: tmsize_t TIFFWriteEncodedStrip(TIFF* tif, uint32_t strip, void *buf, tmsize_t size)
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
@@ -10,7 +10,7 @@ Synopsis
|
||||
|
||||
#include <tiffio.h>
|
||||
|
||||
.. c:function:: tsize_t TIFFWriteEncodedTile(TIFF* tif, ttile_t tile, tdata_t buf, tsize_t size)
|
||||
.. c:function:: tmsize_t TIFFWriteEncodedTile(TIFF* tif, uint32_t tile, void *buf, tmsize_t size)
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
@@ -10,7 +10,7 @@ Synopsis
|
||||
|
||||
#include <tiffio.h>
|
||||
|
||||
.. c:function:: tsize_t TIFFWriteRawStrip(TIFF* tif, tstrip_t strip, tdata_t buf, tsize_t size)
|
||||
.. c:function:: tmsize_t TIFFWriteRawStrip(TIFF* tif, uint32_t strip, void *buf, tmsize_t size)
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
@@ -10,7 +10,7 @@ Synopsis
|
||||
|
||||
#include <tiffio.h>
|
||||
|
||||
.. c:function:: tsize_t TIFFWriteRawTile(TIFF* tif, ttile_t tile, tdata_t buf, tsize_tsize)
|
||||
.. c:function:: tmsize_t TIFFWriteRawTile(TIFF* tif, uint32_t tile, void *buf, tmsize_t size)
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
@@ -10,7 +10,7 @@ Synopsis
|
||||
|
||||
#include <tiffio.h>
|
||||
|
||||
.. c:function:: int TIFFWriteScanline(TIFF* tif, tdata_t buf, uint32_t row, tsample_t sample)
|
||||
.. c:function:: int TIFFWriteScanline(TIFF* tif, void *buf, uint32_t row, uint16_t sample)
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
@@ -12,7 +12,7 @@ Synopsis
|
||||
|
||||
TIFFWriteTile \- encode and write a tile of data to an open TIFF file
|
||||
|
||||
.. c:function:: tsize_t TIFFWriteTile(TIFF* tif, tdata_t buf, uint32_t x, uint32_t y, uint32_t z, tsample_t sample)
|
||||
.. c:function:: tmsize_t TIFFWriteTile(TIFF* tif, void *buf, uint32_t x, uint32_t y, uint32_t z, uint16_t sample)
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
@@ -11,8 +11,8 @@ Synopsis
|
||||
#include <tiffio.h>
|
||||
|
||||
|
||||
.. c:function:: int TIFFReadBufferSetup(TIFF* tif, tdata_t buffer, tsize_t size)
|
||||
.. c:function:: int TIFFWriteBufferSetup(TIFF* tif, tdata_t buffer, tsize_t size)
|
||||
.. c:function:: int TIFFReadBufferSetup(TIFF* tif, void *buffer, tmsize_t size)
|
||||
.. c:function:: int TIFFWriteBufferSetup(TIFF* tif, void *buffer, tmsize_t size)
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
@@ -31,9 +31,16 @@ itself. In particular, these routines used in the :doc:`TIFFRGBAImage`
|
||||
interface.
|
||||
|
||||
:c:func:`TIFFYCbCrToRGBInit` used to initialize *YCbCr* to *RGB*
|
||||
conversion state. Allocating and freeing of the *ycbcr* structure
|
||||
belongs to programmer. :c:struct:`TIFFYCbCrToRGB` is defined in
|
||||
:file:`tiffio.h` as:
|
||||
conversion state.
|
||||
|
||||
.. note::
|
||||
The calling program is responsible for allocating and releasing the required
|
||||
buffer for the structure :c:struct:`TIFFYCbCrToRGB` and its required tables,
|
||||
pointed to by *ycbcr*. The pointers to these tables are stored in the
|
||||
structure :c:struct:`TIFFYCbCrToRGB`, which is located at the beginning
|
||||
of that buffer. Thus, this memory has to be allocated as shown in the example below.
|
||||
|
||||
:c:struct:`TIFFYCbCrToRGB` is defined in :file:`tiffio.h` as:
|
||||
|
||||
::
|
||||
|
||||
@@ -64,7 +71,7 @@ understand the the technique:
|
||||
uint16_t hs, vs;
|
||||
|
||||
/* Initialize structures */
|
||||
ycbcr = (TIFFYCbCrToRGB*)
|
||||
TIFFYCbCrToRGB *ycbcr = (TIFFYCbCrToRGB*)
|
||||
_TIFFmalloc(TIFFroundup(sizeof(TIFFYCbCrToRGB), sizeof(long))
|
||||
+ 4*256*sizeof(TIFFRGBValue)
|
||||
+ 2*256*sizeof(int)
|
||||
|
||||
@@ -10,17 +10,17 @@ Synopsis
|
||||
|
||||
#include <tiffio.h>
|
||||
|
||||
.. c:function:: tdata_t _TIFFmalloc(tsize_t size)
|
||||
.. c:function:: void *_TIFFmalloc(tmsize_t size)
|
||||
|
||||
.. c:function:: tdata_t _TIFFrealloc(tdata_t buffer, tsize_t size)
|
||||
.. c:function:: void *_TIFFrealloc(void *buffer, tmsize_t size)
|
||||
|
||||
.. c:function:: void _TIFFfree(tdata_t buffer)
|
||||
.. c:function:: void _TIFFfree(void *buffer)
|
||||
|
||||
.. c:function:: void _TIFFmemset(tdata_t s, int c, tsize_t n)
|
||||
.. c:function:: void _TIFFmemset(void *s, int c, tmsize_t n)
|
||||
|
||||
.. c:function:: void _TIFFmemcpy(tdata_t dest, const tdata_t src, tsize_t n)
|
||||
.. c:function:: void _TIFFmemcpy(void *dest, const void *src, tmsize_t n)
|
||||
|
||||
.. c:function:: int _TIFFmemcmp(const tdata_t s1, const tdata_ts2, tsize_t n)
|
||||
.. c:function:: int _TIFFmemcmp(const void *s1, const void *s2, tmsize_t n)
|
||||
|
||||
.. c:function:: void* _TIFFCheckMalloc(TIFF* tif, tmsize_t nmemb, tmsize_t elem_size, const char* what)
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@ Synopsis
|
||||
|
||||
.. c:function:: uint32_t TIFFCurrentRow(TIFF* tif)
|
||||
|
||||
.. c:function:: tstrip_t TIFFCurrentStrip(TIFF* tif)
|
||||
.. c:function:: uint32_t TIFFCurrentStrip(TIFF* tif)
|
||||
|
||||
.. c:function:: ttile_t TIFFCurrentTile(TIFF* tif)
|
||||
.. c:function:: uint32_t TIFFCurrentTile(TIFF* tif)
|
||||
|
||||
.. c:function:: int TIFFFileno(TIFF* tif)
|
||||
|
||||
|
||||
@@ -10,11 +10,11 @@ Synopsis
|
||||
|
||||
#include <tiffio.h>
|
||||
|
||||
.. c:function:: tsize_t TIFFRasterScanlineSize(TIFF* tif)
|
||||
.. c:function:: tmsize_t TIFFRasterScanlineSize(TIFF* tif)
|
||||
|
||||
.. c:function:: uint64_t TIFFRasterScanlineSize64(TIFF* tif)
|
||||
|
||||
.. c:function:: tsize_t TIFFScanlineSize(TIFF* tif)
|
||||
.. c:function:: tmsize_t TIFFScanlineSize(TIFF* tif)
|
||||
|
||||
.. c:function:: uint64_t TIFFScanlineSize64(TIFF* tif)
|
||||
|
||||
|
||||
@@ -24,9 +24,9 @@ Synopsis
|
||||
|
||||
.. c:function:: uint64_t TIFFRawStripSize64(TIFF* tif, uint32_t strip)
|
||||
|
||||
.. c:function:: tstrip_t TIFFComputeStrip(TIFF* tif, uint32_t row, tsample_t sample)
|
||||
.. c:function:: uint32_t TIFFComputeStrip(TIFF* tif, uint32_t row, uint16_t sample)
|
||||
|
||||
.. c:function:: tstrip_t TIFFNumberOfStrips(TIFF* tif)
|
||||
.. c:function:: uint32_t TIFFNumberOfStrips(TIFF* tif)
|
||||
|
||||
.. c:function:: int TIFFSetupStrips(TIFF* tif)
|
||||
|
||||
|
||||
@@ -12,23 +12,23 @@ Synopsis
|
||||
|
||||
.. c:function:: void TIFFDefaultTileSize(TIFF* tif, uint32_t* tw, uint32_t* th)
|
||||
|
||||
.. c:function:: tsize_t TIFFTileSize(TIFF* tif)
|
||||
.. c:function:: tmsize_t TIFFTileSize(TIFF* tif)
|
||||
|
||||
.. c:function:: uint64_t TIFFTileSize64(TIFF* tif)
|
||||
|
||||
.. c:function:: tsize_t TIFFTileRowSize(TIFF* tif)
|
||||
.. c:function:: tmsize_t TIFFTileRowSize(TIFF* tif)
|
||||
|
||||
.. c:function:: uint64_t TIFFTileRowSize64(TIFF* tif)
|
||||
|
||||
.. c:function:: tsize_t TIFFVTileSize(TIFF* tif, uint32_t nrows)
|
||||
.. c:function:: tmsize_t TIFFVTileSize(TIFF* tif, uint32_t nrows)
|
||||
|
||||
.. c:function:: uint64_t TIFFVTileSize64(TIFF* tif, uint32_t nrows)
|
||||
|
||||
.. c:function:: ttile_t TIFFComputeTile(TIFF* tif, uint32_t x, uint32_t y, uint32_t z, tsample_t sample)
|
||||
.. c:function:: uint32_t TIFFComputeTile(TIFF* tif, uint32_t x, uint32_t y, uint32_t z, uint16_t sample)
|
||||
|
||||
.. c:function:: int TIFFCheckTile(TIFF* tif, uint32_t x, uint32_t y, uint32_t z, tsample_t sample)
|
||||
.. c:function:: int TIFFCheckTile(TIFF* tif, uint32_t x, uint32_t y, uint32_t z, uint16_t sample)
|
||||
|
||||
.. c:function:: ttile_t TIFFNumberOfTiles(TIFF* tif)
|
||||
.. c:function:: uint32_t TIFFNumberOfTiles(TIFF* tif)
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
+22
-11
@@ -55,6 +55,8 @@ fields are defined differently on a per-sample basis
|
||||
``Compression``
|
||||
tag is not defined on a per-sample basis, so this is immaterial).
|
||||
|
||||
.. _DataTypes:
|
||||
|
||||
Data types
|
||||
----------
|
||||
|
||||
@@ -69,16 +71,25 @@ definitions or through parameters passed through the varargs interfaces.
|
||||
|
||||
::
|
||||
|
||||
typedef uint32_t ttag_t; // directory tag
|
||||
typedef uint32_t tdir_t; // directory index
|
||||
typedef uint16_t tsample_t; // sample number
|
||||
typedef uint32_t tstrip_t; // strip number
|
||||
typedef uint32_t ttile_t; // tile number
|
||||
typedef int64_t tmsize_t; // signed size type (int32_t on 32-bit platforms)
|
||||
typedef tmsize_t tsize_t; // i/o size in bytes
|
||||
typedef void* tdata_t; // image data ref
|
||||
typedef void* thandle_t; // client data handle
|
||||
typedef uint64_t toff_t; // file offset
|
||||
typedef int64_t tmsize_t; /* signed size type (int32_t on 32-bit platforms) */
|
||||
typedef void* thandle_t; /* client data handle */
|
||||
typedef uint64_t toff_t; /* file offset */
|
||||
typedef uint32_t tdir_t; /* directory index */
|
||||
|
||||
The following typedefs are deprecated and should be replaced by their
|
||||
defining counterparts.
|
||||
|
||||
.. highlight:: c
|
||||
|
||||
::
|
||||
|
||||
typedef uint32_t ttag_t; /* directory tag */
|
||||
typedef uint16_t tsample_t; /* sample number */
|
||||
typedef uint32_t tstrile_t; /* strip or tile number */
|
||||
typedef tstrile_t tstrip_t; /* strip number */
|
||||
typedef tstrile_t ttile_t; /* tile number */
|
||||
typedef tmsize_t tsize_t; /* i/o size in bytes */
|
||||
typedef void *tdata_t; /* image data ref */
|
||||
|
||||
Note that
|
||||
:c:type:`tstrip_t`,
|
||||
@@ -534,7 +545,7 @@ will work.
|
||||
* - :c:func:`TIFFYCbCrToRGBInit`
|
||||
- initialize YCbCr to RGB conversion state
|
||||
|
||||
.. list-table:: *Libtiff auxillary functions*
|
||||
.. list-table:: *Libtiff auxiliary functions*
|
||||
:widths: 5 20
|
||||
:header-rows: 1
|
||||
|
||||
|
||||
+2
-1
@@ -13,7 +13,8 @@ The images are kept in a separate archive that should be located in
|
||||
the same directory as this software.
|
||||
|
||||
The latest archive of test images is located at
|
||||
`<https://download.osgeo.org/libtiff/pics-3.8.0.tar.gz>`_.
|
||||
`<https://download.osgeo.org/libtiff/pics-3.8.0.tar.gz>`_,
|
||||
or at `<https://gitlab.com/libtiff/libtiff-pics>`_.
|
||||
|
||||
There are two other good sources for TIFF test images:
|
||||
the contributed software :file:`contrib/dbs` includes several
|
||||
|
||||
+1
-2
@@ -10,11 +10,10 @@ LibTIFF - TIFF Library and Utilities
|
||||
===================== =====================================
|
||||
Home Page #1 http://www.simplesystems.org/libtiff/
|
||||
Home Page #2 https://libtiff.gitlab.io/libtiff/
|
||||
Latest Stable Release v4.7.0
|
||||
Latest Stable Release v4.7.1
|
||||
Primary Download Site `download.osgeo.org <https://download.osgeo.org/libtiff/>`_
|
||||
Mailing List `tiff@lists.osgeo.org <tiff@lists.osgeo.org>`_
|
||||
List subscription http://lists.osgeo.org/mailman/listinfo/tiff/
|
||||
List archive http://www.awaresystems.be/imaging/tiff/tml.html
|
||||
Source repository https://gitlab.com/libtiff/libtiff
|
||||
===================== =====================================
|
||||
|
||||
|
||||
+59
-97
@@ -63,8 +63,9 @@ Support for JPEG compression is controlled by :c:macro:`JPEG_SUPPORT`.
|
||||
The JPEG codec that comes with LibTIFF is designed for
|
||||
use with release 5 or later of the Independent JPEG Group's freely
|
||||
available software distribution.
|
||||
This software can be retrieved from the directory
|
||||
`<ftp://ftp.uu.net/graphics/jpeg>`_.
|
||||
|
||||
This software can be retrieved from
|
||||
`<https://ijg.org/>`_ or as an alternative from `<https://libjpeg-turbo.org/>`_.
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -76,23 +77,22 @@ Experimental support for the deflate algorithm is controlled by
|
||||
The deflate codec that comes with LibTIFF is designed
|
||||
for use with version 0.99 or later of the freely available
|
||||
``libz`` library written by Jean-loup Gailly and Mark Adler.
|
||||
The data format used by this library is described
|
||||
in the files
|
||||
`<ftp://ftp.uu.net/pub/archiving/zip/doc/zlib-3.1.doc>`_,
|
||||
and
|
||||
`<ftp://ftp.uu.net/pub/archiving/zip/doc/deflate-1.1.doc>`_,
|
||||
available in the directory
|
||||
`<ftp://ftp.uu.net/pub/archiving/zip/doc>`_..
|
||||
The library can be retried from the directory
|
||||
`<ftp://ftp.uu.net/pub/archiving/zip/zlib>`_
|
||||
(or try `<ftp://quest.jpl.nasa.gov/beta/zlib/>`_).
|
||||
|
||||
.. warning::
|
||||
The data format used by the zlib library is described by RFCs (Request for
|
||||
Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
|
||||
(zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
|
||||
|
||||
**The deflate algorithm is experimental. Do not expect
|
||||
to exchange files using this compression scheme;
|
||||
it is included only because the similar, and more common,
|
||||
LZW algorithm is claimed to be governed by licensing restrictions.**
|
||||
The ``libz`` library can be fetched from `<https://www.zlib.net/>`_,
|
||||
and ``libdeflate`` from `<https://github.com/ebiggers/libdeflate>`_
|
||||
|
||||
Other codec libraries supported by LibTIFF are:
|
||||
|
||||
* JBIG: `<https://www.cl.cam.ac.uk/~mgk25/jbigkit/>`_
|
||||
* ESRI Lerc: `<https://github.com/Esri/lerc>`_
|
||||
* LZMA2: `<https://tukaani.org/xz/>`_
|
||||
* | ZSTD: info at `<https://facebook.github.io/zstd/>`_
|
||||
| and can be retrieved from `<https://github.com/facebook/zstd>`_
|
||||
* WebP: `<https://developers.google.com/speed/webp>`_
|
||||
|
||||
By default :file:`tiffconf.h` defines
|
||||
:c:macro:`COLORIMETRY_SUPPORT`,
|
||||
@@ -100,7 +100,6 @@ By default :file:`tiffconf.h` defines
|
||||
and
|
||||
:c:macro:`CMYK_SUPPORT`.
|
||||
|
||||
|
||||
.. list-table:: :file:`tiffconf.h` defines
|
||||
:widths: 5 20
|
||||
:header-rows: 1
|
||||
@@ -125,18 +124,49 @@ and
|
||||
|
||||
* - :c:macro:`OJPEG_SUPPORT`
|
||||
- obsolete JPEG scheme defined in the 6.0 spec (compression 6)
|
||||
(requires JPEG library with old JPEG support)
|
||||
|
||||
* - :c:macro:`JPEG_SUPPORT`
|
||||
- current JPEG scheme defined in TTN2 (compression 7)
|
||||
(requires JPEG library)
|
||||
|
||||
* - :c:macro:`JBIG_SUPPORT`
|
||||
- current JBIG (compression 9=T85, 10=43 and 34661=ISO)
|
||||
(requires JBIG-KIT library)
|
||||
|
||||
* - :c:macro:`LERC_SUPPORT`
|
||||
- current LERC (compression 34887)
|
||||
(requires LERC and Zlib library)
|
||||
|
||||
* - :c:macro:`ZIP_SUPPORT`
|
||||
- experimental Deflate scheme (compression 32946)
|
||||
(requires Zlib)
|
||||
|
||||
* - :c:macro:`LIBDEFLATE_SUPPORT`
|
||||
- support libdeflate enhanced compression (compression 32946)
|
||||
(requires libdeflate and Zlib)
|
||||
|
||||
* - :c:macro:`LZMA_SUPPORT`
|
||||
- Lempel–Ziv–Markov chain algorithm (LZMA2) (compression 34925)
|
||||
(requires liblzma)
|
||||
|
||||
* - :c:macro:`ZSTD_SUPPORT`
|
||||
- ZStandard (ZSTD) deflate like scheme
|
||||
(compression 50000 - not registered in Adobe-maintained registry)
|
||||
(requires zstd library)
|
||||
|
||||
* - :c:macro:`WEBP_SUPPORT`
|
||||
- WebP raster graphic compression support
|
||||
(compression 50001 - not registered in Adobe-maintained registry)
|
||||
(requires webp library)
|
||||
|
||||
* - :c:macro:`PIXARLOG_SUPPORT`
|
||||
- Pixar's compression scheme for high-resolution color images (compression 32909)
|
||||
- Pixar's compression scheme for high-resolution color images
|
||||
(compression 32909) (requires Zlib)
|
||||
|
||||
* - :c:macro:`SGILOG_SUPPORT`
|
||||
- SGI's compression scheme for high-resolution color images (compression 34676 and 34677)
|
||||
- SGI's compression scheme for high-resolution color images
|
||||
(compression 34676 and 34677)
|
||||
|
||||
* - :c:macro:`COLORIMETRY_SUPPORT`
|
||||
- support for the TIFF 6.0 colorimetry tags
|
||||
@@ -275,86 +305,18 @@ purely by fiddling with the following machine-dependent typedefs:
|
||||
- 32-bit signed integer
|
||||
- :file:`tiff.h`
|
||||
|
||||
* - :c:type:`dblparam_t`
|
||||
- promoted type for floats
|
||||
- :file:`tiffcomp.h`
|
||||
* - :c:type:`uint64_t`
|
||||
- 64-bit unsigned integer
|
||||
- :file:`tiff.h`
|
||||
|
||||
(to clarify :c:type:`dblparam_t`, it is the type that float parameters are
|
||||
promoted to when passed by value in a function call.)
|
||||
|
||||
The following typedefs are used throughout the library and interfaces
|
||||
to refer to certain objects whose size is dependent on the TIFF image
|
||||
structure:
|
||||
|
||||
.. list-table:: TIFF image typedefs
|
||||
:widths: 10 10 10
|
||||
:header-rows: 1
|
||||
|
||||
* - Typedef
|
||||
- Type
|
||||
- Description
|
||||
* - :c:type:`int64_t`
|
||||
- 64-bit signed integer
|
||||
- :file:`tiff.h`
|
||||
|
||||
|
||||
* - :c:type:`ttag_t`
|
||||
- :c:expr:`unsigned int`
|
||||
- directory tag
|
||||
|
||||
* - :c:type:`tdir_t`
|
||||
- :c:type:`uint16_t`
|
||||
- directory index
|
||||
|
||||
* - :c:type:`tsample_t`
|
||||
- :c:type:`uint16_t`
|
||||
- sample number
|
||||
|
||||
* - :c:type:`tstrip_t`
|
||||
- :c:type:`uint32_t`
|
||||
- strip number
|
||||
|
||||
* - :c:type:`ttile_t`
|
||||
- :c:type:`uint32_t`
|
||||
- tile number
|
||||
|
||||
* - :c:type:`tsize_t`
|
||||
- :c:type:`int32_t`
|
||||
- i/o size in bytes
|
||||
|
||||
* - :c:type:`tdata_t`
|
||||
- :c:expr:`void *`
|
||||
- image data ref
|
||||
|
||||
* - :c:type:`thandle_t`
|
||||
- :c:expr:`void *`
|
||||
- client data handle
|
||||
|
||||
* - :c:type:`toff_t`
|
||||
- :c:type:`int32_t`
|
||||
- file offset (should be off_t)
|
||||
|
||||
* - :c:type:`tidata_t`
|
||||
- :c:expr:`unsigned char *`
|
||||
- internal image data
|
||||
|
||||
Note that :c:type:`tstrip_t`, :c:type:`ttile_t`, and :c:type:`tsize_t`
|
||||
are constrained to be
|
||||
no more than 32-bit quantities by 32-bit fields they are stored
|
||||
in in the TIFF image. Likewise :c:type:`tsample_t` is limited by the 16-bit
|
||||
field used to store the ``SamplesPerPixel`` tag. :c:type:`tdir_t`
|
||||
constrains
|
||||
the maximum number of IFDs that may appear in an image and may
|
||||
be an arbitrary size (without penalty). :c:type:`ttag_t` must be either
|
||||
:c:expr:`int`, :c:expr:`unsigned int`, pointer, or :c:expr:`double`
|
||||
because the library uses a varargs
|
||||
interface and ANSI C restricts the type of the parameter before an
|
||||
ellipsis to be a promoted type. :c:type:`toff_t` is defined as
|
||||
:c:type:`int32_t` because
|
||||
TIFF file offsets are (unsigned) 32-bit quantities. A signed
|
||||
value is used because some interfaces return -1 on error (sigh).
|
||||
Finally, note that :c:type:`tidata_t` is used internally to the library to
|
||||
manipulate internal data. User-specified data references are
|
||||
passed as opaque handles and only cast at the lowest layers where
|
||||
their type is presumed.
|
||||
|
||||
Most of the previously used type definitions that refer to
|
||||
specific objects are deprecated.
|
||||
For more information about typedefs see :ref:`Data Types <DataTypes>`.
|
||||
|
||||
General Comments
|
||||
----------------
|
||||
|
||||
+57
-26
@@ -30,14 +30,6 @@ Detailed information on the interfaces to the library are given in
|
||||
the :doc:`functions` that accompany this software.
|
||||
An alphabetic list of all the public functions with a brief description can be found at :ref:`list_of_routines`
|
||||
|
||||
.. warning::
|
||||
The following hyperlink does no more work, at least no libtiff introduction:
|
||||
|
||||
Michael Still has also written a useful introduction to libtiff for the
|
||||
IBM DeveloperWorks site available at
|
||||
`<http://www.ibm.com/developerworks/linux/library/l-libtiff>`_.
|
||||
|
||||
|
||||
How to tell which version you have
|
||||
----------------------------------
|
||||
|
||||
@@ -492,7 +484,7 @@ is assumed to be organized in strips, the following might be used:
|
||||
TIFF* tif = TIFFOpen("myfile.tif", "r");
|
||||
if (tif) {
|
||||
uint32_t imagelength;
|
||||
tdata_t buf;
|
||||
void *buf;
|
||||
uint32_t row;
|
||||
|
||||
TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imagelength);
|
||||
@@ -519,7 +511,7 @@ to handle either case one might use the following instead:
|
||||
TIFF* tif = TIFFOpen("myfile.tif", "r");
|
||||
if (tif) {
|
||||
uint32_t imagelength;
|
||||
tdata_t buf;
|
||||
void *buf;
|
||||
uint32_t row;
|
||||
|
||||
TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imagelength);
|
||||
@@ -528,10 +520,10 @@ to handle either case one might use the following instead:
|
||||
if (config == PLANARCONFIG_CONTIG) {
|
||||
for (row = 0; row < imagelength; row++)
|
||||
TIFFReadScanline(tif, buf, row, 0);
|
||||
} else if (config == planarconfig_separate) {
|
||||
} else if (config == PLANARCONFIG_SEPARATE) {
|
||||
uint16_t s, nsamples;
|
||||
|
||||
tiffgetfield(tif, tifftag_samplesperpixel, &nsamples);
|
||||
TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &nsamples);
|
||||
for (s = 0; s < nsamples; s++)
|
||||
for (row = 0; row < imagelength; row++)
|
||||
TIFFReadScanline(tif, buf, row, s);
|
||||
@@ -574,12 +566,12 @@ A simple example of reading an image by strips is:
|
||||
{
|
||||
TIFF* tif = TIFFOpen("myfile.tif", "r");
|
||||
if (tif) {
|
||||
tdata_t buf;
|
||||
tstrip_t strip;
|
||||
void *buf;
|
||||
uint32_t strip;
|
||||
|
||||
buf = _TIFFmalloc(TIFFStripSize(tif));
|
||||
for (strip = 0; strip < tiffnumberofstrips(tif); strip++)
|
||||
tiffreadencodedstrip(tif, strip, buf, (tsize_t) -1);
|
||||
for (strip = 0; strip < TIFFNumberOfStrips(tif); strip++)
|
||||
TIFFReadEncodedStrip(tif, strip, buf, (tmsize_t) -1);
|
||||
_TIFFfree(buf);
|
||||
TIFFClose(tif);
|
||||
}
|
||||
@@ -609,15 +601,15 @@ a file:
|
||||
{
|
||||
TIFF* tif = TIFFOpen("myfile.tif", "r");
|
||||
if (tif) {
|
||||
tdata_t buf;
|
||||
tstrip_t strip;
|
||||
uint32_t* bc;
|
||||
void *buf;
|
||||
uint32_t strip;
|
||||
uint32_t *bc;
|
||||
uint32_t stripsize;
|
||||
|
||||
TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &bc);
|
||||
stripsize = bc[0];
|
||||
buf = _TIFFmalloc(stripsize);
|
||||
for (strip = 0; strip < tiffnumberofstrips(tif); strip++) {
|
||||
for (strip = 0; strip < TIFFNumberOfStrips(tif); strip++) {
|
||||
if (bc[strip] > stripsize) {
|
||||
buf = _TIFFrealloc(buf, bc[strip]);
|
||||
stripsize = bc[strip];
|
||||
@@ -666,7 +658,7 @@ code of the following sort might be used:
|
||||
uint32_t imageWidth, imageLength;
|
||||
uint32_t tileWidth, tileLength;
|
||||
uint32_t x, y;
|
||||
tdata_t buf;
|
||||
void *buf;
|
||||
|
||||
TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &imageWidth);
|
||||
TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imageLength);
|
||||
@@ -675,7 +667,7 @@ code of the following sort might be used:
|
||||
buf = _TIFFmalloc(TIFFTileSize(tif));
|
||||
for (y = 0; y < imagelength; y += tilelength)
|
||||
for (x = 0; x < imagewidth; x += tilewidth)
|
||||
tiffreadtile(tif, buf, x, y, 0);
|
||||
TIFFReadTile(tif, buf, x, y, 0);
|
||||
_TIFFfree(buf);
|
||||
TIFFClose(tif);
|
||||
}
|
||||
@@ -696,17 +688,56 @@ and written with :c:func:`TIFFWriteEncodedTile` or
|
||||
{
|
||||
TIFF* tif = TIFFOpen("myfile.tif", "r");
|
||||
if (tif) {
|
||||
tdata_t buf;
|
||||
ttile_t tile;
|
||||
void *buf;
|
||||
uint32_t tile;
|
||||
|
||||
buf = _TIFFmalloc(TIFFTileSize(tif));
|
||||
for (tile = 0; tile < tiffnumberoftiles(tif); tile++)
|
||||
tiffreadencodedtile(tif, tile, buf, (tsize_t) -1);
|
||||
for (tile = 0; tile < TIFFNumberOfTiles(tif); tile++)
|
||||
TIFFReadEncodedTile(tif, tile, buf, (tmsize_t) -1);
|
||||
_TIFFfree(buf);
|
||||
TIFFClose(tif);
|
||||
}
|
||||
}
|
||||
|
||||
Re-entrancy and Thread Safety
|
||||
-----------------------------
|
||||
|
||||
``Libtiff`` contains no static state except for the registered error /
|
||||
warning handler.
|
||||
All data for an opened TIFF file is encapsulated via the TIFF handle
|
||||
returned by :c:func:`TIFFOpen`. Only the error handlers
|
||||
:c:func:`TIFFError` and :c:func:`TIFFErrorExt`,
|
||||
(as well as :c:func:`TIFFWarning` and :c:func:`TIFFWarningExt`)
|
||||
use TIFF handle independent, common error handler functions.
|
||||
|
||||
:c:func:`TIFFErrorHandlerExtR` and :c:func:`TIFFWarningHandlerExtR`
|
||||
(introduced in ``libtiff`` 4.5) offer the option of registering
|
||||
a separate error handler for each TIFF handle.
|
||||
This error handler is called via the TIFF handle and is therefore
|
||||
re-entrant, which means that it is naturally thread-safe.
|
||||
|
||||
These handlers can already be set before opening a TIFF file using the
|
||||
:c:func:`TIFFOpenOptionsSetErrorHandlerExtR` and
|
||||
:c:func:`TIFFOpenOptionsSetWarningHandlerExtR` functions, respectively.
|
||||
|
||||
This allows multiple TIFF files to be processed simultaneously
|
||||
with multiple threads, with each thread having its own TIFF file.
|
||||
It is not possible (safe) to edit a single TIFF file with multiple
|
||||
threads at the same time.
|
||||
|
||||
Multi Page / Multi Image TIFF
|
||||
-----------------------------
|
||||
|
||||
TIFF images can contain more than one image or page and each image can
|
||||
have sub-images. Furthermore, additional information about an image
|
||||
can be put into *custom* TIFF directories, such as EXIF or GPS.
|
||||
Writing TIFF files with more than one directory (IFD) is not easy
|
||||
because some side effects need to be known.
|
||||
How to read and write multi page TIFF files using ``libtiff`` is explained
|
||||
in :doc:`/multi_page`.
|
||||
For custom directories refer to :doc:`/functions/TIFFCustomDirectory`.
|
||||
|
||||
|
||||
Other Stuff
|
||||
-----------
|
||||
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ There are two mechanisms for storing multiple images in a TIFF file:
|
||||
- such as a subsampled version of the parent image.
|
||||
SubIFD chains are rarely supported.
|
||||
For SubIFD refer also to
|
||||
`Adobe PageMaker® 6.0 TIFF Technical Notes <https://www.awaresystems.be/imaging/tiff/specification/TIFFPM6.pdf>`_
|
||||
`Adobe PageMaker® 6.0 TIFF Technical Notes <https://download.osgeo.org/libtiff/doc/TIFFPM6.pdf>`_
|
||||
|
||||
.. _SubIFDAccess:
|
||||
|
||||
@@ -209,5 +209,5 @@ See also
|
||||
:doc:`terms`,
|
||||
:doc:`/functions/TIFFSetDirectory` (3tiff),
|
||||
:doc:`/functions/TIFFWriteDirectory` (3tiff),
|
||||
`Adobe PageMaker® 6.0 TIFF Technical Notes <https://www.awaresystems.be/imaging/tiff/specification/TIFFPM6.pdf>`_,
|
||||
`Adobe PageMaker® 6.0 TIFF Technical Notes <https://download.osgeo.org/libtiff/doc/TIFFPM6.pdf>`_,
|
||||
`Example from StackOverflow <https://stackoverflow.com/questions/11959617/in-a-tiff-create-a-sub-ifd-with-thumbnail-libtiff>`_
|
||||
@@ -19,7 +19,7 @@ Previously, the project used
|
||||
to track bugs. All remaining tickets in that bugzilla instance were
|
||||
migrated to GitLab issues, and this system should no longer be used.
|
||||
All bugs filed in a older bugzilla at
|
||||
`RemoteSensing.org <http://bugzilla.remotesensing.org/>`_ (pre-April 2008)
|
||||
'RemoteSensing.org (bugzilla.remotesensing.org)' (pre-April 2008)
|
||||
have unfortunately been lost.
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,9 @@ Posts to the list are only accepted from members of the list.
|
||||
Archive
|
||||
-------
|
||||
|
||||
A `Long Term Archive <http://www.awaresystems.be/imaging/tiff/tml.html>`_
|
||||
including recent messages, and most messages back to 1993,
|
||||
with search capabilities is available. This archive has been prepared
|
||||
and hosted by `AWare Systems <http://www.awaresystems.be>`_.
|
||||
A Long Term Archive
|
||||
including most messages from April 2024 back to 1993 has been archived in a text file archive
|
||||
that can be download: `TML.zip <https://download.osgeo.org/libtiff/old/TML.zip>`_
|
||||
or `TML.tar.xz <https://download.osgeo.org/libtiff/old/TML.tar.xz>`_.
|
||||
|
||||
There is no archive for the mailing list messages anymore.
|
||||
+1
-2
@@ -14,6 +14,5 @@ As of April 2024, the project has been placed in the hands of a Project Steering
|
||||
- Even Rouault (@rouault)
|
||||
|
||||
Note that discussion of proposals to the PSC take place on the libtiff mailing list
|
||||
(tiff@lists.osgeo.org, requiring subscription at https://lists.osgeo.org/mailman/listinfo/tiff,
|
||||
archived at https://www.awaresystems.be/imaging/tiff/tml.html),
|
||||
(tiff@lists.osgeo.org, requiring subscription at https://lists.osgeo.org/mailman/listinfo/tiff),
|
||||
and input from all subscribers is welcome. A list of past :ref:`rfcs` is available for review.
|
||||
|
||||
@@ -7,6 +7,7 @@ LibTIFF releases.
|
||||
:maxdepth: 1
|
||||
:titlesonly:
|
||||
|
||||
v4.7.1
|
||||
v4.7.0
|
||||
v4.6.0
|
||||
v4.5.1
|
||||
|
||||
@@ -67,5 +67,5 @@ Contributed software changes
|
||||
* :file:`contrib/dbs/xtiff` was made to compile
|
||||
* :file:`contrib/mac-mpw` is new support for compiling the software on
|
||||
a Macintosh under MPW
|
||||
* :file:`contrib/tags` is information on how to use the tag extenion
|
||||
* :file:`contrib/tags` is information on how to use the tag extension
|
||||
facilities; consult :file:`contrib/tags/README` for details
|
||||
|
||||
@@ -48,7 +48,7 @@ Library changes
|
||||
|
||||
* Fixes to avoid undefined behaviour of signed types (C
|
||||
standard compliance).
|
||||
* Fixes to avoid possible isses when casting to unsigned char.
|
||||
* Fixes to avoid possible issues when casting to unsigned char.
|
||||
* Fixes to avoid undefined behaviour with shifts.
|
||||
* Fix generation of output with 16 bit or 32 bit integer, when
|
||||
byte swapping is needed, in horizontal predictor (:bugzilla:`2521`).
|
||||
|
||||
@@ -342,7 +342,7 @@ Tools changes
|
||||
|
||||
* :file:`tools/tiffdump.c` (:c:func:`ReadDirectory`): Remove :c:type:`uint32` cast to
|
||||
:c:func:`_TIFFmalloc` argument which resulted in Coverity report.
|
||||
Added more mutiplication overflow checks.
|
||||
Added more multiplication overflow checks.
|
||||
|
||||
Contributed software changes
|
||||
----------------------------
|
||||
|
||||
@@ -245,13 +245,13 @@ Library changes
|
||||
|
||||
* :file:`libtiff/tif_lzw.c`: update dec_bitsleft at beginning of
|
||||
LZWDecode(), and update tif_rawcc at end of LZWDecode(). This
|
||||
is needed to properly work with the latest chnges in
|
||||
is needed to properly work with the latest changes in
|
||||
tif_read.c in CHUNKY_STRIP_READ_SUPPORT mode.
|
||||
|
||||
* :file:`libtiff/tif_pixarlog.c`: :c:func:`PixarLogDecode`: resync :c:member:`tif_rawcp`
|
||||
with :c:member:`next_in` and :c:member:`tif_rawcc` with :c:member:`avail_in` at beginning and end
|
||||
of function, similarly to what is done in :c:func:`LZWDecode`. Likely
|
||||
needed so that it works properly with latest chnges in
|
||||
needed so that it works properly with latest changes in
|
||||
:file:`tif_read.c` in :c:macro:`CHUNKY_STRIP_READ_SUPPORT` mode. But untested...
|
||||
|
||||
* :file:`libtiff/tif_getimage.c`: :c:func:`initYCbCrConversion`: add basic
|
||||
|
||||
@@ -77,7 +77,7 @@ Tools changes
|
||||
|
||||
* :program:`tiffsplit`: exit with :c:macro:`EXIT_FAILURE` if there are extra args on the command line
|
||||
|
||||
* :program:`tiffcmp`: fix comparaison with pixels that are fractional number of bytes (#53)
|
||||
* :program:`tiffcmp`: fix comparison with pixels that are fractional number of bytes (#53)
|
||||
|
||||
Contributed software changes
|
||||
----------------------------
|
||||
|
||||
@@ -44,7 +44,7 @@ New/improved functionalities:
|
||||
* :c:func:`TIFFIsBigTiff` function added.
|
||||
* Functions :c:func:`TIFFFieldSetGetSize` and :c:func:`TIFFieldSetGetCountSize` added.
|
||||
* :c:func:`LZWDecode`: major speed improvements (~30% faster)
|
||||
* Predictor 2 (horizontal differenciation): support 64-bit
|
||||
* Predictor 2 (horizontal differentiation): support 64-bit
|
||||
* Support libjpeg 9d
|
||||
|
||||
Bug fixes:
|
||||
|
||||
@@ -96,7 +96,7 @@ Bug fixes:
|
||||
|
||||
* tif_ojpeg.c: checking for division by zero (fixes :issue:`554`).
|
||||
|
||||
* LZWDecode(): avoid crash when trying to read again from a strip whith
|
||||
* LZWDecode(): avoid crash when trying to read again from a strip with
|
||||
a missing end-of-information marker (fixes :issue:`548`).
|
||||
|
||||
* Fixed runtime error: applying zero offset to null pointer
|
||||
@@ -126,7 +126,7 @@ Bug fixes:
|
||||
* :file:`tif_ojpeg.c`: fix :issue:`554` by checking for division by zero
|
||||
in OJPEGWriteHeaderInfo().
|
||||
|
||||
* LZWDecode(): avoid crash when trying to read again from a strip whith
|
||||
* LZWDecode(): avoid crash when trying to read again from a strip with
|
||||
a missing end-of-information marker (:issue:`548`).
|
||||
|
||||
Documentation
|
||||
|
||||
@@ -189,7 +189,7 @@ Bug fixes:
|
||||
- thumbnail: address Coverity scan issues
|
||||
- tiffcp: Add check for limitMalloc return to fix Coverity 1603334
|
||||
- tiffcp: preserve TIFFTAG_REFERENCEBLACKWHITE when doing YCbCr JPEG -> YCbCr JPEG
|
||||
- tiffcp: replace PHOTOMETRIC_YCBCR with PHOTOMETRIC_RGB when outputing to compression != JPEG (refs :issue:`571`)
|
||||
- tiffcp: replace PHOTOMETRIC_YCBCR with PHOTOMETRIC_RGB when outputting to compression != JPEG (refs :issue:`571`)
|
||||
- tiffcp: do not copy tags YCBCRCOEFFICIENTS, YCBCRSUBSAMPLING, YCBCRPOSITIONING,
|
||||
REFERENCEBLACKWHITE. Only set YCBCRSUBSAMPLING when generating YCbCr JPEG
|
||||
- tiffcp: Check also codec of input image, not only from output image (fixes :issue:`606`)
|
||||
|
||||
@@ -0,0 +1,273 @@
|
||||
Changes in TIFF v4.7.1
|
||||
======================
|
||||
|
||||
.. table:: References
|
||||
:widths: auto
|
||||
|
||||
====================== ==========================================
|
||||
Current Version v4.7.1 (:tag:`v4.7.1`)
|
||||
Previous Version :doc:`v4.7.0 <v4.7.0>`
|
||||
Primary Download Site `<https://download.osgeo.org/libtiff/>`_
|
||||
Home HTTP Site #1 `<http://www.simplesystems.org/libtiff/>`_
|
||||
Home HTTP Site #2 `<https://libtiff.gitlab.io/libtiff/>`_
|
||||
====================== ==========================================
|
||||
|
||||
This document provides a summary of significant changes made to the
|
||||
software between the *previous* and *current* versions (see
|
||||
above). A fully-detailed change summary is provided by the :file:`ChangeLog` file
|
||||
included in the release package and by the Git commit history.
|
||||
|
||||
Major changes
|
||||
-------------
|
||||
|
||||
None
|
||||
|
||||
Software configuration changes
|
||||
------------------------------
|
||||
|
||||
* Define HAVE_JPEGTURBO_DUAL_MODE_8_12 and LERC_STATIC in tif_config.h.
|
||||
* CMake: define WORDS_BIGENDIAN via tif_config.h
|
||||
* doc/CMakeLists.txt: remove useless cmake_minimum_required()
|
||||
* CMake: fix build with LLVM/Clang 17 (fixes :issue:`651`)
|
||||
* CMake: set CMP0074 new policy
|
||||
* Set LINKER_LANGUAGE for C targets with C deps
|
||||
* Export tiffxx cmake target (fixes :issue:`674`)
|
||||
* autogen.sh: Enable verbose wget.
|
||||
* configure.ac: Syntax updates for Autoconf 2.71
|
||||
* autogen.sh: Re-implement based on autoreconf. Failure to update
|
||||
config.guess/config.sub does not return error (fixes :issue:`672`)
|
||||
* CMake: fix CMake 4.0 warning when minimum required version is < 3.10.
|
||||
* CMake: Add build option tiff-static (fixes :issue:`709`)
|
||||
|
||||
Library changes
|
||||
---------------
|
||||
|
||||
New/improved functionalities:
|
||||
|
||||
* Add TIFFOpenOptionsSetWarnAboutUnknownTags() for explicit control about
|
||||
emitting warnings for unknown tags. No longer emit warnings about unknown
|
||||
tags by default
|
||||
|
||||
* tif_predict.c: speed-up decompression in some cases.
|
||||
|
||||
API/ABI breaks:
|
||||
|
||||
* None
|
||||
|
||||
Bug fixes:
|
||||
|
||||
* tif_fax3: For fax group 3 data if no EOL is detected, reading is retried
|
||||
without synchronisation for EOLs. (fixes :issue:`54`)
|
||||
|
||||
* Updating TIFFMergeFieldInfo() with read_count=write_count=0 for FIELD_IGNORE.
|
||||
Updating TIFFMergeFieldInfo() with read_count=write_count=0 for FIELD_IGNORE.
|
||||
Improving handling when field_name = NULL.
|
||||
(fixes :issue:`532`)
|
||||
|
||||
* tiff.h: add COMPRESSION_JXL_DNG_1_7=52546 as used for JPEGXL compression in
|
||||
the DNG 1.7 specification
|
||||
|
||||
* TIFFWriteDirectorySec: Increment string length for ASCII tags for codec tags
|
||||
defined with FIELD_xxx bits, as it is done for FIELD_CUSTOM tags.
|
||||
(fixes :issue:`648`)
|
||||
|
||||
* Do not error out on a tag whose tag count value is zero, just issue a warning.
|
||||
Fix parsing a private tag 0x80a6 (fixes :issue:`647`)
|
||||
|
||||
* TIFFDefaultTransferFunction(): give up beyond td_bitspersample = 24
|
||||
(Fixes https://github.com/OSGeo/gdal/issues/10875)
|
||||
|
||||
* tif_getimage.c: Remove unnecessary calls to TIFFRGBAImageOK()
|
||||
(fixes :issue:`175`)
|
||||
|
||||
* Fix writing a Predictor=3 file with non-native endianness
|
||||
|
||||
* _TIFFVSetField(): fix potential use of unallocated memory (out-of-bounds
|
||||
read / nullptr dereference) in case of out-of-memory situation when dealing
|
||||
with custom tags (fixes :issue:`663`)
|
||||
|
||||
* tif_fax3.c: Error out for CCITT fax encoding if SamplesPerPixel is not equal
|
||||
1 and PlanarConfiguration = Contiguous (fixes :issue:`26`)
|
||||
|
||||
* tif_fax3.c: error out after a number of times end-of-line or unexpected bad
|
||||
code words have been reached. (fixes :issue:`670`)
|
||||
|
||||
* Fix memory leak in TIFFSetupStrips() (fixes :issue:`665`)
|
||||
|
||||
* tif_zip.c: Provide zlib allocation functions.
|
||||
Otherwise for zlib built with -DZ_SOLO inflating will fail.
|
||||
|
||||
* Fix memory leak in _TIFFSetDefaultCompressionState. (fixes :issue:`676`)
|
||||
|
||||
* tif_predict.c: Don’t overwrite input buffer of TIFFWriteScanline() if
|
||||
"prediction" is enabled. Use extra working buffer in PredictorEncodeRow().
|
||||
(fixes :issue:`5`)
|
||||
|
||||
* tif_getimage.c: update some integer overflow checks (fixes :issue:`79`)
|
||||
|
||||
* tif_getimage.c: Fix buffer underflow crash for less raster rows at
|
||||
TIFFReadRGBAImageOriented() (fixes :issue:`704`)
|
||||
|
||||
* TIFFReadRGBAImage(): several fixes to avoid buffer overflows.
|
||||
|
||||
* Correct passing arguments to TIFFCvtIEEEFloatToNative() and
|
||||
TIFFCvtIEEEDoubleToNative() if HAVE_IEEEFP is not defined. (fixes
|
||||
:issue:`699`)
|
||||
|
||||
* LZWDecode(): avoid nullptr dereference when trying to read again after EOI
|
||||
marker has been found with remaining output bytes (fixes :issue:`698`)
|
||||
|
||||
* TIFFSetSubDirectory(): check _TIFFCheckDirNumberAndOffset() return.
|
||||
|
||||
* TIFFUnlinkDirectory() and TIFFWriteDirectorySec(): clear tif_rawcp when
|
||||
clearing tif_rawdata (fixes :issue:`711`)
|
||||
|
||||
* JPEGEncodeRaw(): error out if a previous scanline failed to be written, to
|
||||
avoid out-of-bounds access (fixes :issue:`714`)
|
||||
|
||||
* tif_jpeg: Fix bug in JPEGDecodeRaw() if JPEG_LIB_MK1_OR_12BIT is defined for
|
||||
8/12bit dual mode, introduced in libjpeg-turbo 2.2, which was actually
|
||||
released as 3.0. (fixes :issue:`717`)
|
||||
|
||||
* add assert for TIFFReadCustomDirectory infoarray check.
|
||||
|
||||
Other changes:
|
||||
|
||||
* tif_jpeg.c: use JPEG_MAX_DIMENSION constant instead of hard-coded 65535 value
|
||||
|
||||
* tif_lzw.c / tif_packbits.c: use NULL instead of 0.
|
||||
|
||||
* Take into account PACKBITS_READ_ONLY, LZW_READ_ONLY, and LERC_READ_ONLY
|
||||
macros to disable compiling write-support for those codecs.
|
||||
|
||||
* tif_lerc.c: add missing casts
|
||||
|
||||
* Merge several functions implemented twice in different modules.
|
||||
(see :issue:`154`)
|
||||
|
||||
* Remove get_field_type form TIFFField structure because it is not used
|
||||
anymore and rename other parameter to set_get_field_type
|
||||
|
||||
* Silence some Coverity Scan warnigs and mark already dismissed ones.
|
||||
|
||||
* References to codec libraries updated and missing codec compile defines
|
||||
(tiffconf.h) added.
|
||||
|
||||
* Move mkg3states under libtiff/tools. (fixes :issue:`708`)
|
||||
|
||||
* tiff_itrunc(): don't use rand() to please Coverity Scan.
|
||||
|
||||
* tiffio.h: fix compilation with LOGLUV_PUBLIC=0
|
||||
|
||||
* LICENSE.md: Add BSD license for Lempel-Ziv & Welch compression (tif_lzw.c)
|
||||
(fixes :issue:`431`)
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
* TIFFRGBAImage.rst note added for incorrect saving of images with TIFF
|
||||
orientation from 5 (LeftTop) to 8 (LeftBottom) in the raster.
|
||||
|
||||
* TIFFRGBAImage.rst note added about un-associated alpha handling
|
||||
(fixes :issue:`67`)
|
||||
|
||||
* Update "Defining New TIFF Tags" description. (fixes :issue:`642`)
|
||||
|
||||
* Fix return type of TIFFReadEncodedTile()
|
||||
|
||||
* Update the documentation to reflect deprecated typedefs.
|
||||
|
||||
* TIFFWriteDirectory.rst: Clarify TIFFSetWriteOffset() only sets offset for
|
||||
image data and not for IFD data.
|
||||
|
||||
* Update documentation on re-entrancy and thread safety.
|
||||
|
||||
* Remove dead links to no more existing Awaresystems web-site.
|
||||
|
||||
* Updating BigTIFF specification and some miscelaneous editions.
|
||||
|
||||
* Replace some last links and remove last todos.
|
||||
|
||||
* Added hints for correct allocation of TIFFYCbCrtoRGB structure and its
|
||||
associated buffers. (fixes :issue:`681`)
|
||||
|
||||
* Added chapter to "Using the TIFF Library" with links to handling multi-page
|
||||
TIFF and custom directories. (fixes :issue:`43`)
|
||||
|
||||
* update TIFFOpen.rst with the return values of mapproc and unmapproc.
|
||||
(fixes :issue:`12`)
|
||||
|
||||
Tools changes
|
||||
-------------
|
||||
|
||||
New/improved functionality:
|
||||
|
||||
* tiffinfo: add a -W switch to warn about unknown tags.
|
||||
|
||||
* tiffdither: process all pages in input TIFF file.
|
||||
|
||||
Bug fixes:
|
||||
|
||||
* ppm2tiff: Fix bug in `pack_words` trailing bytes, where last two bytes of
|
||||
each line were written wrongly. (fixes :issue:`467`)
|
||||
|
||||
* fax2ps: fix regression of commit 28c38d648b64a66c3218778c4745225fe3e3a06d
|
||||
where TIFFTAG_FAXFILLFUNC is being used rather than an output buffer
|
||||
(fixes :issue:`649`)
|
||||
|
||||
* tiff2pdf: Check TIFFTAG_TILELENGTH and TIFFTAGTILEWIDTH (fixes :issue:`650`)
|
||||
|
||||
* tiff2pdf: check h_samp and v_samp for range 1 to 4 to avoid division by
|
||||
zero. (fixes :issue:`654`)
|
||||
|
||||
* tiff2pdf: avoid null pointer dereference. (fixes :issue:`741`)
|
||||
|
||||
* Improve non-secure integer overflow check (comparison of division result
|
||||
with multiplicant) at compiler optimisation in tiffcp, rgb2ycbcr and tiff2rgba. (fixes :issue:`546`)
|
||||
|
||||
* tiff2rgba: fix some "a partial expression can generate an overflow before it
|
||||
is assigned to a broader type" warnings. (fixes :issue:`682`)
|
||||
|
||||
* tiffdither/tiffmedian: Don't skip the first line of the input image.
|
||||
(fixes :issue:`703`)
|
||||
|
||||
* tiffdither: avoid out-of-bounds read identified in :issue:`733`
|
||||
|
||||
* tiffmedian: error out if TIFFReadScanline() fails (fixes :issue:`707`)
|
||||
|
||||
* tiffmedian: close input file. (fixes :issue:`735`)
|
||||
|
||||
* thumbail: avoid potential out of bounds access (fixes :issue:`715`)
|
||||
|
||||
* tiffcrop: close open TIFF files and release allocated buffers before exiting
|
||||
in case of error to avoid memory leaks. (fixes :issue:`716`)
|
||||
|
||||
* tiffcrop: fix double-free and memory leak exposed by :issue:`721`
|
||||
|
||||
* tiffcrop: avoid buffer overflow. (fixes :issue:`740`)
|
||||
|
||||
* tiffcrop: avoid nullptr dereference. (fixes :issue:`734`)
|
||||
|
||||
* tiffdump: Fix coverity scan issue CID 1373365: Passing tainted expression
|
||||
\*datamem to PrintData, which uses it as a divisor or modulus.
|
||||
|
||||
* tiff2ps: check return of TIFFGetFiled() for TIFFTAG_STRIPBYTECOUNTS and
|
||||
TIFFTAG_TILEBYTECOUNTS to avoid NULL pointer dereference.
|
||||
(fixes :issue:`718`)
|
||||
|
||||
* tiffcmp: fix memory leak when second file cannot be opened.
|
||||
(fixes :issue:`718` and :issue:`729`)
|
||||
|
||||
* tiffcp: fix setting compression level for lossless codecs.
|
||||
(fixes :issue:`730`)
|
||||
|
||||
* raw2tiff: close input file before exit (fixes :issue:`742`)
|
||||
|
||||
Changes to contributed and unsupported tools
|
||||
--------------------------------------------
|
||||
|
||||
* addtiffo: Fixing MSVC compiler warnings
|
||||
|
||||
* Improved oss-fuzz fuzzer tiff_read_rgba_fuzzer.cc.
|
||||
|
||||
* oss-fuzz: fix memory leak in fuzz target.
|
||||
@@ -104,4 +104,4 @@ authored by Frank Warmerdam.
|
||||
Voting history
|
||||
--------------
|
||||
|
||||
Adopted by +1 vote from all above mentionned initial members of the PSC.
|
||||
Adopted by +1 vote from all above mentioned initial members of the PSC.
|
||||
|
||||
@@ -49,8 +49,6 @@ Proposed procedure
|
||||
References to previous contributions to the discussion
|
||||
------------------------------------------------------
|
||||
https://gitlab.com/libtiff/libtiff/-/issues/580 and related merge request,
|
||||
https://www.asmail.be/msg0054917226.html,
|
||||
https://www.asmail.be/msg0055015786.html,
|
||||
https://gitlab.com/libtiff/libtiff/-/merge_requests/569,
|
||||
and discussion in https://gitlab.com/libtiff/libtiff/-/merge_requests/581
|
||||
|
||||
|
||||
+200
-54
@@ -1,27 +1,15 @@
|
||||
BigTIFF Design
|
||||
==============
|
||||
|
||||
|
||||
This design details a 64-bit (larger than 4GB) TIFF format specification.
|
||||
The classic TIFF file format uses 32bit offsets and, as such, is limited to 4 gigabytes.
|
||||
The **BigTIFF** design details a 64-bit (larger than 4GB) TIFF format specification.
|
||||
The design is based on a proposal by Steve Carlsen of Adobe, with input
|
||||
from various other parties.
|
||||
|
||||
Overview of BigTIFF Extension
|
||||
-----------------------------
|
||||
|
||||
Briefly
|
||||
-------
|
||||
|
||||
* Version = 43
|
||||
* 8-byte offset to first IFD
|
||||
* Value/Offset fields are 8 bytes
|
||||
* 8-byte offset to the next IFD
|
||||
* add ``TIFFType`` of ``LONG8``, an 8 byte (unsigned) int
|
||||
* ``StripOffsets`` and ``TileOffsets`` and ``ByteCounts`` can be LONG8
|
||||
|
||||
|
||||
More Detail
|
||||
-----------
|
||||
|
||||
* The Version ID, in header bytes 2-3, formerly decimal 42, now changes to **43**
|
||||
* The Version ID, in header bytes 2-3, formerly decimal 42, changes to **43** for BigTIFF.
|
||||
* Header bytes 4-5 contain the decimal number **8**.
|
||||
|
||||
* If there is some other number here, a reader should give up.
|
||||
@@ -38,53 +26,211 @@ More Detail
|
||||
* All values must begin at an 8-byte-aligned address.
|
||||
|
||||
* 8-byte offset to the Next_IFD, at the end of an IFD.
|
||||
* To keep IFD entries 8-byte-aligned, we begin with an 8-byte (instead of 2-byte) count of the number of directory entries.
|
||||
* Add ``TIFFTypes`` of ``LONG8`` (= 16), an 8 byte (unsigned) int, and ``SLONG8`` (= 17).
|
||||
* Add ``TIFFType`` ``IFD8`` (=18) an 8byte IFD offset.
|
||||
* ``StripOffsets`` and ``TileOffsets`` and ``ByteCounts`` may be ``LONG8`` or the traditionally allowed ``LONG`` or ``SHORT``.
|
||||
* To keep IFD entries 8-byte-aligned, we begin with an 8-byte
|
||||
(instead of 2-byte) count of the number of directory entries.
|
||||
* Add ``TIFFDataTypes`` of ``TIFF_LONG8`` (= 16), an 8-byte unsigned int,
|
||||
and ``TIFF_SLONG8`` (= 17), an 8-byte signed int.
|
||||
* Add ``TIFFDataType`` ``TIFF_IFD8`` (=18) an 8-byte IFD offset.
|
||||
* ``StripOffsets`` and ``TileOffsets`` and ``ByteCounts`` may be ``TIFF_LONG8``
|
||||
or the traditionally allowed ``TIFF_LONG`` or ``TIFF_SHORT``.
|
||||
|
||||
* The proposed extension is :file:`.tf8`, and call it "8-Byte TIFF".
|
||||
* The proposed extension is :file:`.tf8` or :file:`.btf`, and call it "BigTIFF".
|
||||
|
||||
Otherwise, it's just like "original TIFF." ("TIFF Classic?")
|
||||
Otherwise, it's just like "original TIFF" or "classic TIFF".
|
||||
|
||||
BigTIFF Structures compared to Classic TIFF
|
||||
-------------------------------------------
|
||||
|
||||
Open Issues
|
||||
-----------
|
||||
TIFF and BigTIFF File Header
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
* What to call the new format
|
||||
Here's the classic TIFF file header ...
|
||||
|
||||
* ChrisCox -- I don't think end users will understand what "8-byte TIFF" means
|
||||
* AndreyKiselev - 23 Sep 2004 -- What about TIFF64? "64" is a widely used buzzword and should be directly associated with the 64-bit offsets and 64-bit architectures.
|
||||
.. list-table:: Classic File Header
|
||||
:widths: auto
|
||||
:header-rows: 1
|
||||
:align: left
|
||||
:width: 90%
|
||||
|
||||
* What 3 character file extension to use (gotta be DOS compatible)
|
||||
* What 4 character file type to use (for Macintosh)
|
||||
* What MIME type to use
|
||||
* - Offset
|
||||
- Datatype
|
||||
- Value
|
||||
* - 0
|
||||
- UInt16
|
||||
- Byte order indication
|
||||
* - 2
|
||||
- UInt16
|
||||
- Version number (always 42)
|
||||
* - 4
|
||||
- UInt32
|
||||
- Offset to first IFD
|
||||
|
||||
And this is the **BigTIFF** file header ...
|
||||
|
||||
.. list-table:: BigTIFF File Header
|
||||
:widths: auto
|
||||
:header-rows: 1
|
||||
:align: left
|
||||
:width: 90%
|
||||
|
||||
* - Offset
|
||||
- Datatype
|
||||
- Value
|
||||
* - 0
|
||||
- UInt16
|
||||
- Byte order indication
|
||||
* - 2
|
||||
- UInt16
|
||||
- Version number, always **43** for BigTIFF
|
||||
* - 4
|
||||
- UInt16
|
||||
- | Bytesize of offsets.
|
||||
| Always 8 in BigTIFF, it provides a nice way to move to 16-byte pointers some day.
|
||||
| If there is some other value here, a reader should give up.
|
||||
* - 6
|
||||
- UInt16
|
||||
- | Reserved, always 0.
|
||||
| If there is some other value here, a reader should give up.
|
||||
* - 8
|
||||
- UInt64
|
||||
- Offset to first IFD
|
||||
|
||||
The last members in both variants of the structure point to the first IFD
|
||||
(Image File Directory).
|
||||
This IFD can be located anywhere in the file. Every 'page' in a multi-page TIFF,
|
||||
classic TIFF or BigTIFF, is represented by exactly one IFD.
|
||||
|
||||
TIFF and BigTIFF Image File Directory Structure
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Here's a more detailed view of the classic IFD ...
|
||||
|
||||
.. list-table:: Classic IFD
|
||||
:widths: auto
|
||||
:header-rows: 1
|
||||
:align: left
|
||||
|
||||
* - Offset
|
||||
- Datatype
|
||||
- Value
|
||||
* - 0
|
||||
- UInt16
|
||||
- Number of tags in IFD
|
||||
* - 2 + x * 12
|
||||
- Tag structure
|
||||
- Tag data
|
||||
* - 2 + (Number of tags in IFD) * 12
|
||||
- UInt32
|
||||
- | Offset to next IFD, if there is a next IFD,
|
||||
| 0 otherwise.
|
||||
|
||||
And this is how the IFD looks like in the **BigTIFF** file format ...
|
||||
|
||||
.. list-table:: BigTIFF IFD
|
||||
:widths: auto
|
||||
:header-rows: 1
|
||||
:align: left
|
||||
|
||||
* - Offset
|
||||
- Datatype
|
||||
- Value
|
||||
* - 0
|
||||
- UInt64
|
||||
- Number of tags in IFD
|
||||
* - 8 + x * 20
|
||||
- Tag structure
|
||||
- Tag data
|
||||
* - 8 + (Number of tags in IFD) * 20
|
||||
- UInt64
|
||||
- | Offset to next IFD, if there is a next IFD,
|
||||
| 0 otherwise.
|
||||
|
||||
TIFF and BigTIFF Tag Structure
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The tags in this IFD should be sorted by code, in both classic TIFF and BigTIFF.
|
||||
Every tag takes up exactly 12 bytes in classic TIFF, and looks like this ...
|
||||
|
||||
.. list-table:: Classic Tag Structure
|
||||
:widths: auto
|
||||
:header-rows: 1
|
||||
:align: left
|
||||
|
||||
* - Offset
|
||||
- Datatype
|
||||
- Value
|
||||
* - 0
|
||||
- UInt16
|
||||
- Tag identifying code
|
||||
* - 2
|
||||
- UInt16
|
||||
- Datatype of tag data
|
||||
* - 4
|
||||
- UInt32
|
||||
- Number of values
|
||||
* - 8
|
||||
- | x * tag data datatype
|
||||
| or UInt32 offset
|
||||
- | Tag data
|
||||
| or offset to tag data
|
||||
|
||||
This same tag structure, in **BigTIFF**, takes up 20 bytes, and looks like this ...
|
||||
|
||||
.. list-table:: BigTIFF Tag Structure
|
||||
:widths: auto
|
||||
:header-rows: 1
|
||||
:align: left
|
||||
|
||||
* - Offset
|
||||
- Datatype
|
||||
- Value
|
||||
* - 0
|
||||
- UInt16
|
||||
- Tag identifying code
|
||||
* - 2
|
||||
- UInt16
|
||||
- Datatype of tag data
|
||||
* - 4
|
||||
- UInt64
|
||||
- Number of values
|
||||
* - 12
|
||||
- | x * tag data datatype
|
||||
| or UInt64 offset
|
||||
- | Tag data
|
||||
| or offset to tag data
|
||||
|
||||
The same rule for 'inlining' the tag data applies to both classic TIFF and BigTIFF,
|
||||
only the threshold size differs.
|
||||
In classic TIFF, the tag data was written inside the tag structure, in the IFD,
|
||||
if its size was smaller than or equal to 4 bytes. Otherwise, it's written elsewhere,
|
||||
and pointed to.
|
||||
In BigTIFF, the tag data is written inside the tag structure, in the IFD,
|
||||
if its size is smaller than or equal to 8 bytes.
|
||||
|
||||
Other miscellaneous details
|
||||
---------------------------
|
||||
|
||||
Amongst the suggested file extensions are 'tif', 'tf8' and 'btf'.
|
||||
|
||||
Three datatypes are added to classic TIFF:
|
||||
|
||||
- ``TIFF_LONG8`` = 16, being unsigned 8-byte (64-bit) integer
|
||||
- ``TIFF_SLONG8`` = 17, being signed 8-byte (64-bit) integer
|
||||
- ``TIFF_IFD8`` = 18, being a new unsigned 8-byte (64-bit) IFD offset.
|
||||
|
||||
The ``StripOffsets``, ``StripByteCounts``, ``TileOffsets``, and ``TileByteCounts`` tags are allowed
|
||||
to have the datatype ``TIFF_LONG8`` in BigTIFF. Old datatypes ``TIFF_LONG``, and ``TIFF_SHORT``
|
||||
where allowed in the TIFF 6.0 specification, are still valid in BigTIFF, too.
|
||||
|
||||
Likewise, tags that point to other IFDs, like e.g. the SubIFDs tag, are now allowed
|
||||
to have the datatype ``TIFF_IFD8`` in BigTIFF. Again, the old datatypes TIFF_IFD,
|
||||
and the hardly recommendable ``TIFF_LONG``, are still valid, too.
|
||||
|
||||
Samples
|
||||
-------
|
||||
BigTIFF sample file BigTIFFSamples.zip contains a series of 8 different BigTIFF files.
|
||||
Especially note the BigTIFFSamples.html file in this zip, documenting their characteristics.
|
||||
|
||||
`Example files <http://www.awaresystems.be/imaging/tiff/bigtiff/BigTIFFSamples.zip>`_
|
||||
from Joris Van Damme.
|
||||
That sample file from Joris Van Damme can still be found at the Wayback Machine:
|
||||
`BigTIFF Example files <https://web.archive.org/web/20240329145231/https://www.awaresystems.be/imaging/tiff/bigtiff/BigTIFFSamples.zip>`_
|
||||
|
||||
|
||||
Changes
|
||||
-------
|
||||
|
||||
* ``TIFFType`` 13 is ``ttIFD``, 14 is assigned to ``ttUnicode``, and 15 is assigned to ``ttComplex``. So, I changed the types for ``ttLong8`` and ``ttSLong8`` to 16 and 17, respectively.
|
||||
|
||||
* AndreyKiselev - 23 Sep 2004 -- Where are these fields defined? Is there any new Technical Note or something? And what is encoding behind the word "Unicode"?
|
||||
* ChrisCox - 27 Sep 2004 -- They are in the Adobe TIFF definitions. I am still working on releasing updated TIFF documentation.
|
||||
|
||||
* Added list of open issues.
|
||||
* settle on version 43
|
||||
* cleanup
|
||||
* ``TIFFType`` 18 (8 byte IFD) added.
|
||||
|
||||
* Clarified that fields which may be ``LONG8`` can also be one of the old supported types.
|
||||
|
||||
|
||||
See also
|
||||
--------
|
||||
|
||||
`AWare Systems' informal overview of the BigTIFF proposal <http://www.awaresystems.be/imaging/tiff/bigtiff.html>`_.
|
||||
|
||||
@@ -2,22 +2,23 @@ LibTIFF Coverage of the BigTIFF Specification
|
||||
=============================================
|
||||
|
||||
Since LibTIFF version 4.0.0, the BigTIFF format specification has been implemented within LibTIFF.
|
||||
BigTIFF is a backward-compatible extension to the `TIFF <http://www.awaresystems.be/imaging/tiff.html>`_
|
||||
file format.
|
||||
BigTIFF is a backward-compatible extension to the TIFF file format.
|
||||
|
||||
BigTIFF logically extends the original TIFF file format (referred to as 'ClassicTIFF' from now on).
|
||||
The BigTIFF specification is the result of work by a variety of parties on the LibTIFF mailing list, including
|
||||
the then current LibTIFF maintainers, Joris Van Damme and Adobe staff. The BigTIFF specification has not yet
|
||||
been officially approved by the TIFF specification owner (Adobe), but implementation within LibTIFF
|
||||
could accelerate that process. For more information on the BigTIFF file format, we recommend AWare Systems'
|
||||
`BigTIFF page <http://www.awaresystems.be/imaging/tiff/bigtiff.html>`_.
|
||||
could accelerate that process. For more information on the BigTIFF file format, for example see :doc:`bigtiff`.
|
||||
Another overview and some further links can be found at
|
||||
`<https://www.loc.gov/preservation/digital/formats/fdd/fdd000328.shtml>`_.
|
||||
|
||||
BigTIFF is especially useful for people and vendors that are confronted with very large images, and
|
||||
still seek to use an open, simple, and extendable format. This requirement is frequently encountered in the
|
||||
geospatial field, but also concerns large format scanners, medical imaging and other fields.
|
||||
|
||||
The LibTiff BigTIFF support was made possible by four sponsors funding the project. The programming work was
|
||||
primarily done by `Joris Van Damme (AWare Systems) <http://www.awaresystems.be/index.html>`_.
|
||||
primarily done by Joris Van Damme (AWare Systems) from 2004 to 2008.
|
||||
|
||||
The sponsors for the BigTIFF support work in LibTIFF, in alphabetical order:
|
||||
|
||||
.. list-table:: Sponsors
|
||||
@@ -35,7 +36,7 @@ The sponsors for the BigTIFF support work in LibTIFF, in alphabetical order:
|
||||
* - .. image:: bigtiffpr_images/leica.png
|
||||
:width: 100%
|
||||
:alt: Leica Geosystems Geospatial Imaging
|
||||
- `Leica Geosystems Geospatial Imaging <http://gi.leica-geosystems.com/default.aspx>`_ offers a
|
||||
- 'Leica Geosystems Geospatial Imaging' offers a
|
||||
range of workflow solutions for photogrammetry, mapping, remote sensing, catalog management and exploitation
|
||||
of geospatial imagery. Enterprise organizations use this imagery as the basis for generating information for
|
||||
both education and decision making processes. Those who use Leica Geosystems products every day trust them
|
||||
@@ -51,7 +52,7 @@ The sponsors for the BigTIFF support work in LibTIFF, in alphabetical order:
|
||||
* - .. image:: bigtiffpr_images/weogeo.png
|
||||
:width: 100%
|
||||
:alt: WeoGeo
|
||||
- `WeoGeo <http://www.weogeo.com/>`_ is a web-based data management resource for the geospatial
|
||||
- 'WeoGeo' is a web-based data management resource for the geospatial
|
||||
industry that allows the free market exchange of mapping related imagery products, featuring an innovative
|
||||
solution that efficiently manages digital mapping files of any size. With an intuitive user interface
|
||||
and the scalable power of Amazon Web Services (AWS), geospatial professionals can view, sort, search,
|
||||
|
||||
@@ -179,7 +179,10 @@ proposal given in TIFF Technical Note #2.
|
||||
The following table shows the tags that are recognized
|
||||
and how they are used by the library. If no use is indicated,
|
||||
then the library reads and writes the tag, but does not use it internally.
|
||||
For the meaning of the tags look in https://www.awaresystems.be/imaging/tiff/tifftags.html
|
||||
|
||||
Apart of the TIFF 6.0 specification the meaning of tags can be found on various places
|
||||
in the internet. For example:
|
||||
https://www.loc.gov/preservation/digital/formats/content/tiff_tags.shtml
|
||||
|
||||
:file:`libtiff` supports also many private tags allocated for organizations that wish to
|
||||
store additional information in a TIFF file.
|
||||
|
||||
@@ -5,34 +5,24 @@ TIFF File Format Specification
|
||||
:width: 139
|
||||
:alt: jim
|
||||
|
||||
A copy of the 6.0 specification is available from Adobe at
|
||||
`<http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf>`_
|
||||
or from the libtiff
|
||||
ftp site at `<https://download.osgeo.org/libtiff/doc/TIFF6.pdf>`_.
|
||||
| A copy of the 6.0 specification is available from the libtiff
|
||||
ftp site at `<https://download.osgeo.org/libtiff/doc/TIFF6.pdf>`_.
|
||||
| Other places are `<https://www.itu.int/itudoc/itu-t/com16/tiff-fx/docs/tiff6.pdf>`_
|
||||
and `<https://www.loc.gov/preservation/digital/formats/fdd/fdd000022.shtml>`_
|
||||
|
||||
Draft :doc:`technote2` covers problems
|
||||
with the TIFF 6.0 design for embedding JPEG-compressed data in TIFF, and
|
||||
with the TIFF 6.0 design for embedding JPEG-compressed data in TIFF, and
|
||||
describes an alternative.
|
||||
|
||||
Other Adobe information on TIFF can be retrieved from
|
||||
`<http://partners.adobe.com/public/developer/tiff/index.html>`_.
|
||||
|
||||
Joris Van Damme maintains a list of known tags and their descriptions and
|
||||
definitions. It is available online at
|
||||
`<http://www.awaresystems.be/imaging/tiff/tifftags.html>`_.
|
||||
|
||||
There is a FAQ, related both to TIFF format and libtiff library:
|
||||
`<http://www.awaresystems.be/imaging/tiff/faq.html>`_.
|
||||
The LibTIFF coverage of the TIFF 6.0 specification is detailed in :doc:`coverage`.
|
||||
|
||||
A design for a TIFF variation supporting files larger than 4GB is detailed in :doc:`bigtiff`.
|
||||
|
||||
The LibTIFF coverage of the TIFF 6.0 specification is detailed in :doc:`coverage`.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:titlesonly:
|
||||
|
||||
technote2
|
||||
bigtiff
|
||||
coverage
|
||||
bigtiff
|
||||
coverage-bigtiff
|
||||
|
||||
@@ -138,7 +138,7 @@ means that the control logic must know a great deal more about JPEG details
|
||||
than we would like. The parsing and reconstruction of the markers also
|
||||
represents a fair amount of unnecessary work.
|
||||
|
||||
Quite a few implementors have proposed writing "TIFF/JPEG" files in which
|
||||
Quite a few implementers have proposed writing "TIFF/JPEG" files in which
|
||||
a standard JPEG datastream is simply dumped into the file and pointed to
|
||||
by JPEGInterchangeFormat. To avoid parsing the JPEG datastream, they
|
||||
suggest not writing the JPEG auxiliary fields (JPEGxxTables etc) nor even
|
||||
@@ -149,7 +149,7 @@ is arguably not TIFF at all, since *all* TIFF-reading applications expect
|
||||
to find strip or tile pointers. A subset implementation that is not
|
||||
upward-compatible with the full spec is clearly unacceptable. However,
|
||||
the frequency with which this idea has come up makes it clear that
|
||||
implementors find the existing Section 22 too complex.
|
||||
implementers find the existing Section 22 too complex.
|
||||
|
||||
|
||||
Overview of the solution
|
||||
@@ -260,7 +260,7 @@ will provide additional ``PhotometricInterpretation`` values and a more general
|
||||
way of defining subsampling, so as to allow more flexibility in
|
||||
JPEG-compressed files. But that issue is not addressed in this Tech Note.
|
||||
|
||||
Implementors should note that many popular JPEG codecs
|
||||
Implementers should note that many popular JPEG codecs
|
||||
(compressor/decompressors) provide automatic color conversion and
|
||||
downsampling, so that the application may supply full-size RGB data which
|
||||
is nonetheless converted to downsampled YCbCr. This is an implementation
|
||||
@@ -556,7 +556,7 @@ single-datastream files. Support for tiled TIFF files is strongly
|
||||
recommended but not required.
|
||||
|
||||
|
||||
Other recommendations for implementors
|
||||
Other recommendations for implementers
|
||||
--------------------------------------
|
||||
|
||||
The TIFF tag ``Compression=7`` guarantees only that the compressed data is
|
||||
@@ -621,7 +621,7 @@ Compression Standard", Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1.
|
||||
|
||||
This textbook is by far the most complete exposition of JPEG in existence.
|
||||
It includes the full text of the ISO JPEG standards (DIS 10918-1 and draft
|
||||
DIS 10918-2). No would-be JPEG implementor should be without it.
|
||||
DIS 10918-2). No would-be JPEG implementer should be without it.
|
||||
|
||||
[3] ISO/IEC IS 10918-1, "Digital Compression and Coding of Continuous-tone
|
||||
Still Images, Part 1: Requirements and guidelines", February 1994.
|
||||
|
||||
@@ -55,6 +55,10 @@ Options
|
||||
|
||||
Set the initial TIFF directory to *#*.
|
||||
|
||||
.. option:: -W
|
||||
|
||||
Warn about unknown tags.
|
||||
|
||||
See also
|
||||
--------
|
||||
|
||||
|
||||
+12
-23
@@ -49,7 +49,7 @@ set(tiff_private_HEADERS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/tif_config.h)
|
||||
|
||||
|
||||
add_library(tiff libtiff.def)
|
||||
add_library(tiff ${TIFF_BUILD_LIB_VALUE} libtiff.def)
|
||||
add_library(TIFF::tiff ALIAS tiff)
|
||||
|
||||
target_sources(tiff PRIVATE
|
||||
@@ -150,9 +150,7 @@ endif()
|
||||
if(JPEG_SUPPORT)
|
||||
target_link_libraries(tiff PRIVATE JPEG::JPEG)
|
||||
string(APPEND tiff_requires_private " libjpeg")
|
||||
if(HAVE_JPEGTURBO_DUAL_MODE_8_12)
|
||||
target_compile_definitions(tiff PRIVATE HAVE_JPEGTURBO_DUAL_MODE_8_12)
|
||||
elseif(JPEG_DUAL_MODE_8_12)
|
||||
if(JPEG_DUAL_MODE_8_12 AND NOT HAVE_JPEGTURBO_DUAL_MODE_8_12)
|
||||
target_include_directories(tiff PRIVATE ${JPEG12_INCLUDE_DIR})
|
||||
target_link_libraries(tiff PRIVATE ${JPEG12_LIBRARIES})
|
||||
endif()
|
||||
@@ -164,9 +162,6 @@ endif()
|
||||
if(LERC_SUPPORT)
|
||||
target_link_libraries(tiff PRIVATE LERC::LERC)
|
||||
if(LERC_VERSION_STRING VERSION_GREATER_EQUAL "4.0")
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
set_target_properties(tiff PROPERTIES COMPILE_DEFINITIONS LERC_STATIC)
|
||||
endif()
|
||||
string(APPEND tiff_requires_private " Lerc")
|
||||
else()
|
||||
list(APPEND tiff_libs_private_list "${LERC_LIBRARY}")
|
||||
@@ -201,8 +196,13 @@ if(NOT CYGWIN)
|
||||
set_target_properties(tiff PROPERTIES VERSION ${SO_VERSION})
|
||||
endif()
|
||||
if(HAVE_LD_VERSION_SCRIPT)
|
||||
set_target_properties(tiff PROPERTIES LINK_FLAGS
|
||||
"-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libtiff.map")
|
||||
if (CMAKE_VERSION GREATER_EQUAL 3.29 AND CMAKE_C_COMPILER_LINKER_ID STREQUAL "LLD" AND CMAKE_C_COMPILER_LINKER_VERSION GREATER_EQUAL 17)
|
||||
set_target_properties(tiff PROPERTIES LINK_FLAGS
|
||||
"-Wl,--undefined-version -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libtiff.map")
|
||||
else()
|
||||
set_target_properties(tiff PROPERTIES LINK_FLAGS
|
||||
"-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libtiff.map")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(tiff-install)
|
||||
@@ -242,7 +242,7 @@ if(CXX_SUPPORT)
|
||||
if (WIN32 AND NOT MINGW)
|
||||
add_library(tiffxx STATIC ../placeholder.h)
|
||||
else()
|
||||
add_library(tiffxx ../placeholder.h)
|
||||
add_library(tiffxx ${TIFF_BUILD_LIB_VALUE} ../placeholder.h)
|
||||
endif()
|
||||
|
||||
add_library(TIFF::CXX ALIAS tiffxx)
|
||||
@@ -265,7 +265,7 @@ if(CXX_SUPPORT)
|
||||
endif()
|
||||
|
||||
if(tiff-install)
|
||||
install(TARGETS tiffxx
|
||||
install(TARGETS tiffxx EXPORT TiffTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
@@ -273,17 +273,6 @@ if(CXX_SUPPORT)
|
||||
install(FILES ${tiffxx_HEADERS}
|
||||
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
endif()
|
||||
|
||||
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_CROSSCOMPILING)
|
||||
add_executable(tiff_mkg3states ../placeholder.h)
|
||||
target_sources(tiff_mkg3states PRIVATE mkg3states.c tif_fax3.h)
|
||||
target_link_libraries(tiff_mkg3states tiff tiff_port)
|
||||
|
||||
add_custom_target(tiff_faxtable
|
||||
DEPENDS tiff_mkg3states
|
||||
COMMAND ${CMAKE_COMMAND} -E rm "tif_fax3sm.c"
|
||||
COMMAND tiff_mkg3states -b -c const "tif_fax3sm.c"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
endif()
|
||||
|
||||
@@ -138,29 +138,3 @@ libtiffxx_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libtiffxx.map
|
||||
endif
|
||||
libtiffxx_la_LIBADD = $(LIBTIFF)
|
||||
libtiffxx_la_DEPENDENCIES = libtiff.la
|
||||
|
||||
#
|
||||
# The finite state machine tables used by the G3/G4 decoders
|
||||
# are generated by the mkg3states program. On systems without
|
||||
# make these rules have to be manually carried out.
|
||||
#
|
||||
noinst_PROGRAMS = mkg3states
|
||||
mkg3states_SOURCES = mkg3states.c tif_fax3.h
|
||||
mkg3states_LDADD = $(LIBPORT)
|
||||
|
||||
faxtable: mkg3states
|
||||
(rm -f tif_fax3sm.c && ./mkg3states -b -c const tif_fax3sm.c)
|
||||
|
||||
if STATIC_LERC
|
||||
extra_CPPFLAGS = -DLERC_STATIC
|
||||
else
|
||||
extra_CPPFLAGS =
|
||||
endif
|
||||
|
||||
if HAVE_JPEGTURBO_DUAL_MODE_8_12
|
||||
JPEGTURBO_CPPFLAGS = -DHAVE_JPEGTURBO_DUAL_MODE_8_12
|
||||
else
|
||||
JPEGTURBO_CPPFLAGS =
|
||||
endif
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/libtiff -I$(top_srcdir)/port $(extra_CPPFLAGS) $(JPEGTURBO_CPPFLAGS)
|
||||
|
||||
@@ -88,6 +88,7 @@ EXPORTS TIFFAccessTagMethods
|
||||
TIFFOpenOptionsSetMaxCumulatedMemAlloc
|
||||
TIFFOpenOptionsSetMaxSingleMemAlloc
|
||||
TIFFOpenOptionsSetErrorHandlerExtR
|
||||
TIFFOpenOptionsSetWarnAboutUnknownTags
|
||||
TIFFOpenOptionsSetWarningHandlerExtR
|
||||
TIFFPrintDirectory
|
||||
TIFFRGBAImageBegin
|
||||
|
||||
@@ -218,3 +218,7 @@ LIBTIFF_4.5 {
|
||||
LIBTIFF_4.6.1 {
|
||||
TIFFOpenOptionsSetMaxCumulatedMemAlloc;
|
||||
} LIBTIFF_4.5;
|
||||
|
||||
LIBTIFF_4.7.1 {
|
||||
TIFFOpenOptionsSetWarnAboutUnknownTags;
|
||||
} LIBTIFF_4.6.1;
|
||||
|
||||
+4
-1
@@ -131,7 +131,10 @@ static int TIFFDefaultTransferFunction(TIFF *tif, TIFFDirectory *td)
|
||||
tmsize_t i, n, nbytes;
|
||||
|
||||
tf[0] = tf[1] = tf[2] = 0;
|
||||
if (td->td_bitspersample >= sizeof(tmsize_t) * 8 - 2)
|
||||
// Do not try to generate a default TransferFunction beyond 24 bits.
|
||||
// This otherwise leads to insane amounts, resulting in denial of service
|
||||
// See https://github.com/OSGeo/gdal/issues/10875
|
||||
if (td->td_bitspersample > 24)
|
||||
return 0;
|
||||
|
||||
n = ((tmsize_t)1) << td->td_bitspersample;
|
||||
|
||||
@@ -48,7 +48,6 @@ void TIFFCleanup(TIFF *tif)
|
||||
*/
|
||||
if (tif->tif_mode != O_RDONLY)
|
||||
TIFFFlush(tif);
|
||||
(*tif->tif_cleanup)(tif);
|
||||
TIFFFreeDirectory(tif);
|
||||
|
||||
_TIFFCleanupIFDOffsetAndNumberMaps(tif);
|
||||
|
||||
@@ -80,11 +80,17 @@
|
||||
#cmakedefine HAVE_UNISTD_H 1
|
||||
|
||||
/* 8/12 bit libjpeg dual mode enabled */
|
||||
#cmakedefine JPEG_DUAL_MODE_8_12 1 1
|
||||
#cmakedefine JPEG_DUAL_MODE_8_12 1
|
||||
|
||||
/* 8/12 bit dual mode JPEG built into libjpeg-turbo 3.0+ */
|
||||
#cmakedefine HAVE_JPEGTURBO_DUAL_MODE_8_12 1
|
||||
|
||||
/* Support LERC compression */
|
||||
#cmakedefine LERC_SUPPORT 1
|
||||
|
||||
/* Define to 1 when building a static libtiff with LERC enabled. */
|
||||
#cmakedefine LERC_STATIC
|
||||
|
||||
/* 12bit libjpeg primary include file with path */
|
||||
#define LIBJPEG_12_PATH "@LIBJPEG_12_PATH@"
|
||||
|
||||
@@ -133,7 +139,7 @@
|
||||
# endif
|
||||
#else
|
||||
# ifndef WORDS_BIGENDIAN
|
||||
# undef WORDS_BIGENDIAN
|
||||
# cmakedefine WORDS_BIGENDIAN 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -85,9 +85,15 @@
|
||||
/* 8/12 bit libjpeg dual mode enabled */
|
||||
#undef JPEG_DUAL_MODE_8_12
|
||||
|
||||
/* 8/12 bit dual mode JPEG built into libjpeg-turbo 3.0+ */
|
||||
#undef HAVE_JPEGTURBO_DUAL_MODE_8_12
|
||||
|
||||
/* Support LERC compression */
|
||||
#undef LERC_SUPPORT
|
||||
|
||||
/* Define to 1 when building a static libtiff with LERC enabled. */
|
||||
#undef LERC_STATIC
|
||||
|
||||
/* 12bit libjpeg primary include file with path */
|
||||
#undef LIBJPEG_12_PATH
|
||||
|
||||
|
||||
+21
-19
@@ -723,10 +723,9 @@ static int _TIFFVSetField(TIFF *tif, uint32_t tag, va_list ap)
|
||||
{
|
||||
TIFFTagValue *new_customValues;
|
||||
|
||||
td->td_customValueCount++;
|
||||
new_customValues = (TIFFTagValue *)_TIFFreallocExt(
|
||||
tif, td->td_customValues,
|
||||
sizeof(TIFFTagValue) * td->td_customValueCount);
|
||||
sizeof(TIFFTagValue) * (td->td_customValueCount + 1));
|
||||
if (!new_customValues)
|
||||
{
|
||||
TIFFErrorExtR(tif, module,
|
||||
@@ -737,6 +736,7 @@ static int _TIFFVSetField(TIFF *tif, uint32_t tag, va_list ap)
|
||||
goto end;
|
||||
}
|
||||
|
||||
td->td_customValueCount++;
|
||||
td->td_customValues = new_customValues;
|
||||
|
||||
tv = td->td_customValues + (td->td_customValueCount - 1);
|
||||
@@ -748,8 +748,8 @@ static int _TIFFVSetField(TIFF *tif, uint32_t tag, va_list ap)
|
||||
/*
|
||||
* Set custom value ... save a copy of the custom tag value.
|
||||
*/
|
||||
/*--: Rational2Double: For Rationals evaluate "set_field_type" to
|
||||
* determine internal storage size. */
|
||||
/*--: Rational2Double: For Rationals evaluate "set_get_field_type"
|
||||
* to determine internal storage size. */
|
||||
tv_size = TIFFFieldSetGetSize(fip);
|
||||
if (tv_size == 0)
|
||||
{
|
||||
@@ -842,7 +842,7 @@ static int _TIFFVSetField(TIFF *tif, uint32_t tag, va_list ap)
|
||||
fip->field_writecount == TIFF_SPP || tv->count > 1)
|
||||
{
|
||||
/*--: Rational2Double: For Rationals tv_size is set above to
|
||||
* 4 or 8 according to fip->set_field_type! */
|
||||
* 4 or 8 according to fip->set_get_field_type! */
|
||||
_TIFFmemcpy(tv->value, va_arg(ap, void *),
|
||||
tv->count * tv_size);
|
||||
/* Test here for too big values for LONG8, SLONG8 in
|
||||
@@ -977,7 +977,8 @@ static int _TIFFVSetField(TIFF *tif, uint32_t tag, va_list ap)
|
||||
case TIFF_RATIONAL:
|
||||
case TIFF_SRATIONAL:
|
||||
/*-- Rational2Double: For Rationals tv_size is set
|
||||
* above to 4 or 8 according to fip->set_field_type!
|
||||
* above to 4 or 8 according to
|
||||
* fip->set_get_field_type!
|
||||
*/
|
||||
{
|
||||
if (tv_size == 8)
|
||||
@@ -995,11 +996,11 @@ static int _TIFFVSetField(TIFF *tif, uint32_t tag, va_list ap)
|
||||
* default. */
|
||||
if (tv_size != 4)
|
||||
{
|
||||
TIFFErrorExtR(
|
||||
tif, module,
|
||||
"Rational2Double: .set_field_type "
|
||||
"in not 4 but %d",
|
||||
tv_size);
|
||||
TIFFErrorExtR(tif, module,
|
||||
"Rational2Double: "
|
||||
".set_get_field_type "
|
||||
"in not 4 but %d",
|
||||
tv_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1526,7 +1527,7 @@ static int _TIFFVGetField(TIFF *tif, uint32_t tag, va_list ap)
|
||||
case TIFF_SRATIONAL:
|
||||
{
|
||||
/*-- Rational2Double: For Rationals evaluate
|
||||
* "set_field_type" to determine internal
|
||||
* "set_get_field_type" to determine internal
|
||||
* storage size and return value size. */
|
||||
int tv_size = TIFFFieldSetGetSize(fip);
|
||||
if (tv_size == 8)
|
||||
@@ -1544,11 +1545,11 @@ static int _TIFFVGetField(TIFF *tif, uint32_t tag, va_list ap)
|
||||
* default. */
|
||||
if (tv_size != 4)
|
||||
{
|
||||
TIFFErrorExtR(
|
||||
tif, "_TIFFVGetField",
|
||||
"Rational2Double: .set_field_type "
|
||||
"in not 4 but %d",
|
||||
tv_size);
|
||||
TIFFErrorExtR(tif, "_TIFFVGetField",
|
||||
"Rational2Double: "
|
||||
".set_get_field_type "
|
||||
"in not 4 but %d",
|
||||
tv_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1620,6 +1621,7 @@ void TIFFFreeDirectory(TIFF *tif)
|
||||
TIFFDirectory *td = &tif->tif_dir;
|
||||
int i;
|
||||
|
||||
(*tif->tif_cleanup)(tif);
|
||||
_TIFFmemset(td->td_fieldsset, 0, sizeof(td->td_fieldsset));
|
||||
CleanupField(td_sminsamplevalue);
|
||||
CleanupField(td_smaxsamplevalue);
|
||||
@@ -2206,7 +2208,7 @@ int TIFFSetSubDirectory(TIFF *tif, uint64_t diroff)
|
||||
_TIFFCleanupIFDOffsetAndNumberMaps(tif);
|
||||
tif->tif_curdir = 0; /* first directory of new chain */
|
||||
/* add this offset to new IFD list */
|
||||
_TIFFCheckDirNumberAndOffset(tif, tif->tif_curdir, diroff);
|
||||
retval = _TIFFCheckDirNumberAndOffset(tif, tif->tif_curdir, diroff);
|
||||
}
|
||||
/* To be able to return from SubIFD or custom-IFD to main-IFD */
|
||||
tif->tif_setdirectory_force_absolute = TRUE;
|
||||
@@ -2335,12 +2337,12 @@ int TIFFUnlinkDirectory(TIFF *tif, tdir_t dirn)
|
||||
* means that the caller can only append to the directory
|
||||
* chain.
|
||||
*/
|
||||
(*tif->tif_cleanup)(tif);
|
||||
if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata)
|
||||
{
|
||||
_TIFFfreeExt(tif, tif->tif_rawdata);
|
||||
tif->tif_rawdata = NULL;
|
||||
tif->tif_rawcc = 0;
|
||||
tif->tif_rawcp = NULL;
|
||||
tif->tif_rawdataoff = 0;
|
||||
tif->tif_rawdataloaded = 0;
|
||||
}
|
||||
|
||||
+9
-10
@@ -329,16 +329,15 @@ extern "C"
|
||||
|
||||
struct _TIFFField
|
||||
{
|
||||
uint32_t field_tag; /* field's tag */
|
||||
short field_readcount; /* read count/TIFF_VARIABLE/TIFF_SPP */
|
||||
short field_writecount; /* write count/TIFF_VARIABLE */
|
||||
TIFFDataType field_type; /* type of associated data */
|
||||
uint32_t
|
||||
field_anonymous; /* if true, this is a unknown / anonymous tag */
|
||||
TIFFSetGetFieldType set_field_type; /* type to be passed to TIFFSetField
|
||||
and TIFFGetField*/
|
||||
TIFFSetGetFieldType get_field_type; /* not used */
|
||||
unsigned short field_bit; /* bit in fieldsset bit vector */
|
||||
uint32_t field_tag; /* field's tag */
|
||||
short field_readcount; /* read count/TIFF_VARIABLE/TIFF_SPP */
|
||||
short field_writecount; /* write count/TIFF_VARIABLE */
|
||||
TIFFDataType field_type; /* type of associated data */
|
||||
uint32_t field_anonymous; /* if true, this is a unknown /
|
||||
anonymous tag */
|
||||
TIFFSetGetFieldType set_get_field_type; /* type to be passed to
|
||||
TIFFSetField, TIFFGetField */
|
||||
unsigned short field_bit; /* bit in fieldsset bit vector */
|
||||
unsigned char field_oktochange; /* if true, can change while writing */
|
||||
unsigned char field_passcount; /* if true, pass dir count on set */
|
||||
char *field_name; /* ASCII name */
|
||||
|
||||
+412
-411
@@ -54,10 +54,10 @@ static const TIFFFieldArray gpsFieldArray;
|
||||
/*--: Rational2Double: --
|
||||
* The Rational2Double upgraded libtiff functionality allows the definition and
|
||||
* achievement of true double-precision accuracy for TIFF tags of RATIONAL type
|
||||
* and field_bit=FIELD_CUSTOM using the set_field_type = TIFF_SETGET_DOUBLE.
|
||||
* and field_bit=FIELD_CUSTOM using the set_get_field_type = TIFF_SETGET_DOUBLE.
|
||||
* Unfortunately, that changes the old implemented interface for TIFFGetField().
|
||||
* In order to keep the old TIFFGetField() interface behavior those tags have to
|
||||
* be redefined with set_field_type = TIFF_SETGET_FLOAT!
|
||||
* be redefined with set_get_field_type = TIFF_SETGET_FLOAT!
|
||||
*
|
||||
* Rational custom arrays are already defined as _Cxx_FLOAT, thus can stay.
|
||||
*
|
||||
@@ -65,281 +65,281 @@ static const TIFFFieldArray gpsFieldArray;
|
||||
|
||||
/* clang-format off */ /* for better readability of tag comments */
|
||||
static const TIFFField tiffFields[] = {
|
||||
{TIFFTAG_SUBFILETYPE, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_SUBFILETYPE, 1, 0, "SubfileType", NULL},
|
||||
{TIFFTAG_OSUBFILETYPE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 1, 0, "OldSubfileType", NULL},
|
||||
{TIFFTAG_IMAGEWIDTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_IMAGEDIMENSIONS, 0, 0, "ImageWidth", NULL},
|
||||
{TIFFTAG_IMAGELENGTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_IMAGEDIMENSIONS, 1, 0, "ImageLength", NULL},
|
||||
{TIFFTAG_BITSPERSAMPLE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_BITSPERSAMPLE, 0, 0, "BitsPerSample", NULL},
|
||||
{TIFFTAG_COMPRESSION, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_COMPRESSION, 0, 0, "Compression", NULL},
|
||||
{TIFFTAG_PHOTOMETRIC, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_PHOTOMETRIC, 0, 0, "PhotometricInterpretation", NULL},
|
||||
{TIFFTAG_THRESHHOLDING, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_THRESHHOLDING, 1, 0, "Threshholding", NULL},
|
||||
{TIFFTAG_CELLWIDTH, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CellWidth", NULL},
|
||||
{TIFFTAG_CELLLENGTH, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CellLength", NULL},
|
||||
{TIFFTAG_FILLORDER, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_FILLORDER, 0, 0, "FillOrder", NULL},
|
||||
{TIFFTAG_DOCUMENTNAME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DocumentName", NULL},
|
||||
{TIFFTAG_IMAGEDESCRIPTION, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ImageDescription", NULL},
|
||||
{TIFFTAG_MAKE, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Make", NULL},
|
||||
{TIFFTAG_MODEL, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Model", NULL},
|
||||
{TIFFTAG_STRIPOFFSETS, -1, -1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_STRIPOFFSETS, 0, 0, "StripOffsets", NULL},
|
||||
{TIFFTAG_ORIENTATION, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_ORIENTATION, 0, 0, "Orientation", NULL},
|
||||
{TIFFTAG_SAMPLESPERPIXEL, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_SAMPLESPERPIXEL, 0, 0, "SamplesPerPixel", NULL},
|
||||
{TIFFTAG_ROWSPERSTRIP, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_ROWSPERSTRIP, 0, 0, "RowsPerStrip", NULL},
|
||||
{TIFFTAG_STRIPBYTECOUNTS, -1, -1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_STRIPBYTECOUNTS, 0, 0, "StripByteCounts", NULL},
|
||||
{TIFFTAG_MINSAMPLEVALUE, -2, -1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_MINSAMPLEVALUE, 1, 0, "MinSampleValue", NULL},
|
||||
{TIFFTAG_MAXSAMPLEVALUE, -2, -1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_MAXSAMPLEVALUE, 1, 0, "MaxSampleValue", NULL},
|
||||
{TIFFTAG_XRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_RESOLUTION, 1, 0, "XResolution", NULL},
|
||||
{TIFFTAG_YRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_RESOLUTION, 1, 0, "YResolution", NULL},
|
||||
{TIFFTAG_PLANARCONFIG, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_PLANARCONFIG, 0, 0, "PlanarConfiguration", NULL},
|
||||
{TIFFTAG_PAGENAME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "PageName", NULL},
|
||||
{TIFFTAG_XPOSITION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_POSITION, 1, 0, "XPosition", NULL},
|
||||
{TIFFTAG_YPOSITION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_POSITION, 1, 0, "YPosition", NULL},
|
||||
{TIFFTAG_FREEOFFSETS, -1, -1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 0, 0, "FreeOffsets", NULL},
|
||||
{TIFFTAG_FREEBYTECOUNTS, -1, -1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 0, 0, "FreeByteCounts", NULL},
|
||||
{TIFFTAG_GRAYRESPONSEUNIT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 1, 0, "GrayResponseUnit", NULL},
|
||||
{TIFFTAG_GRAYRESPONSECURVE, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 1, 0, "GrayResponseCurve", NULL},
|
||||
{TIFFTAG_RESOLUTIONUNIT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_RESOLUTIONUNIT, 1, 0, "ResolutionUnit", NULL},
|
||||
{TIFFTAG_PAGENUMBER, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_UINT16_PAIR, TIFF_SETGET_UNDEFINED, FIELD_PAGENUMBER, 1, 0, "PageNumber", NULL},
|
||||
{TIFFTAG_COLORRESPONSEUNIT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 1, 0, "ColorResponseUnit", NULL},
|
||||
{TIFFTAG_TRANSFERFUNCTION, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_OTHER, TIFF_SETGET_UNDEFINED, FIELD_TRANSFERFUNCTION, 1, 0, "TransferFunction", NULL},
|
||||
{TIFFTAG_SOFTWARE, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Software", NULL},
|
||||
{TIFFTAG_DATETIME, 20, 20, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DateTime", NULL},
|
||||
{TIFFTAG_ARTIST, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Artist", NULL},
|
||||
{TIFFTAG_HOSTCOMPUTER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "HostComputer", NULL},
|
||||
{TIFFTAG_WHITEPOINT, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "WhitePoint", NULL},
|
||||
{TIFFTAG_PRIMARYCHROMATICITIES, 6, 6, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "PrimaryChromaticities", NULL},
|
||||
{TIFFTAG_COLORMAP, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_OTHER, TIFF_SETGET_UNDEFINED, FIELD_COLORMAP, 1, 0, "ColorMap", NULL},
|
||||
{TIFFTAG_HALFTONEHINTS, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_UINT16_PAIR, TIFF_SETGET_UNDEFINED, FIELD_HALFTONEHINTS, 1, 0, "HalftoneHints", NULL},
|
||||
{TIFFTAG_TILEWIDTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_TILEDIMENSIONS, 0, 0, "TileWidth", NULL},
|
||||
{TIFFTAG_TILELENGTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_TILEDIMENSIONS, 0, 0, "TileLength", NULL},
|
||||
{TIFFTAG_TILEOFFSETS, -1, 1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_STRIPOFFSETS, 0, 0, "TileOffsets", NULL},
|
||||
{TIFFTAG_TILEBYTECOUNTS, -1, 1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_STRIPBYTECOUNTS, 0, 0, "TileByteCounts", NULL},
|
||||
{TIFFTAG_SUBIFD, -1, -1, TIFF_IFD8, 0, TIFF_SETGET_C16_IFD8, TIFF_SETGET_UNDEFINED, FIELD_SUBIFD, 1, 1, "SubIFD", (TIFFFieldArray *)&tiffFieldArray},
|
||||
{TIFFTAG_INKSET, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "InkSet", NULL},
|
||||
{TIFFTAG_INKNAMES, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_C16_ASCII, TIFF_SETGET_UNDEFINED, FIELD_INKNAMES, 1, 1, "InkNames", NULL},
|
||||
{TIFFTAG_NUMBEROFINKS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_NUMBEROFINKS, 1, 0, "NumberOfInks", NULL},
|
||||
{TIFFTAG_DOTRANGE, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_UINT16_PAIR, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DotRange", NULL},
|
||||
{TIFFTAG_TARGETPRINTER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "TargetPrinter", NULL},
|
||||
{TIFFTAG_EXTRASAMPLES, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_EXTRASAMPLES, 0, 1, "ExtraSamples", NULL},
|
||||
{TIFFTAG_SAMPLEFORMAT, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_SAMPLEFORMAT, 0, 0, "SampleFormat", NULL},
|
||||
{TIFFTAG_SMINSAMPLEVALUE, -2, -1, TIFF_ANY, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_SMINSAMPLEVALUE, 1, 0, "SMinSampleValue", NULL},
|
||||
{TIFFTAG_SMAXSAMPLEVALUE, -2, -1, TIFF_ANY, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_SMAXSAMPLEVALUE, 1, 0, "SMaxSampleValue", NULL},
|
||||
{TIFFTAG_CLIPPATH, -3, -3, TIFF_BYTE, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "ClipPath", NULL},
|
||||
{TIFFTAG_XCLIPPATHUNITS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "XClipPathUnits", NULL},
|
||||
{TIFFTAG_YCLIPPATHUNITS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "YClipPathUnits", NULL},
|
||||
{TIFFTAG_YCBCRCOEFFICIENTS, 3, 3, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "YCbCrCoefficients", NULL},
|
||||
{TIFFTAG_YCBCRSUBSAMPLING, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_UINT16_PAIR, TIFF_SETGET_UNDEFINED, FIELD_YCBCRSUBSAMPLING, 0, 0, "YCbCrSubsampling", NULL},
|
||||
{TIFFTAG_YCBCRPOSITIONING, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_YCBCRPOSITIONING, 0, 0, "YCbCrPositioning", NULL},
|
||||
{TIFFTAG_REFERENCEBLACKWHITE, 6, 6, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_REFBLACKWHITE, 1, 0, "ReferenceBlackWhite", NULL},
|
||||
{TIFFTAG_XMLPACKET, -3, -3, TIFF_BYTE, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "XMLPacket", NULL},
|
||||
{TIFFTAG_SUBFILETYPE, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_SUBFILETYPE, 1, 0, "SubfileType", NULL},
|
||||
{TIFFTAG_OSUBFILETYPE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 1, 0, "OldSubfileType", NULL},
|
||||
{TIFFTAG_IMAGEWIDTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_IMAGEDIMENSIONS, 0, 0, "ImageWidth", NULL},
|
||||
{TIFFTAG_IMAGELENGTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_IMAGEDIMENSIONS, 1, 0, "ImageLength", NULL},
|
||||
{TIFFTAG_BITSPERSAMPLE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_BITSPERSAMPLE, 0, 0, "BitsPerSample", NULL},
|
||||
{TIFFTAG_COMPRESSION, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_COMPRESSION, 0, 0, "Compression", NULL},
|
||||
{TIFFTAG_PHOTOMETRIC, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_PHOTOMETRIC, 0, 0, "PhotometricInterpretation", NULL},
|
||||
{TIFFTAG_THRESHHOLDING, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_THRESHHOLDING, 1, 0, "Threshholding", NULL},
|
||||
{TIFFTAG_CELLWIDTH, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "CellWidth", NULL},
|
||||
{TIFFTAG_CELLLENGTH, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "CellLength", NULL},
|
||||
{TIFFTAG_FILLORDER, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_FILLORDER, 0, 0, "FillOrder", NULL},
|
||||
{TIFFTAG_DOCUMENTNAME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "DocumentName", NULL},
|
||||
{TIFFTAG_IMAGEDESCRIPTION, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "ImageDescription", NULL},
|
||||
{TIFFTAG_MAKE, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "Make", NULL},
|
||||
{TIFFTAG_MODEL, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "Model", NULL},
|
||||
{TIFFTAG_STRIPOFFSETS, -1, -1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, FIELD_STRIPOFFSETS, 0, 0, "StripOffsets", NULL},
|
||||
{TIFFTAG_ORIENTATION, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_ORIENTATION, 0, 0, "Orientation", NULL},
|
||||
{TIFFTAG_SAMPLESPERPIXEL, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_SAMPLESPERPIXEL, 0, 0, "SamplesPerPixel", NULL},
|
||||
{TIFFTAG_ROWSPERSTRIP, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_ROWSPERSTRIP, 0, 0, "RowsPerStrip", NULL},
|
||||
{TIFFTAG_STRIPBYTECOUNTS, -1, -1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, FIELD_STRIPBYTECOUNTS, 0, 0, "StripByteCounts", NULL},
|
||||
{TIFFTAG_MINSAMPLEVALUE, -2, -1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_MINSAMPLEVALUE, 1, 0, "MinSampleValue", NULL},
|
||||
{TIFFTAG_MAXSAMPLEVALUE, -2, -1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_MAXSAMPLEVALUE, 1, 0, "MaxSampleValue", NULL},
|
||||
{TIFFTAG_XRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_RESOLUTION, 1, 0, "XResolution", NULL},
|
||||
{TIFFTAG_YRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_RESOLUTION, 1, 0, "YResolution", NULL},
|
||||
{TIFFTAG_PLANARCONFIG, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_PLANARCONFIG, 0, 0, "PlanarConfiguration", NULL},
|
||||
{TIFFTAG_PAGENAME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "PageName", NULL},
|
||||
{TIFFTAG_XPOSITION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_POSITION, 1, 0, "XPosition", NULL},
|
||||
{TIFFTAG_YPOSITION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_POSITION, 1, 0, "YPosition", NULL},
|
||||
{TIFFTAG_FREEOFFSETS, -1, -1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 0, 0, "FreeOffsets", NULL},
|
||||
{TIFFTAG_FREEBYTECOUNTS, -1, -1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 0, 0, "FreeByteCounts", NULL},
|
||||
{TIFFTAG_GRAYRESPONSEUNIT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 1, 0, "GrayResponseUnit", NULL},
|
||||
{TIFFTAG_GRAYRESPONSECURVE, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 1, 0, "GrayResponseCurve", NULL},
|
||||
{TIFFTAG_RESOLUTIONUNIT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_RESOLUTIONUNIT, 1, 0, "ResolutionUnit", NULL},
|
||||
{TIFFTAG_PAGENUMBER, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_UINT16_PAIR, FIELD_PAGENUMBER, 1, 0, "PageNumber", NULL},
|
||||
{TIFFTAG_COLORRESPONSEUNIT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 1, 0, "ColorResponseUnit", NULL},
|
||||
{TIFFTAG_TRANSFERFUNCTION, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_OTHER, FIELD_TRANSFERFUNCTION, 1, 0, "TransferFunction", NULL},
|
||||
{TIFFTAG_SOFTWARE, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "Software", NULL},
|
||||
{TIFFTAG_DATETIME, 20, 20, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "DateTime", NULL},
|
||||
{TIFFTAG_ARTIST, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "Artist", NULL},
|
||||
{TIFFTAG_HOSTCOMPUTER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "HostComputer", NULL},
|
||||
{TIFFTAG_WHITEPOINT, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "WhitePoint", NULL},
|
||||
{TIFFTAG_PRIMARYCHROMATICITIES, 6, 6, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "PrimaryChromaticities", NULL},
|
||||
{TIFFTAG_COLORMAP, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_OTHER, FIELD_COLORMAP, 1, 0, "ColorMap", NULL},
|
||||
{TIFFTAG_HALFTONEHINTS, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_UINT16_PAIR, FIELD_HALFTONEHINTS, 1, 0, "HalftoneHints", NULL},
|
||||
{TIFFTAG_TILEWIDTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_TILEDIMENSIONS, 0, 0, "TileWidth", NULL},
|
||||
{TIFFTAG_TILELENGTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_TILEDIMENSIONS, 0, 0, "TileLength", NULL},
|
||||
{TIFFTAG_TILEOFFSETS, -1, 1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, FIELD_STRIPOFFSETS, 0, 0, "TileOffsets", NULL},
|
||||
{TIFFTAG_TILEBYTECOUNTS, -1, 1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, FIELD_STRIPBYTECOUNTS, 0, 0, "TileByteCounts", NULL},
|
||||
{TIFFTAG_SUBIFD, -1, -1, TIFF_IFD8, 0, TIFF_SETGET_C16_IFD8, FIELD_SUBIFD, 1, 1, "SubIFD", (TIFFFieldArray *)&tiffFieldArray},
|
||||
{TIFFTAG_INKSET, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 0, 0, "InkSet", NULL},
|
||||
{TIFFTAG_INKNAMES, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_C16_ASCII, FIELD_INKNAMES, 1, 1, "InkNames", NULL},
|
||||
{TIFFTAG_NUMBEROFINKS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_NUMBEROFINKS, 1, 0, "NumberOfInks", NULL},
|
||||
{TIFFTAG_DOTRANGE, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_UINT16_PAIR, FIELD_CUSTOM, 0, 0, "DotRange", NULL},
|
||||
{TIFFTAG_TARGETPRINTER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "TargetPrinter", NULL},
|
||||
{TIFFTAG_EXTRASAMPLES, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, FIELD_EXTRASAMPLES, 0, 1, "ExtraSamples", NULL},
|
||||
{TIFFTAG_SAMPLEFORMAT, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_SAMPLEFORMAT, 0, 0, "SampleFormat", NULL},
|
||||
{TIFFTAG_SMINSAMPLEVALUE, -2, -1, TIFF_ANY, 0, TIFF_SETGET_DOUBLE, FIELD_SMINSAMPLEVALUE, 1, 0, "SMinSampleValue", NULL},
|
||||
{TIFFTAG_SMAXSAMPLEVALUE, -2, -1, TIFF_ANY, 0, TIFF_SETGET_DOUBLE, FIELD_SMAXSAMPLEVALUE, 1, 0, "SMaxSampleValue", NULL},
|
||||
{TIFFTAG_CLIPPATH, -3, -3, TIFF_BYTE, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 0, 1, "ClipPath", NULL},
|
||||
{TIFFTAG_XCLIPPATHUNITS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 0, 0, "XClipPathUnits", NULL},
|
||||
{TIFFTAG_YCLIPPATHUNITS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 0, 0, "YClipPathUnits", NULL},
|
||||
{TIFFTAG_YCBCRCOEFFICIENTS, 3, 3, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 0, 0, "YCbCrCoefficients", NULL},
|
||||
{TIFFTAG_YCBCRSUBSAMPLING, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_UINT16_PAIR, FIELD_YCBCRSUBSAMPLING, 0, 0, "YCbCrSubsampling", NULL},
|
||||
{TIFFTAG_YCBCRPOSITIONING, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_YCBCRPOSITIONING, 0, 0, "YCbCrPositioning", NULL},
|
||||
{TIFFTAG_REFERENCEBLACKWHITE, 6, 6, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_REFBLACKWHITE, 1, 0, "ReferenceBlackWhite", NULL},
|
||||
{TIFFTAG_XMLPACKET, -3, -3, TIFF_BYTE, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "XMLPacket", NULL},
|
||||
/* begin SGI tags */
|
||||
{TIFFTAG_MATTEING, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_EXTRASAMPLES, 0, 0, "Matteing", NULL},
|
||||
{TIFFTAG_DATATYPE, -2, -1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_SAMPLEFORMAT, 0, 0, "DataType", NULL},
|
||||
{TIFFTAG_IMAGEDEPTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_IMAGEDEPTH, 0, 0, "ImageDepth", NULL},
|
||||
{TIFFTAG_TILEDEPTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_TILEDEPTH, 0, 0, "TileDepth", NULL},
|
||||
{TIFFTAG_MATTEING, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_EXTRASAMPLES, 0, 0, "Matteing", NULL},
|
||||
{TIFFTAG_DATATYPE, -2, -1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_SAMPLEFORMAT, 0, 0, "DataType", NULL},
|
||||
{TIFFTAG_IMAGEDEPTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_IMAGEDEPTH, 0, 0, "ImageDepth", NULL},
|
||||
{TIFFTAG_TILEDEPTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_TILEDEPTH, 0, 0, "TileDepth", NULL},
|
||||
/* end SGI tags */
|
||||
/* begin Pixar tags */
|
||||
{TIFFTAG_PIXAR_IMAGEFULLWIDTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ImageFullWidth", NULL},
|
||||
{TIFFTAG_PIXAR_IMAGEFULLLENGTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ImageFullLength", NULL},
|
||||
{TIFFTAG_PIXAR_TEXTUREFORMAT, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "TextureFormat", NULL},
|
||||
{TIFFTAG_PIXAR_WRAPMODES, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "TextureWrapModes", NULL},
|
||||
{TIFFTAG_PIXAR_FOVCOT, 1, 1, TIFF_FLOAT, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FieldOfViewCotangent", NULL},
|
||||
{TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN, 16, 16, TIFF_FLOAT, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MatrixWorldToScreen", NULL},
|
||||
{TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA, 16, 16, TIFF_FLOAT, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MatrixWorldToCamera", NULL},
|
||||
{TIFFTAG_COPYRIGHT, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Copyright", NULL},
|
||||
{TIFFTAG_PIXAR_IMAGEFULLWIDTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "ImageFullWidth", NULL},
|
||||
{TIFFTAG_PIXAR_IMAGEFULLLENGTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "ImageFullLength", NULL},
|
||||
{TIFFTAG_PIXAR_TEXTUREFORMAT, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "TextureFormat", NULL},
|
||||
{TIFFTAG_PIXAR_WRAPMODES, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "TextureWrapModes", NULL},
|
||||
{TIFFTAG_PIXAR_FOVCOT, 1, 1, TIFF_FLOAT, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "FieldOfViewCotangent", NULL},
|
||||
{TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN, 16, 16, TIFF_FLOAT, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "MatrixWorldToScreen", NULL},
|
||||
{TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA, 16, 16, TIFF_FLOAT, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "MatrixWorldToCamera", NULL},
|
||||
{TIFFTAG_COPYRIGHT, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "Copyright", NULL},
|
||||
/* end Pixar tags */
|
||||
{TIFFTAG_RICHTIFFIPTC, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "RichTIFFIPTC", NULL},
|
||||
{TIFFTAG_PHOTOSHOP, -3, -3, TIFF_BYTE, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "Photoshop", NULL},
|
||||
{TIFFTAG_RICHTIFFIPTC, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "RichTIFFIPTC", NULL},
|
||||
{TIFFTAG_PHOTOSHOP, -3, -3, TIFF_BYTE, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "Photoshop", NULL},
|
||||
/*--: EXIFIFD and GPSIFD specified as TIFF_LONG by Aware-Systems and not TIFF_IFD8 as in original LibTiff. However, for IFD-like tags,
|
||||
* libtiff uses the data type TIFF_IFD8 in tiffFields[]-tag definition combined with a special handling procedure in order to write either
|
||||
* a 32-bit value and the TIFF_IFD type-id into ClassicTIFF files or a 64-bit value and the TIFF_IFD8 type-id into BigTIFF files. */
|
||||
{TIFFTAG_EXIFIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EXIFIFDOffset", (TIFFFieldArray *)&exifFieldArray},
|
||||
{TIFFTAG_ICCPROFILE, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ICC Profile", NULL},
|
||||
{TIFFTAG_GPSIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "GPSIFDOffset", (TIFFFieldArray *)&gpsFieldArray},
|
||||
{TIFFTAG_FAXRECVPARAMS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UINT32, FIELD_CUSTOM, TRUE, FALSE, "FaxRecvParams", NULL},
|
||||
{TIFFTAG_FAXSUBADDRESS, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_ASCII, FIELD_CUSTOM, TRUE, FALSE, "FaxSubAddress", NULL},
|
||||
{TIFFTAG_FAXRECVTIME, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UINT32, FIELD_CUSTOM, TRUE, FALSE, "FaxRecvTime", NULL},
|
||||
{TIFFTAG_FAXDCS, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_ASCII, FIELD_CUSTOM, TRUE, FALSE, "FaxDcs", NULL},
|
||||
{TIFFTAG_STONITS, 1, 1, TIFF_DOUBLE, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "StoNits", NULL},
|
||||
{TIFFTAG_IMAGESOURCEDATA, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "Adobe Photoshop Document Data Block", NULL},
|
||||
{TIFFTAG_INTEROPERABILITYIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "InteroperabilityIFDOffset", NULL},
|
||||
{TIFFTAG_EXIFIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, FIELD_CUSTOM, 1, 0, "EXIFIFDOffset", (TIFFFieldArray *)&exifFieldArray},
|
||||
{TIFFTAG_ICCPROFILE, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "ICC Profile", NULL},
|
||||
{TIFFTAG_GPSIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, FIELD_CUSTOM, 1, 0, "GPSIFDOffset", (TIFFFieldArray *)&gpsFieldArray},
|
||||
{TIFFTAG_FAXRECVPARAMS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, TRUE, FALSE, "FaxRecvParams", NULL},
|
||||
{TIFFTAG_FAXSUBADDRESS, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, TRUE, FALSE, "FaxSubAddress", NULL},
|
||||
{TIFFTAG_FAXRECVTIME, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, TRUE, FALSE, "FaxRecvTime", NULL},
|
||||
{TIFFTAG_FAXDCS, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, TRUE, FALSE, "FaxDcs", NULL},
|
||||
{TIFFTAG_STONITS, 1, 1, TIFF_DOUBLE, 0, TIFF_SETGET_DOUBLE, FIELD_CUSTOM, 0, 0, "StoNits", NULL},
|
||||
{TIFFTAG_IMAGESOURCEDATA, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "Adobe Photoshop Document Data Block", NULL},
|
||||
{TIFFTAG_INTEROPERABILITYIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, FIELD_CUSTOM, 0, 0, "InteroperabilityIFDOffset", NULL},
|
||||
/* begin DNG tags */
|
||||
{TIFFTAG_DNGVERSION, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DNGVersion", NULL},
|
||||
{TIFFTAG_DNGBACKWARDVERSION, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DNGBackwardVersion", NULL},
|
||||
{TIFFTAG_UNIQUECAMERAMODEL, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "UniqueCameraModel", NULL},
|
||||
{TIFFTAG_LOCALIZEDCAMERAMODEL, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "LocalizedCameraModel", NULL},
|
||||
{TIFFTAG_CFAPLANECOLOR, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "CFAPlaneColor", NULL},
|
||||
{TIFFTAG_CFALAYOUT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CFALayout", NULL},
|
||||
{TIFFTAG_LINEARIZATIONTABLE, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "LinearizationTable", NULL},
|
||||
{TIFFTAG_BLACKLEVELREPEATDIM, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_C0_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "BlackLevelRepeatDim", NULL},
|
||||
{TIFFTAG_BLACKLEVEL, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "BlackLevel", NULL},
|
||||
{TIFFTAG_BLACKLEVELDELTAH, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "BlackLevelDeltaH", NULL},
|
||||
{TIFFTAG_BLACKLEVELDELTAV, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "BlackLevelDeltaV", NULL},
|
||||
{TIFFTAG_WHITELEVEL, -1, -1, TIFF_LONG, 0, TIFF_SETGET_C16_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "WhiteLevel", NULL},
|
||||
{TIFFTAG_DEFAULTSCALE, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DefaultScale", NULL},
|
||||
{TIFFTAG_BESTQUALITYSCALE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "BestQualityScale", NULL},
|
||||
{TIFFTAG_DEFAULTCROPORIGIN, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DefaultCropOrigin", NULL},
|
||||
{TIFFTAG_DEFAULTCROPSIZE, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DefaultCropSize", NULL},
|
||||
{TIFFTAG_COLORMATRIX1, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ColorMatrix1", NULL},
|
||||
{TIFFTAG_COLORMATRIX2, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ColorMatrix2", NULL},
|
||||
{TIFFTAG_CAMERACALIBRATION1, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "CameraCalibration1", NULL},
|
||||
{TIFFTAG_CAMERACALIBRATION2, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "CameraCalibration2", NULL},
|
||||
{TIFFTAG_REDUCTIONMATRIX1, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ReductionMatrix1", NULL},
|
||||
{TIFFTAG_REDUCTIONMATRIX2, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ReductionMatrix2", NULL},
|
||||
{TIFFTAG_ANALOGBALANCE, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "AnalogBalance", NULL},
|
||||
{TIFFTAG_ASSHOTNEUTRAL, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "AsShotNeutral", NULL},
|
||||
{TIFFTAG_ASSHOTWHITEXY, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "AsShotWhiteXY", NULL},
|
||||
{TIFFTAG_BASELINEEXPOSURE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "BaselineExposure", NULL},
|
||||
{TIFFTAG_BASELINENOISE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "BaselineNoise", NULL},
|
||||
{TIFFTAG_BASELINESHARPNESS, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "BaselineSharpness", NULL},
|
||||
{TIFFTAG_BAYERGREENSPLIT, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "BayerGreenSplit", NULL},
|
||||
{TIFFTAG_LINEARRESPONSELIMIT, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "LinearResponseLimit", NULL},
|
||||
{TIFFTAG_CAMERASERIALNUMBER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CameraSerialNumber", NULL},
|
||||
{TIFFTAG_LENSINFO, 4, 4, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "LensInfo", NULL},
|
||||
{TIFFTAG_CHROMABLURRADIUS, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ChromaBlurRadius", NULL},
|
||||
{TIFFTAG_ANTIALIASSTRENGTH, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "AntiAliasStrength", NULL},
|
||||
{TIFFTAG_SHADOWSCALE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ShadowScale", NULL},
|
||||
{TIFFTAG_DNGPRIVATEDATA, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "DNGPrivateData", NULL},
|
||||
{TIFFTAG_MAKERNOTESAFETY, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MakerNoteSafety", NULL},
|
||||
{TIFFTAG_CALIBRATIONILLUMINANT1, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CalibrationIlluminant1", NULL},
|
||||
{TIFFTAG_CALIBRATIONILLUMINANT2, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CalibrationIlluminant2", NULL},
|
||||
{TIFFTAG_RAWDATAUNIQUEID, 16, 16, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "RawDataUniqueID", NULL},
|
||||
{TIFFTAG_ORIGINALRAWFILENAME, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "OriginalRawFileName", NULL},
|
||||
{TIFFTAG_ORIGINALRAWFILEDATA, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "OriginalRawFileData", NULL},
|
||||
{TIFFTAG_ACTIVEAREA, 4, 4, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ActiveArea", NULL},
|
||||
{TIFFTAG_MASKEDAREAS, -1, -1, TIFF_LONG, 0, TIFF_SETGET_C16_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "MaskedAreas", NULL},
|
||||
{TIFFTAG_ASSHOTICCPROFILE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "AsShotICCProfile", NULL},
|
||||
{TIFFTAG_ASSHOTPREPROFILEMATRIX, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "AsShotPreProfileMatrix", NULL},
|
||||
{TIFFTAG_CURRENTICCPROFILE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "CurrentICCProfile", NULL},
|
||||
{TIFFTAG_CURRENTPREPROFILEMATRIX, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "CurrentPreProfileMatrix", NULL},
|
||||
{TIFFTAG_PERSAMPLE, 0, 0, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_PSEUDO, TRUE, FALSE, "PerSample", NULL},
|
||||
{TIFFTAG_DNGVERSION, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "DNGVersion", NULL},
|
||||
{TIFFTAG_DNGBACKWARDVERSION, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "DNGBackwardVersion", NULL},
|
||||
{TIFFTAG_UNIQUECAMERAMODEL, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "UniqueCameraModel", NULL},
|
||||
{TIFFTAG_LOCALIZEDCAMERAMODEL, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "LocalizedCameraModel", NULL},
|
||||
{TIFFTAG_CFAPLANECOLOR, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "CFAPlaneColor", NULL},
|
||||
{TIFFTAG_CFALAYOUT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "CFALayout", NULL},
|
||||
{TIFFTAG_LINEARIZATIONTABLE, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, FIELD_CUSTOM, 1, 1, "LinearizationTable", NULL},
|
||||
{TIFFTAG_BLACKLEVELREPEATDIM, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_C0_UINT16, FIELD_CUSTOM, 1, 0, "BlackLevelRepeatDim", NULL},
|
||||
{TIFFTAG_BLACKLEVEL, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "BlackLevel", NULL},
|
||||
{TIFFTAG_BLACKLEVELDELTAH, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "BlackLevelDeltaH", NULL},
|
||||
{TIFFTAG_BLACKLEVELDELTAV, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "BlackLevelDeltaV", NULL},
|
||||
{TIFFTAG_WHITELEVEL, -1, -1, TIFF_LONG, 0, TIFF_SETGET_C16_UINT32, FIELD_CUSTOM, 1, 1, "WhiteLevel", NULL},
|
||||
{TIFFTAG_DEFAULTSCALE, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "DefaultScale", NULL},
|
||||
{TIFFTAG_BESTQUALITYSCALE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "BestQualityScale", NULL},
|
||||
{TIFFTAG_DEFAULTCROPORIGIN, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "DefaultCropOrigin", NULL},
|
||||
{TIFFTAG_DEFAULTCROPSIZE, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "DefaultCropSize", NULL},
|
||||
{TIFFTAG_COLORMATRIX1, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ColorMatrix1", NULL},
|
||||
{TIFFTAG_COLORMATRIX2, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ColorMatrix2", NULL},
|
||||
{TIFFTAG_CAMERACALIBRATION1, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "CameraCalibration1", NULL},
|
||||
{TIFFTAG_CAMERACALIBRATION2, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "CameraCalibration2", NULL},
|
||||
{TIFFTAG_REDUCTIONMATRIX1, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ReductionMatrix1", NULL},
|
||||
{TIFFTAG_REDUCTIONMATRIX2, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ReductionMatrix2", NULL},
|
||||
{TIFFTAG_ANALOGBALANCE, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "AnalogBalance", NULL},
|
||||
{TIFFTAG_ASSHOTNEUTRAL, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "AsShotNeutral", NULL},
|
||||
{TIFFTAG_ASSHOTWHITEXY, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "AsShotWhiteXY", NULL},
|
||||
{TIFFTAG_BASELINEEXPOSURE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "BaselineExposure", NULL},
|
||||
{TIFFTAG_BASELINENOISE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "BaselineNoise", NULL},
|
||||
{TIFFTAG_BASELINESHARPNESS, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "BaselineSharpness", NULL},
|
||||
{TIFFTAG_BAYERGREENSPLIT, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "BayerGreenSplit", NULL},
|
||||
{TIFFTAG_LINEARRESPONSELIMIT, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "LinearResponseLimit", NULL},
|
||||
{TIFFTAG_CAMERASERIALNUMBER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "CameraSerialNumber", NULL},
|
||||
{TIFFTAG_LENSINFO, 4, 4, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "LensInfo", NULL},
|
||||
{TIFFTAG_CHROMABLURRADIUS, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "ChromaBlurRadius", NULL},
|
||||
{TIFFTAG_ANTIALIASSTRENGTH, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "AntiAliasStrength", NULL},
|
||||
{TIFFTAG_SHADOWSCALE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "ShadowScale", NULL},
|
||||
{TIFFTAG_DNGPRIVATEDATA, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "DNGPrivateData", NULL},
|
||||
{TIFFTAG_MAKERNOTESAFETY, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "MakerNoteSafety", NULL},
|
||||
{TIFFTAG_CALIBRATIONILLUMINANT1, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "CalibrationIlluminant1", NULL},
|
||||
{TIFFTAG_CALIBRATIONILLUMINANT2, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "CalibrationIlluminant2", NULL},
|
||||
{TIFFTAG_RAWDATAUNIQUEID, 16, 16, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "RawDataUniqueID", NULL},
|
||||
{TIFFTAG_ORIGINALRAWFILENAME, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "OriginalRawFileName", NULL},
|
||||
{TIFFTAG_ORIGINALRAWFILEDATA, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "OriginalRawFileData", NULL},
|
||||
{TIFFTAG_ACTIVEAREA, 4, 4, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, FIELD_CUSTOM, 1, 0, "ActiveArea", NULL},
|
||||
{TIFFTAG_MASKEDAREAS, -1, -1, TIFF_LONG, 0, TIFF_SETGET_C16_UINT32, FIELD_CUSTOM, 1, 1, "MaskedAreas", NULL},
|
||||
{TIFFTAG_ASSHOTICCPROFILE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "AsShotICCProfile", NULL},
|
||||
{TIFFTAG_ASSHOTPREPROFILEMATRIX, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "AsShotPreProfileMatrix", NULL},
|
||||
{TIFFTAG_CURRENTICCPROFILE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "CurrentICCProfile", NULL},
|
||||
{TIFFTAG_CURRENTPREPROFILEMATRIX, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "CurrentPreProfileMatrix", NULL},
|
||||
{TIFFTAG_PERSAMPLE, 0, 0, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, FIELD_PSEUDO, TRUE, FALSE, "PerSample", NULL},
|
||||
#if 0
|
||||
/* begin DNG 1.2.0.0 tags */
|
||||
{TIFFTAG_COLORIMETRICREFERENCE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ColorimetricReference", NULL},
|
||||
{TIFFTAG_CAMERACALIBRATIONSIGNATURE, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "CameraCalibrationSignature", NULL},
|
||||
{TIFFTAG_PROFILECALIBRATIONSIGNATURE, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ProfileCalibrationSignature", NULL},
|
||||
{TIFFTAG_EXTRACAMERAPROFILES, -1, -1, TIFF_IFD8, 0, TIFF_SETGET_C16_IFD8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ExtraCameraProfiles", NULL},
|
||||
{TIFFTAG_ASSHOTPROFILENAME, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "AsShotProfileName", NULL},
|
||||
{TIFFTAG_NOISEREDUCTIONAPPLIED, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "NoiseReductionApplied", NULL},
|
||||
{TIFFTAG_PROFILENAME, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ProfileName", NULL},
|
||||
{TIFFTAG_PROFILEHUESATMAPDIMS, 3, 3, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ProfileHueSatMapDims", NULL},
|
||||
{TIFFTAG_PROFILEHUESATMAPDATA1, -1, -1, TIFF_FLOAT, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ProfileHueSatMapData1", NULL},
|
||||
{TIFFTAG_PROFILEHUESATMAPDATA2, -1, -1, TIFF_FLOAT, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ProfileHueSatMapData2", NULL},
|
||||
{TIFFTAG_PROFILETONECURVE, -1, -1, TIFF_FLOAT, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ProfileToneCurve", NULL},
|
||||
{TIFFTAG_PROFILEEMBEDPOLICY, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ProfileEmbedPolicy", NULL},
|
||||
{TIFFTAG_PROFILECOPYRIGHT, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ProfileCopyright", NULL},
|
||||
{TIFFTAG_FORWARDMATRIX1, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ForwardMatrix1", NULL},
|
||||
{TIFFTAG_FORWARDMATRIX2, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ForwardMatrix2", NULL},
|
||||
{TIFFTAG_PREVIEWAPPLICATIONNAME, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "PreviewApplicationName", NULL},
|
||||
{TIFFTAG_PREVIEWAPPLICATIONVERSION, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "PreviewApplicationVersion", NULL},
|
||||
{TIFFTAG_PREVIEWSETTINGSNAME, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "PreviewSettingsName", NULL},
|
||||
{TIFFTAG_PREVIEWSETTINGSDIGEST, 16, 16, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "PreviewSettingsDigest", NULL},
|
||||
{TIFFTAG_PREVIEWCOLORSPACE, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "PreviewColorSpace", NULL},
|
||||
{TIFFTAG_PREVIEWDATETIME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "PreviewDateTime", NULL},
|
||||
{TIFFTAG_RAWIMAGEDIGEST, 16, 16, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "RawImageDigest", NULL},
|
||||
{TIFFTAG_ORIGINALRAWFILEDIGEST, 16, 16, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "OriginalRawFileDigest", NULL},
|
||||
{TIFFTAG_SUBTILEBLOCKSIZE, 2, 2, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubTileBlockSize", NULL},
|
||||
{TIFFTAG_ROWINTERLEAVEFACTOR, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "RowInterleaveFactor", NULL},
|
||||
{TIFFTAG_PROFILELOOKTABLEDIMS, 3, 3, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ProfileLookTableDims", NULL},
|
||||
{TIFFTAG_PROFILELOOKTABLEDATA, -1, -1, TIFF_FLOAT, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ProfileLookTableData", NULL},
|
||||
{TIFFTAG_COLORIMETRICREFERENCE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "ColorimetricReference", NULL},
|
||||
{TIFFTAG_CAMERACALIBRATIONSIGNATURE, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "CameraCalibrationSignature", NULL},
|
||||
{TIFFTAG_PROFILECALIBRATIONSIGNATURE, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "ProfileCalibrationSignature", NULL},
|
||||
{TIFFTAG_EXTRACAMERAPROFILES, -1, -1, TIFF_IFD8, 0, TIFF_SETGET_C16_IFD8, FIELD_CUSTOM, 1, 1, "ExtraCameraProfiles", NULL},
|
||||
{TIFFTAG_ASSHOTPROFILENAME, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "AsShotProfileName", NULL},
|
||||
{TIFFTAG_NOISEREDUCTIONAPPLIED, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "NoiseReductionApplied", NULL},
|
||||
{TIFFTAG_PROFILENAME, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "ProfileName", NULL},
|
||||
{TIFFTAG_PROFILEHUESATMAPDIMS, 3, 3, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, FIELD_CUSTOM, 1, 0, "ProfileHueSatMapDims", NULL},
|
||||
{TIFFTAG_PROFILEHUESATMAPDATA1, -1, -1, TIFF_FLOAT, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ProfileHueSatMapData1", NULL},
|
||||
{TIFFTAG_PROFILEHUESATMAPDATA2, -1, -1, TIFF_FLOAT, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ProfileHueSatMapData2", NULL},
|
||||
{TIFFTAG_PROFILETONECURVE, -1, -1, TIFF_FLOAT, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ProfileToneCurve", NULL},
|
||||
{TIFFTAG_PROFILEEMBEDPOLICY, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "ProfileEmbedPolicy", NULL},
|
||||
{TIFFTAG_PROFILECOPYRIGHT, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "ProfileCopyright", NULL},
|
||||
{TIFFTAG_FORWARDMATRIX1, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ForwardMatrix1", NULL},
|
||||
{TIFFTAG_FORWARDMATRIX2, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ForwardMatrix2", NULL},
|
||||
{TIFFTAG_PREVIEWAPPLICATIONNAME, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "PreviewApplicationName", NULL},
|
||||
{TIFFTAG_PREVIEWAPPLICATIONVERSION, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "PreviewApplicationVersion", NULL},
|
||||
{TIFFTAG_PREVIEWSETTINGSNAME, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "PreviewSettingsName", NULL},
|
||||
{TIFFTAG_PREVIEWSETTINGSDIGEST, 16, 16, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "PreviewSettingsDigest", NULL},
|
||||
{TIFFTAG_PREVIEWCOLORSPACE, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "PreviewColorSpace", NULL},
|
||||
{TIFFTAG_PREVIEWDATETIME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "PreviewDateTime", NULL},
|
||||
{TIFFTAG_RAWIMAGEDIGEST, 16, 16, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "RawImageDigest", NULL},
|
||||
{TIFFTAG_ORIGINALRAWFILEDIGEST, 16, 16, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "OriginalRawFileDigest", NULL},
|
||||
{TIFFTAG_SUBTILEBLOCKSIZE, 2, 2, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, FIELD_CUSTOM, 1, 0, "SubTileBlockSize", NULL},
|
||||
{TIFFTAG_ROWINTERLEAVEFACTOR, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "RowInterleaveFactor", NULL},
|
||||
{TIFFTAG_PROFILELOOKTABLEDIMS, 3, 3, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, FIELD_CUSTOM, 1, 0, "ProfileLookTableDims", NULL},
|
||||
{TIFFTAG_PROFILELOOKTABLEDATA, -1, -1, TIFF_FLOAT, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ProfileLookTableData", NULL},
|
||||
/* begin DNG 1.3.0.0 tags */
|
||||
{TIFFTAG_OPCODELIST1, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "OpcodeList1", NULL},
|
||||
{TIFFTAG_OPCODELIST2, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "OpcodeList2", NULL},
|
||||
{TIFFTAG_OPCODELIST3, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "OpcodeList3", NULL},
|
||||
{TIFFTAG_NOISEPROFILE, -1, -1, TIFF_DOUBLE, 0, TIFF_SETGET_C16_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "NoiseProfile", NULL},
|
||||
{TIFFTAG_OPCODELIST1, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "OpcodeList1", NULL},
|
||||
{TIFFTAG_OPCODELIST2, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "OpcodeList2", NULL},
|
||||
{TIFFTAG_OPCODELIST3, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "OpcodeList3", NULL},
|
||||
{TIFFTAG_NOISEPROFILE, -1, -1, TIFF_DOUBLE, 0, TIFF_SETGET_C16_DOUBLE, FIELD_CUSTOM, 1, 1, "NoiseProfile", NULL},
|
||||
/* begin DNG 1.4.0.0 tags */
|
||||
{TIFFTAG_DEFAULTUSERCROP, 4, 4, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DefaultUserCrop", NULL},
|
||||
{TIFFTAG_DEFAULTBLACKRENDER, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DefaultBlackRender", NULL},
|
||||
{TIFFTAG_BASELINEEXPOSUREOFFSET, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "BaselineExposureOffset", NULL},
|
||||
{TIFFTAG_PROFILELOOKTABLEENCODING, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ProfileLookTableEncoding", NULL},
|
||||
{TIFFTAG_PROFILEHUESATMAPENCODING, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ProfileHueSatMapEncoding", NULL},
|
||||
{TIFFTAG_ORIGINALDEFAULTFINALSIZE, 2, 2, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "OriginalDefaultFinalSize", NULL},
|
||||
{TIFFTAG_ORIGINALBESTQUALITYFINALSIZE, 2, 2, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "OriginalBestQualityFinalSize", NULL},
|
||||
{TIFFTAG_ORIGINALDEFAULTCROPSIZE, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "OriginalDefaultCropSize", NULL}, /* could also be rational */
|
||||
{TIFFTAG_NEWRAWIMAGEDIGEST, 16, 16, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "NewRawImageDigest", NULL},
|
||||
{TIFFTAG_RAWTOPREVIEWGAIN, 1, 1, TIFF_DOUBLE, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "RawToPreviewGain", NULL},
|
||||
{TIFFTAG_DEFAULTUSERCROP, 4, 4, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "DefaultUserCrop", NULL},
|
||||
{TIFFTAG_DEFAULTBLACKRENDER, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "DefaultBlackRender", NULL},
|
||||
{TIFFTAG_BASELINEEXPOSUREOFFSET, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "BaselineExposureOffset", NULL},
|
||||
{TIFFTAG_PROFILELOOKTABLEENCODING, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "ProfileLookTableEncoding", NULL},
|
||||
{TIFFTAG_PROFILEHUESATMAPENCODING, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "ProfileHueSatMapEncoding", NULL},
|
||||
{TIFFTAG_ORIGINALDEFAULTFINALSIZE, 2, 2, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, FIELD_CUSTOM, 1, 0, "OriginalDefaultFinalSize", NULL},
|
||||
{TIFFTAG_ORIGINALBESTQUALITYFINALSIZE, 2, 2, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, FIELD_CUSTOM, 1, 0, "OriginalBestQualityFinalSize", NULL},
|
||||
{TIFFTAG_ORIGINALDEFAULTCROPSIZE, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "OriginalDefaultCropSize", NULL}, /* could also be rational */
|
||||
{TIFFTAG_NEWRAWIMAGEDIGEST, 16, 16, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "NewRawImageDigest", NULL},
|
||||
{TIFFTAG_RAWTOPREVIEWGAIN, 1, 1, TIFF_DOUBLE, 0, TIFF_SETGET_DOUBLE, FIELD_CUSTOM, 1, 0, "RawToPreviewGain", NULL},
|
||||
/* begin DNG 1.5.0.0 tags */
|
||||
{TIFFTAG_DEPTHFORMAT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DepthFormat", NULL},
|
||||
{TIFFTAG_DEPTHNEAR, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DepthNear", NULL},
|
||||
{TIFFTAG_DEPTHFAR, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DepthFar", NULL},
|
||||
{TIFFTAG_DEPTHUNITS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DepthUnits", NULL},
|
||||
{TIFFTAG_DEPTHMEASURETYPE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DepthMeasureType", NULL},
|
||||
{TIFFTAG_ENHANCEPARAMS, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EnhanceParams", NULL},
|
||||
{TIFFTAG_DEPTHFORMAT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "DepthFormat", NULL},
|
||||
{TIFFTAG_DEPTHNEAR, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "DepthNear", NULL},
|
||||
{TIFFTAG_DEPTHFAR, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "DepthFar", NULL},
|
||||
{TIFFTAG_DEPTHUNITS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "DepthUnits", NULL},
|
||||
{TIFFTAG_DEPTHMEASURETYPE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "DepthMeasureType", NULL},
|
||||
{TIFFTAG_ENHANCEPARAMS, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "EnhanceParams", NULL},
|
||||
/* begin DNG 1.6.0.0 tags */
|
||||
{TIFFTAG_PROFILEGAINTABLEMAP, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ProfileGainTableMap", NULL},
|
||||
{TIFFTAG_SEMANTICNAME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SemanticName", NULL},
|
||||
{TIFFTAG_SEMANTICINSTANCEID, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SemanticInstanceID", NULL},
|
||||
{TIFFTAG_MASKSUBAREA, 4, 4, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MaskSubArea", NULL},
|
||||
{TIFFTAG_RGBTABLES, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "RGBTables", NULL},
|
||||
{TIFFTAG_CALIBRATIONILLUMINANT3, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CalibrationIlluminant3", NULL},
|
||||
{TIFFTAG_COLORMATRIX3, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ColorMatrix3", NULL},
|
||||
{TIFFTAG_CAMERACALIBRATION3, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "CameraCalibration3", NULL},
|
||||
{TIFFTAG_REDUCTIONMATRIX3, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ReductionMatrix3", NULL},
|
||||
{TIFFTAG_PROFILEHUESATMAPDATA3, -1, -1, TIFF_FLOAT, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ProfileHueSatMapData3", NULL},
|
||||
{TIFFTAG_FORWARDMATRIX3, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ForwardMatrix3", NULL},
|
||||
{TIFFTAG_ILLUMINANTDATA1, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "IlluminantData1", NULL},
|
||||
{TIFFTAG_ILLUMINANTDATA2, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "IlluminantData2", NULL},
|
||||
{TIFFTAG_ILLUMINANTDATA3, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "IlluminantData3", NULL},
|
||||
{TIFFTAG_PROFILEGAINTABLEMAP, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "ProfileGainTableMap", NULL},
|
||||
{TIFFTAG_SEMANTICNAME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "SemanticName", NULL},
|
||||
{TIFFTAG_SEMANTICINSTANCEID, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "SemanticInstanceID", NULL},
|
||||
{TIFFTAG_MASKSUBAREA, 4, 4, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, FIELD_CUSTOM, 1, 0, "MaskSubArea", NULL},
|
||||
{TIFFTAG_RGBTABLES, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "RGBTables", NULL},
|
||||
{TIFFTAG_CALIBRATIONILLUMINANT3, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "CalibrationIlluminant3", NULL},
|
||||
{TIFFTAG_COLORMATRIX3, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ColorMatrix3", NULL},
|
||||
{TIFFTAG_CAMERACALIBRATION3, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "CameraCalibration3", NULL},
|
||||
{TIFFTAG_REDUCTIONMATRIX3, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ReductionMatrix3", NULL},
|
||||
{TIFFTAG_PROFILEHUESATMAPDATA3, -1, -1, TIFF_FLOAT, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ProfileHueSatMapData3", NULL},
|
||||
{TIFFTAG_FORWARDMATRIX3, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ForwardMatrix3", NULL},
|
||||
{TIFFTAG_ILLUMINANTDATA1, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "IlluminantData1", NULL},
|
||||
{TIFFTAG_ILLUMINANTDATA2, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "IlluminantData2", NULL},
|
||||
{TIFFTAG_ILLUMINANTDATA3, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "IlluminantData3", NULL},
|
||||
/* end DNG tags */
|
||||
#endif
|
||||
/* begin TIFF/EP tags */
|
||||
{TIFFTAG_EP_CFAREPEATPATTERNDIM, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_C0_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EP CFARepeatPatternDim", NULL},
|
||||
{TIFFTAG_EP_CFAPATTERN, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "EP CFAPattern", NULL},
|
||||
{TIFFTAG_EP_CFAREPEATPATTERNDIM, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_C0_UINT16, FIELD_CUSTOM, 1, 0, "EP CFARepeatPatternDim", NULL},
|
||||
{TIFFTAG_EP_CFAPATTERN, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "EP CFAPattern", NULL},
|
||||
#if 0
|
||||
/* TIFFTAG_EP_BATTERYLEVEL can be RATIONAL or ASCII.
|
||||
* LibTiff defines it as ASCII and converts RATIONAL to an ASCII string. */
|
||||
{TIFFTAG_EP_BATTERYLEVEL, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EP BatteryLevel", NULL},
|
||||
{TIFFTAG_EP_INTERLACE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EP Interlace", NULL},
|
||||
{TIFFTAG_EP_BATTERYLEVEL, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "EP BatteryLevel", NULL},
|
||||
{TIFFTAG_EP_INTERLACE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "EP Interlace", NULL},
|
||||
/* TIFFTAG_EP_IPTC_NAA and TIFFTAG_RICHTIFFIPTC share the same tag number (33723)
|
||||
* LibTIFF type is UNDEFINED or BYTE, but often times incorrectly specified as LONG, because TIFF/EP (ISO/DIS 12234-2) specifies type LONG or ASCII. */
|
||||
{TIFFTAG_EP_TIMEZONEOFFSET, -1, -1, TIFF_SSHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "EP TimeZoneOffset", NULL},
|
||||
{TIFFTAG_EP_SELFTIMERMODE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EP SelfTimerMode", NULL},
|
||||
{TIFFTAG_EP_FLASHENERGY, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "EP FlashEnergy", NULL},
|
||||
{TIFFTAG_EP_SPATIALFREQUENCYRESPONSE, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "EP SpatialFrequencyResponse", NULL},
|
||||
{TIFFTAG_EP_NOISE, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "EP Noise", NULL},
|
||||
{TIFFTAG_EP_FOCALPLANEXRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EP FocalPlaneXResolution", NULL},
|
||||
{TIFFTAG_EP_FOCALPLANEYRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EP FocalPlaneYResolution", NULL},
|
||||
{TIFFTAG_EP_FOCALPLANERESOLUTIONUNIT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EP FocalPlaneResolutionUnit", NULL},
|
||||
{TIFFTAG_EP_IMAGENUMBER, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EP ImageNumber", NULL}, /* or SHORT */
|
||||
{TIFFTAG_EP_SECURITYCLASSIFICATION, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EP SecurityClassification", NULL},
|
||||
{TIFFTAG_EP_IMAGEHISTORY, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EP ImageHistory", NULL},
|
||||
{TIFFTAG_EP_EXPOSUREINDEX, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "EP ExposureIndex", NULL},
|
||||
{TIFFTAG_EP_STANDARDID, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EP StandardId", NULL},
|
||||
{TIFFTAG_EP_SENSINGMETHOD, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EP SensingMethod", NULL},
|
||||
{TIFFTAG_EP_TIMEZONEOFFSET, -1, -1, TIFF_SSHORT, 0, TIFF_SETGET_C16_UINT16, FIELD_CUSTOM, 1, 1, "EP TimeZoneOffset", NULL},
|
||||
{TIFFTAG_EP_SELFTIMERMODE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "EP SelfTimerMode", NULL},
|
||||
{TIFFTAG_EP_FLASHENERGY, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "EP FlashEnergy", NULL},
|
||||
{TIFFTAG_EP_SPATIALFREQUENCYRESPONSE, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "EP SpatialFrequencyResponse", NULL},
|
||||
{TIFFTAG_EP_NOISE, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "EP Noise", NULL},
|
||||
{TIFFTAG_EP_FOCALPLANEXRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "EP FocalPlaneXResolution", NULL},
|
||||
{TIFFTAG_EP_FOCALPLANEYRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "EP FocalPlaneYResolution", NULL},
|
||||
{TIFFTAG_EP_FOCALPLANERESOLUTIONUNIT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "EP FocalPlaneResolutionUnit", NULL},
|
||||
{TIFFTAG_EP_IMAGENUMBER, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "EP ImageNumber", NULL}, /* or SHORT */
|
||||
{TIFFTAG_EP_SECURITYCLASSIFICATION, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "EP SecurityClassification", NULL},
|
||||
{TIFFTAG_EP_IMAGEHISTORY, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "EP ImageHistory", NULL},
|
||||
{TIFFTAG_EP_EXPOSUREINDEX, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "EP ExposureIndex", NULL},
|
||||
{TIFFTAG_EP_STANDARDID, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "EP StandardId", NULL},
|
||||
{TIFFTAG_EP_SENSINGMETHOD, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "EP SensingMethod", NULL},
|
||||
/* TIFF/EP tags equivalent to EXIF tags, sometimes defined differently. */
|
||||
{TIFFTAG_EP_EXPOSURETIME, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "EP ExposureTime", NULL}, /*N=1 or 2 */
|
||||
{TIFFTAG_EP_FNUMBER, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "EP FNumber", NULL},
|
||||
{TIFFTAG_EP_EXPOSUREPROGRAM, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EP ExposureProgram", NULL},
|
||||
{TIFFTAG_EP_SPECTRALSENSITIVITY, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EP SpectralSensitivity", NULL},
|
||||
{TIFFTAG_EP_ISOSPEEDRATINGS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EP ISOSpeedRatings", NULL},
|
||||
{TIFFTAG_EP_OECF, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "EP OptoelectricConversionFactor", NULL},
|
||||
{TIFFTAG_EP_DATETIMEORIGINAL, 20, 20, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EP DateTimeOriginal", NULL},
|
||||
{TIFFTAG_EP_COMPRESSEDBITSPERPIXEL, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EP CompressedBitsPerPixel", NULL},
|
||||
{TIFFTAG_EP_SHUTTERSPEEDVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EP ShutterSpeedValue", NULL},
|
||||
{TIFFTAG_EP_APERTUREVALUE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EP ApertureValue", NULL},
|
||||
{TIFFTAG_EP_BRIGHTNESSVALUE, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "EP BrightnessValue", NULL},
|
||||
{TIFFTAG_EP_EXPOSUREBIASVALUE, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "EP ExposureBiasValue", NULL}, /*N=1 or 2 */
|
||||
{TIFFTAG_EP_MAXAPERTUREVALUE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EP MaxApertureValue", NULL},
|
||||
{TIFFTAG_EP_SUBJECTDISTANCE, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "EP SubjectDistance", NULL},
|
||||
{TIFFTAG_EP_METERINGMODE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EP MeteringMode", NULL},
|
||||
{TIFFTAG_EP_LIGHTSOURCE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EP LightSource", NULL},
|
||||
{TIFFTAG_EP_FLASH, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EP Flash", NULL},
|
||||
{TIFFTAG_EP_FOCALLENGTH, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "EP FocalLength", NULL},
|
||||
{TIFFTAG_EP_SUBJECTLOCATION, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "EP SubjectLocation", NULL},
|
||||
{TIFFTAG_EP_EXPOSURETIME, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "EP ExposureTime", NULL}, /*N=1 or 2 */
|
||||
{TIFFTAG_EP_FNUMBER, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "EP FNumber", NULL},
|
||||
{TIFFTAG_EP_EXPOSUREPROGRAM, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "EP ExposureProgram", NULL},
|
||||
{TIFFTAG_EP_SPECTRALSENSITIVITY, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "EP SpectralSensitivity", NULL},
|
||||
{TIFFTAG_EP_ISOSPEEDRATINGS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "EP ISOSpeedRatings", NULL},
|
||||
{TIFFTAG_EP_OECF, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "EP OptoelectricConversionFactor", NULL},
|
||||
{TIFFTAG_EP_DATETIMEORIGINAL, 20, 20, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "EP DateTimeOriginal", NULL},
|
||||
{TIFFTAG_EP_COMPRESSEDBITSPERPIXEL, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "EP CompressedBitsPerPixel", NULL},
|
||||
{TIFFTAG_EP_SHUTTERSPEEDVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "EP ShutterSpeedValue", NULL},
|
||||
{TIFFTAG_EP_APERTUREVALUE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "EP ApertureValue", NULL},
|
||||
{TIFFTAG_EP_BRIGHTNESSVALUE, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "EP BrightnessValue", NULL},
|
||||
{TIFFTAG_EP_EXPOSUREBIASVALUE, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "EP ExposureBiasValue", NULL}, /*N=1 or 2 */
|
||||
{TIFFTAG_EP_MAXAPERTUREVALUE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "EP MaxApertureValue", NULL},
|
||||
{TIFFTAG_EP_SUBJECTDISTANCE, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "EP SubjectDistance", NULL},
|
||||
{TIFFTAG_EP_METERINGMODE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "EP MeteringMode", NULL},
|
||||
{TIFFTAG_EP_LIGHTSOURCE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "EP LightSource", NULL},
|
||||
{TIFFTAG_EP_FLASH, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "EP Flash", NULL},
|
||||
{TIFFTAG_EP_FOCALLENGTH, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "EP FocalLength", NULL},
|
||||
{TIFFTAG_EP_SUBJECTLOCATION, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, FIELD_CUSTOM, 1, 1, "EP SubjectLocation", NULL},
|
||||
/* end TIFF/EP tags */
|
||||
#endif
|
||||
/* begin TIFF/FX tags */
|
||||
{TIFFTAG_INDEXED, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Indexed", NULL},
|
||||
{TIFFTAG_GLOBALPARAMETERSIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "GlobalParametersIFD", NULL},
|
||||
{TIFFTAG_PROFILETYPE, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ProfileType", NULL},
|
||||
{TIFFTAG_FAXPROFILE, 1, 1, TIFF_BYTE, 0, TIFF_SETGET_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FaxProfile", NULL},
|
||||
{TIFFTAG_CODINGMETHODS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CodingMethods", NULL},
|
||||
{TIFFTAG_VERSIONYEAR, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "VersionYear", NULL},
|
||||
{TIFFTAG_MODENUMBER, 1, 1, TIFF_BYTE, 0, TIFF_SETGET_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ModeNumber", NULL},
|
||||
{TIFFTAG_DECODE, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "Decode", NULL},
|
||||
{TIFFTAG_IMAGEBASECOLOR, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ImageBaseColor", NULL},
|
||||
{TIFFTAG_T82OPTIONS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "T82Options", NULL},
|
||||
{TIFFTAG_STRIPROWCOUNTS, -1, -1, TIFF_LONG, 0, TIFF_SETGET_C16_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "StripRowCounts", NULL},
|
||||
{TIFFTAG_IMAGELAYER, 2, 2, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ImageLayer", NULL},
|
||||
{TIFFTAG_INDEXED, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "Indexed", NULL},
|
||||
{TIFFTAG_GLOBALPARAMETERSIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, FIELD_CUSTOM, 1, 0, "GlobalParametersIFD", NULL},
|
||||
{TIFFTAG_PROFILETYPE, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "ProfileType", NULL},
|
||||
{TIFFTAG_FAXPROFILE, 1, 1, TIFF_BYTE, 0, TIFF_SETGET_UINT8, FIELD_CUSTOM, 1, 0, "FaxProfile", NULL},
|
||||
{TIFFTAG_CODINGMETHODS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "CodingMethods", NULL},
|
||||
{TIFFTAG_VERSIONYEAR, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "VersionYear", NULL},
|
||||
{TIFFTAG_MODENUMBER, 1, 1, TIFF_BYTE, 0, TIFF_SETGET_UINT8, FIELD_CUSTOM, 1, 0, "ModeNumber", NULL},
|
||||
{TIFFTAG_DECODE, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "Decode", NULL},
|
||||
{TIFFTAG_IMAGEBASECOLOR, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, FIELD_CUSTOM, 1, 1, "ImageBaseColor", NULL},
|
||||
{TIFFTAG_T82OPTIONS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "T82Options", NULL},
|
||||
{TIFFTAG_STRIPROWCOUNTS, -1, -1, TIFF_LONG, 0, TIFF_SETGET_C16_UINT32, FIELD_CUSTOM, 1, 1, "StripRowCounts", NULL},
|
||||
{TIFFTAG_IMAGELAYER, 2, 2, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, FIELD_CUSTOM, 1, 0, "ImageLayer", NULL},
|
||||
/* end TIFF/FX tags */
|
||||
/* begin pseudo tags */
|
||||
};
|
||||
@@ -348,91 +348,91 @@ static const TIFFField tiffFields[] = {
|
||||
* EXIF tags (Version 2.31, July 2016 plus version 2.32 May 2019)
|
||||
*/
|
||||
static const TIFFField exifFields[] = {
|
||||
{EXIFTAG_EXPOSURETIME, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureTime", NULL},
|
||||
{EXIFTAG_FNUMBER, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FNumber", NULL},
|
||||
{EXIFTAG_EXPOSUREPROGRAM, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureProgram", NULL},
|
||||
{EXIFTAG_SPECTRALSENSITIVITY, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SpectralSensitivity", NULL},
|
||||
{EXIFTAG_EXPOSURETIME, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "ExposureTime", NULL},
|
||||
{EXIFTAG_FNUMBER, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "FNumber", NULL},
|
||||
{EXIFTAG_EXPOSUREPROGRAM, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "ExposureProgram", NULL},
|
||||
{EXIFTAG_SPECTRALSENSITIVITY, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "SpectralSensitivity", NULL},
|
||||
/* After EXIF 2.2.1 ISOSpeedRatings is named PhotographicSensitivity. In addition, while "Count=Any", only 1 count should be used. */
|
||||
{EXIFTAG_ISOSPEEDRATINGS, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ISOSpeedRatings", NULL},
|
||||
{EXIFTAG_OECF, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "OptoelectricConversionFactor", NULL},
|
||||
{EXIFTAG_SENSITIVITYTYPE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SensitivityType", NULL},
|
||||
{EXIFTAG_STANDARDOUTPUTSENSITIVITY, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "StandardOutputSensitivity", NULL},
|
||||
{EXIFTAG_RECOMMENDEDEXPOSUREINDEX, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "RecommendedExposureIndex", NULL},
|
||||
{EXIFTAG_ISOSPEED, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ISOSpeed", NULL},
|
||||
{EXIFTAG_ISOSPEEDLATITUDEYYY, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ISOSpeedLatitudeyyy", NULL},
|
||||
{EXIFTAG_ISOSPEEDLATITUDEZZZ, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ISOSpeedLatitudezzz", NULL},
|
||||
{EXIFTAG_EXIFVERSION, 4, 4, TIFF_UNDEFINED, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExifVersion", NULL},
|
||||
{EXIFTAG_DATETIMEORIGINAL, 20, 20, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DateTimeOriginal", NULL},
|
||||
{EXIFTAG_DATETIMEDIGITIZED, 20, 20, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DateTimeDigitized", NULL},
|
||||
{EXIFTAG_OFFSETTIME, 7, 7, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "OffsetTime", NULL},
|
||||
{EXIFTAG_OFFSETTIMEORIGINAL, 7, 7, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "OffsetTimeOriginal", NULL},
|
||||
{EXIFTAG_OFFSETTIMEDIGITIZED, 7, 7, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "OffsetTimeDigitized", NULL},
|
||||
{EXIFTAG_COMPONENTSCONFIGURATION, 4, 4, TIFF_UNDEFINED, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ComponentsConfiguration", NULL},
|
||||
{EXIFTAG_COMPRESSEDBITSPERPIXEL, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CompressedBitsPerPixel", NULL},
|
||||
{EXIFTAG_SHUTTERSPEEDVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ShutterSpeedValue", NULL},
|
||||
{EXIFTAG_APERTUREVALUE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ApertureValue", NULL},
|
||||
{EXIFTAG_BRIGHTNESSVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "BrightnessValue", NULL},
|
||||
{EXIFTAG_EXPOSUREBIASVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureBiasValue", NULL},
|
||||
{EXIFTAG_MAXAPERTUREVALUE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MaxApertureValue", NULL},
|
||||
{EXIFTAG_ISOSPEEDRATINGS, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, FIELD_CUSTOM, 1, 1, "ISOSpeedRatings", NULL},
|
||||
{EXIFTAG_OECF, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "OptoelectricConversionFactor", NULL},
|
||||
{EXIFTAG_SENSITIVITYTYPE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "SensitivityType", NULL},
|
||||
{EXIFTAG_STANDARDOUTPUTSENSITIVITY, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "StandardOutputSensitivity", NULL},
|
||||
{EXIFTAG_RECOMMENDEDEXPOSUREINDEX, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "RecommendedExposureIndex", NULL},
|
||||
{EXIFTAG_ISOSPEED, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "ISOSpeed", NULL},
|
||||
{EXIFTAG_ISOSPEEDLATITUDEYYY, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "ISOSpeedLatitudeyyy", NULL},
|
||||
{EXIFTAG_ISOSPEEDLATITUDEZZZ, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "ISOSpeedLatitudezzz", NULL},
|
||||
{EXIFTAG_EXIFVERSION, 4, 4, TIFF_UNDEFINED, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "ExifVersion", NULL},
|
||||
{EXIFTAG_DATETIMEORIGINAL, 20, 20, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "DateTimeOriginal", NULL},
|
||||
{EXIFTAG_DATETIMEDIGITIZED, 20, 20, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "DateTimeDigitized", NULL},
|
||||
{EXIFTAG_OFFSETTIME, 7, 7, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "OffsetTime", NULL},
|
||||
{EXIFTAG_OFFSETTIMEORIGINAL, 7, 7, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "OffsetTimeOriginal", NULL},
|
||||
{EXIFTAG_OFFSETTIMEDIGITIZED, 7, 7, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "OffsetTimeDigitized", NULL},
|
||||
{EXIFTAG_COMPONENTSCONFIGURATION, 4, 4, TIFF_UNDEFINED, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "ComponentsConfiguration", NULL},
|
||||
{EXIFTAG_COMPRESSEDBITSPERPIXEL, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "CompressedBitsPerPixel", NULL},
|
||||
{EXIFTAG_SHUTTERSPEEDVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "ShutterSpeedValue", NULL},
|
||||
{EXIFTAG_APERTUREVALUE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "ApertureValue", NULL},
|
||||
{EXIFTAG_BRIGHTNESSVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "BrightnessValue", NULL},
|
||||
{EXIFTAG_EXPOSUREBIASVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "ExposureBiasValue", NULL},
|
||||
{EXIFTAG_MAXAPERTUREVALUE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "MaxApertureValue", NULL},
|
||||
/*--: EXIFTAG_SUBJECTDISTANCE: LibTiff returns value of "-1" if numerator equals 4294967295 (0xFFFFFFFF) to indicate infinite distance!
|
||||
* However, there are two other EXIF tags where numerator indicates a special value and six other cases where the denominator indicates special values,
|
||||
* which are not treated within LibTiff!! */
|
||||
{EXIFTAG_SUBJECTDISTANCE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubjectDistance", NULL},
|
||||
{EXIFTAG_METERINGMODE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MeteringMode", NULL},
|
||||
{EXIFTAG_LIGHTSOURCE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "LightSource", NULL},
|
||||
{EXIFTAG_FLASH, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Flash", NULL},
|
||||
{EXIFTAG_FOCALLENGTH, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalLength", NULL},
|
||||
{EXIFTAG_SUBJECTAREA, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "SubjectArea", NULL},
|
||||
{EXIFTAG_MAKERNOTE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "MakerNote", NULL},
|
||||
{EXIFTAG_USERCOMMENT, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "UserComment", NULL},
|
||||
{EXIFTAG_SUBSECTIME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubSecTime", NULL},
|
||||
{EXIFTAG_SUBSECTIMEORIGINAL, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubSecTimeOriginal", NULL},
|
||||
{EXIFTAG_SUBSECTIMEDIGITIZED, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubSecTimeDigitized", NULL},
|
||||
{EXIFTAG_TEMPERATURE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Temperature", NULL},
|
||||
{EXIFTAG_HUMIDITY, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Humidity", NULL},
|
||||
{EXIFTAG_PRESSURE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Pressure", NULL},
|
||||
{EXIFTAG_WATERDEPTH, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "WaterDepth", NULL},
|
||||
{EXIFTAG_ACCELERATION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Acceleration", NULL},
|
||||
{EXIFTAG_CAMERAELEVATIONANGLE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CameraElevationAngle", NULL},
|
||||
{EXIFTAG_FLASHPIXVERSION, 4, 4, TIFF_UNDEFINED, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FlashpixVersion", NULL},
|
||||
{EXIFTAG_COLORSPACE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ColorSpace", NULL},
|
||||
{EXIFTAG_PIXELXDIMENSION, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "PixelXDimension", NULL},
|
||||
{EXIFTAG_PIXELYDIMENSION, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "PixelYDimension", NULL},
|
||||
{EXIFTAG_RELATEDSOUNDFILE, 13, 13, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "RelatedSoundFile", NULL},
|
||||
{EXIFTAG_FLASHENERGY, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FlashEnergy", NULL},
|
||||
{EXIFTAG_SPATIALFREQUENCYRESPONSE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "SpatialFrequencyResponse", NULL},
|
||||
{EXIFTAG_FOCALPLANEXRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalPlaneXResolution", NULL},
|
||||
{EXIFTAG_FOCALPLANEYRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalPlaneYResolution", NULL},
|
||||
{EXIFTAG_FOCALPLANERESOLUTIONUNIT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalPlaneResolutionUnit", NULL},
|
||||
{EXIFTAG_SUBJECTLOCATION, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_C0_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubjectLocation", NULL},
|
||||
{EXIFTAG_EXPOSUREINDEX, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureIndex", NULL},
|
||||
{EXIFTAG_SENSINGMETHOD, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SensingMethod", NULL},
|
||||
{EXIFTAG_FILESOURCE, 1, 1, TIFF_UNDEFINED, 0, TIFF_SETGET_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FileSource", NULL},
|
||||
{EXIFTAG_SCENETYPE, 1, 1, TIFF_UNDEFINED, 0, TIFF_SETGET_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SceneType", NULL},
|
||||
{EXIFTAG_CFAPATTERN, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "CFAPattern", NULL},
|
||||
{EXIFTAG_CUSTOMRENDERED, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CustomRendered", NULL},
|
||||
{EXIFTAG_EXPOSUREMODE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureMode", NULL},
|
||||
{EXIFTAG_WHITEBALANCE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "WhiteBalance", NULL},
|
||||
{EXIFTAG_DIGITALZOOMRATIO, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DigitalZoomRatio", NULL},
|
||||
{EXIFTAG_FOCALLENGTHIN35MMFILM, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalLengthIn35mmFilm", NULL},
|
||||
{EXIFTAG_SCENECAPTURETYPE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SceneCaptureType", NULL},
|
||||
{EXIFTAG_GAINCONTROL, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "GainControl", NULL},
|
||||
{EXIFTAG_CONTRAST, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Contrast", NULL},
|
||||
{EXIFTAG_SATURATION, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Saturation", NULL},
|
||||
{EXIFTAG_SHARPNESS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Sharpness", NULL},
|
||||
{EXIFTAG_DEVICESETTINGDESCRIPTION, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "DeviceSettingDescription", NULL},
|
||||
{EXIFTAG_SUBJECTDISTANCERANGE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubjectDistanceRange", NULL},
|
||||
{EXIFTAG_IMAGEUNIQUEID, 33, 33, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ImageUniqueID", NULL},
|
||||
{EXIFTAG_CAMERAOWNERNAME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CameraOwnerName", NULL},
|
||||
{EXIFTAG_BODYSERIALNUMBER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "BodySerialNumber", NULL},
|
||||
{EXIFTAG_LENSSPECIFICATION, 4, 4, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "LensSpecification", NULL},
|
||||
{EXIFTAG_LENSMAKE, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "LensMake", NULL},
|
||||
{EXIFTAG_LENSMODEL, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "LensModel", NULL},
|
||||
{EXIFTAG_LENSSERIALNUMBER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "LensSerialNumber", NULL},
|
||||
{EXIFTAG_GAMMA, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Gamma", NULL},
|
||||
{EXIFTAG_COMPOSITEIMAGE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CompositeImage", NULL},
|
||||
{EXIFTAG_SOURCEIMAGENUMBEROFCOMPOSITEIMAGE, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_C0_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SourceImageNumberOfCompositeImage", NULL},
|
||||
{EXIFTAG_SOURCEEXPOSURETIMESOFCOMPOSITEIMAGE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1,
|
||||
{EXIFTAG_SUBJECTDISTANCE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "SubjectDistance", NULL},
|
||||
{EXIFTAG_METERINGMODE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "MeteringMode", NULL},
|
||||
{EXIFTAG_LIGHTSOURCE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "LightSource", NULL},
|
||||
{EXIFTAG_FLASH, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "Flash", NULL},
|
||||
{EXIFTAG_FOCALLENGTH, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "FocalLength", NULL},
|
||||
{EXIFTAG_SUBJECTAREA, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, FIELD_CUSTOM, 1, 1, "SubjectArea", NULL},
|
||||
{EXIFTAG_MAKERNOTE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "MakerNote", NULL},
|
||||
{EXIFTAG_USERCOMMENT, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "UserComment", NULL},
|
||||
{EXIFTAG_SUBSECTIME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "SubSecTime", NULL},
|
||||
{EXIFTAG_SUBSECTIMEORIGINAL, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "SubSecTimeOriginal", NULL},
|
||||
{EXIFTAG_SUBSECTIMEDIGITIZED, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "SubSecTimeDigitized", NULL},
|
||||
{EXIFTAG_TEMPERATURE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "Temperature", NULL},
|
||||
{EXIFTAG_HUMIDITY, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "Humidity", NULL},
|
||||
{EXIFTAG_PRESSURE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "Pressure", NULL},
|
||||
{EXIFTAG_WATERDEPTH, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "WaterDepth", NULL},
|
||||
{EXIFTAG_ACCELERATION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "Acceleration", NULL},
|
||||
{EXIFTAG_CAMERAELEVATIONANGLE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "CameraElevationAngle", NULL},
|
||||
{EXIFTAG_FLASHPIXVERSION, 4, 4, TIFF_UNDEFINED, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "FlashpixVersion", NULL},
|
||||
{EXIFTAG_COLORSPACE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "ColorSpace", NULL},
|
||||
{EXIFTAG_PIXELXDIMENSION, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "PixelXDimension", NULL},
|
||||
{EXIFTAG_PIXELYDIMENSION, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "PixelYDimension", NULL},
|
||||
{EXIFTAG_RELATEDSOUNDFILE, 13, 13, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "RelatedSoundFile", NULL},
|
||||
{EXIFTAG_FLASHENERGY, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "FlashEnergy", NULL},
|
||||
{EXIFTAG_SPATIALFREQUENCYRESPONSE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "SpatialFrequencyResponse", NULL},
|
||||
{EXIFTAG_FOCALPLANEXRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "FocalPlaneXResolution", NULL},
|
||||
{EXIFTAG_FOCALPLANEYRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "FocalPlaneYResolution", NULL},
|
||||
{EXIFTAG_FOCALPLANERESOLUTIONUNIT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "FocalPlaneResolutionUnit", NULL},
|
||||
{EXIFTAG_SUBJECTLOCATION, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_C0_UINT16, FIELD_CUSTOM, 1, 0, "SubjectLocation", NULL},
|
||||
{EXIFTAG_EXPOSUREINDEX, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "ExposureIndex", NULL},
|
||||
{EXIFTAG_SENSINGMETHOD, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "SensingMethod", NULL},
|
||||
{EXIFTAG_FILESOURCE, 1, 1, TIFF_UNDEFINED, 0, TIFF_SETGET_UINT8, FIELD_CUSTOM, 1, 0, "FileSource", NULL},
|
||||
{EXIFTAG_SCENETYPE, 1, 1, TIFF_UNDEFINED, 0, TIFF_SETGET_UINT8, FIELD_CUSTOM, 1, 0, "SceneType", NULL},
|
||||
{EXIFTAG_CFAPATTERN, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "CFAPattern", NULL},
|
||||
{EXIFTAG_CUSTOMRENDERED, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "CustomRendered", NULL},
|
||||
{EXIFTAG_EXPOSUREMODE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "ExposureMode", NULL},
|
||||
{EXIFTAG_WHITEBALANCE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "WhiteBalance", NULL},
|
||||
{EXIFTAG_DIGITALZOOMRATIO, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "DigitalZoomRatio", NULL},
|
||||
{EXIFTAG_FOCALLENGTHIN35MMFILM, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "FocalLengthIn35mmFilm", NULL},
|
||||
{EXIFTAG_SCENECAPTURETYPE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "SceneCaptureType", NULL},
|
||||
{EXIFTAG_GAINCONTROL, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "GainControl", NULL},
|
||||
{EXIFTAG_CONTRAST, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "Contrast", NULL},
|
||||
{EXIFTAG_SATURATION, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "Saturation", NULL},
|
||||
{EXIFTAG_SHARPNESS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "Sharpness", NULL},
|
||||
{EXIFTAG_DEVICESETTINGDESCRIPTION, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "DeviceSettingDescription", NULL},
|
||||
{EXIFTAG_SUBJECTDISTANCERANGE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "SubjectDistanceRange", NULL},
|
||||
{EXIFTAG_IMAGEUNIQUEID, 33, 33, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "ImageUniqueID", NULL},
|
||||
{EXIFTAG_CAMERAOWNERNAME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "CameraOwnerName", NULL},
|
||||
{EXIFTAG_BODYSERIALNUMBER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "BodySerialNumber", NULL},
|
||||
{EXIFTAG_LENSSPECIFICATION, 4, 4, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "LensSpecification", NULL},
|
||||
{EXIFTAG_LENSMAKE, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "LensMake", NULL},
|
||||
{EXIFTAG_LENSMODEL, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "LensModel", NULL},
|
||||
{EXIFTAG_LENSSERIALNUMBER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "LensSerialNumber", NULL},
|
||||
{EXIFTAG_GAMMA, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "Gamma", NULL},
|
||||
{EXIFTAG_COMPOSITEIMAGE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "CompositeImage", NULL},
|
||||
{EXIFTAG_SOURCEIMAGENUMBEROFCOMPOSITEIMAGE, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_C0_UINT16, FIELD_CUSTOM, 1, 0, "SourceImageNumberOfCompositeImage", NULL},
|
||||
{EXIFTAG_SOURCEEXPOSURETIMESOFCOMPOSITEIMAGE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1,
|
||||
"SourceExposureTimesOfCompositeImage", NULL}};
|
||||
/*
|
||||
* EXIF-GPS tags (Version 2.31, July 2016; nothing changed for version 2.32 May
|
||||
@@ -445,38 +445,38 @@ static const TIFFField gpsFields[] = {
|
||||
* In order to achieve double precision for GPS tags: Standard definitions for GPSTAG is kept to TIFF_SETGET_DOUBLE
|
||||
* and TIFF_SETGET_C0_FLOAT is changed to TIFF_SETGET_C0_DOUBLE.
|
||||
*/
|
||||
{GPSTAG_VERSIONID, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UINT8, FIELD_CUSTOM, 1, 0, "VersionID", NULL},
|
||||
{GPSTAG_LATITUDEREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "LatitudeRef", NULL},
|
||||
{GPSTAG_LATITUDE, 3, 3, TIFF_RATIONAL, 0, TIFF_SETGET_C0_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Latitude", NULL},
|
||||
{GPSTAG_LONGITUDEREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "LongitudeRef", NULL},
|
||||
{GPSTAG_LONGITUDE, 3, 3, TIFF_RATIONAL, 0, TIFF_SETGET_C0_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Longitude", NULL},
|
||||
{GPSTAG_ALTITUDEREF, 1, 1, TIFF_BYTE, 0, TIFF_SETGET_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "AltitudeRef", NULL},
|
||||
{GPSTAG_ALTITUDE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Altitude", NULL},
|
||||
{GPSTAG_TIMESTAMP, 3, 3, TIFF_RATIONAL, 0, TIFF_SETGET_C0_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "TimeStamp", NULL},
|
||||
{GPSTAG_SATELLITES, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Satellites", NULL},
|
||||
{GPSTAG_STATUS, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Status", NULL},
|
||||
{GPSTAG_MEASUREMODE, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MeasureMode", NULL},
|
||||
{GPSTAG_DOP, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DOP", NULL},
|
||||
{GPSTAG_SPEEDREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SpeedRef", NULL},
|
||||
{GPSTAG_SPEED, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Speed", NULL},
|
||||
{GPSTAG_TRACKREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "TrackRef", NULL},
|
||||
{GPSTAG_TRACK, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Track", NULL},
|
||||
{GPSTAG_IMGDIRECTIONREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ImgDirectionRef", NULL},
|
||||
{GPSTAG_IMGDIRECTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ImgDirection", NULL},
|
||||
{GPSTAG_MAPDATUM, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MapDatum", NULL},
|
||||
{GPSTAG_DESTLATITUDEREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DestLatitudeRef", NULL},
|
||||
{GPSTAG_DESTLATITUDE, 3, 3, TIFF_RATIONAL, 0, TIFF_SETGET_C0_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DestLatitude", NULL},
|
||||
{GPSTAG_DESTLONGITUDEREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DestLongitudeRef", NULL},
|
||||
{GPSTAG_DESTLONGITUDE, 3, 3, TIFF_RATIONAL, 0, TIFF_SETGET_C0_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DestLongitude", NULL},
|
||||
{GPSTAG_DESTBEARINGREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DestBearingRef", NULL},
|
||||
{GPSTAG_DESTBEARING, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DestBearing", NULL},
|
||||
{GPSTAG_DESTDISTANCEREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DestDistanceRef", NULL},
|
||||
{GPSTAG_DESTDISTANCE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DestDistance", NULL},
|
||||
{GPSTAG_PROCESSINGMETHOD, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ProcessingMethod", NULL},
|
||||
{GPSTAG_AREAINFORMATION, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "AreaInformation", NULL},
|
||||
{GPSTAG_DATESTAMP, 11, 11, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DateStamp", NULL},
|
||||
{GPSTAG_DIFFERENTIAL, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Differential", NULL},
|
||||
{GPSTAG_GPSHPOSITIONINGERROR, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "HorizontalPositioningError", NULL}};
|
||||
{GPSTAG_VERSIONID, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "VersionID", NULL},
|
||||
{GPSTAG_LATITUDEREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "LatitudeRef", NULL},
|
||||
{GPSTAG_LATITUDE, 3, 3, TIFF_RATIONAL, 0, TIFF_SETGET_C0_DOUBLE, FIELD_CUSTOM, 1, 0, "Latitude", NULL},
|
||||
{GPSTAG_LONGITUDEREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "LongitudeRef", NULL},
|
||||
{GPSTAG_LONGITUDE, 3, 3, TIFF_RATIONAL, 0, TIFF_SETGET_C0_DOUBLE, FIELD_CUSTOM, 1, 0, "Longitude", NULL},
|
||||
{GPSTAG_ALTITUDEREF, 1, 1, TIFF_BYTE, 0, TIFF_SETGET_UINT8, FIELD_CUSTOM, 1, 0, "AltitudeRef", NULL},
|
||||
{GPSTAG_ALTITUDE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, FIELD_CUSTOM, 1, 0, "Altitude", NULL},
|
||||
{GPSTAG_TIMESTAMP, 3, 3, TIFF_RATIONAL, 0, TIFF_SETGET_C0_DOUBLE, FIELD_CUSTOM, 1, 0, "TimeStamp", NULL},
|
||||
{GPSTAG_SATELLITES, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "Satellites", NULL},
|
||||
{GPSTAG_STATUS, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "Status", NULL},
|
||||
{GPSTAG_MEASUREMODE, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "MeasureMode", NULL},
|
||||
{GPSTAG_DOP, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, FIELD_CUSTOM, 1, 0, "DOP", NULL},
|
||||
{GPSTAG_SPEEDREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "SpeedRef", NULL},
|
||||
{GPSTAG_SPEED, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, FIELD_CUSTOM, 1, 0, "Speed", NULL},
|
||||
{GPSTAG_TRACKREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "TrackRef", NULL},
|
||||
{GPSTAG_TRACK, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, FIELD_CUSTOM, 1, 0, "Track", NULL},
|
||||
{GPSTAG_IMGDIRECTIONREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "ImgDirectionRef", NULL},
|
||||
{GPSTAG_IMGDIRECTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, FIELD_CUSTOM, 1, 0, "ImgDirection", NULL},
|
||||
{GPSTAG_MAPDATUM, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "MapDatum", NULL},
|
||||
{GPSTAG_DESTLATITUDEREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "DestLatitudeRef", NULL},
|
||||
{GPSTAG_DESTLATITUDE, 3, 3, TIFF_RATIONAL, 0, TIFF_SETGET_C0_DOUBLE, FIELD_CUSTOM, 1, 0, "DestLatitude", NULL},
|
||||
{GPSTAG_DESTLONGITUDEREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "DestLongitudeRef", NULL},
|
||||
{GPSTAG_DESTLONGITUDE, 3, 3, TIFF_RATIONAL, 0, TIFF_SETGET_C0_DOUBLE, FIELD_CUSTOM, 1, 0, "DestLongitude", NULL},
|
||||
{GPSTAG_DESTBEARINGREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "DestBearingRef", NULL},
|
||||
{GPSTAG_DESTBEARING, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, FIELD_CUSTOM, 1, 0, "DestBearing", NULL},
|
||||
{GPSTAG_DESTDISTANCEREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "DestDistanceRef", NULL},
|
||||
{GPSTAG_DESTDISTANCE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, FIELD_CUSTOM, 1, 0, "DestDistance", NULL},
|
||||
{GPSTAG_PROCESSINGMETHOD, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "ProcessingMethod", NULL},
|
||||
{GPSTAG_AREAINFORMATION, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "AreaInformation", NULL},
|
||||
{GPSTAG_DATESTAMP, 11, 11, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "DateStamp", NULL},
|
||||
{GPSTAG_DIFFERENTIAL, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "Differential", NULL},
|
||||
{GPSTAG_GPSHPOSITIONINGERROR, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, FIELD_CUSTOM, 1, 0, "HorizontalPositioningError", NULL}};
|
||||
/* clang-format on */ /* was off for better readability of tag comments */
|
||||
|
||||
static const TIFFFieldArray tiffFieldArray = {
|
||||
@@ -674,18 +674,19 @@ int TIFFFieldSetGetSize(const TIFFField *fip)
|
||||
{
|
||||
/*
|
||||
* TIFFSetField() and TIFFGetField() must provide the parameter accordingly
|
||||
* to the definition of "set_field_type" of the tag definition in
|
||||
* to the definition of "set_get_field_type" of the tag definition in
|
||||
* dir_info.c. This function returns the data size for that purpose.
|
||||
*
|
||||
* Furthermore, this data size is also used for the internal storage,
|
||||
* even for TIFF_RATIONAL values for FIELD_CUSTOM, which are stored
|
||||
* internally as 4-byte float, but some of them should be stored internally
|
||||
* as 8-byte double, depending on the "set_field_type" _FLOAT_ or _DOUBLE_.
|
||||
* as 8-byte double, depending on the "set_get_field_type" _FLOAT_ or
|
||||
* _DOUBLE_.
|
||||
*/
|
||||
if (fip == NULL)
|
||||
return 0;
|
||||
|
||||
switch (fip->set_field_type)
|
||||
switch (fip->set_get_field_type)
|
||||
{
|
||||
case TIFF_SETGET_UNDEFINED:
|
||||
case TIFF_SETGET_ASCII:
|
||||
@@ -758,7 +759,7 @@ int TIFFFieldSetGetCountSize(const TIFFField *fip)
|
||||
if (fip == NULL)
|
||||
return 0;
|
||||
|
||||
switch (fip->set_field_type)
|
||||
switch (fip->set_get_field_type)
|
||||
{
|
||||
case TIFF_SETGET_C16_ASCII:
|
||||
case TIFF_SETGET_C16_UINT8:
|
||||
@@ -793,7 +794,7 @@ int TIFFFieldSetGetCountSize(const TIFFField *fip)
|
||||
|
||||
const TIFFField *TIFFFindField(TIFF *tif, uint32_t tag, TIFFDataType dt)
|
||||
{
|
||||
TIFFField key = {0, 0, 0, TIFF_NOTYPE, 0, 0, 0, 0, 0, 0, NULL, NULL};
|
||||
TIFFField key = {0, 0, 0, TIFF_NOTYPE, 0, 0, 0, 0, 0, NULL, NULL};
|
||||
TIFFField *pkey = &key;
|
||||
const TIFFField **ret;
|
||||
if (tif->tif_foundfield && tif->tif_foundfield->field_tag == tag &&
|
||||
@@ -817,7 +818,7 @@ const TIFFField *TIFFFindField(TIFF *tif, uint32_t tag, TIFFDataType dt)
|
||||
static const TIFFField *_TIFFFindFieldByName(TIFF *tif, const char *field_name,
|
||||
TIFFDataType dt)
|
||||
{
|
||||
TIFFField key = {0, 0, 0, TIFF_NOTYPE, 0, 0, 0, 0, 0, 0, NULL, NULL};
|
||||
TIFFField key = {0, 0, 0, TIFF_NOTYPE, 0, 0, 0, 0, 0, NULL, NULL};
|
||||
TIFFField *pkey = &key;
|
||||
const TIFFField **ret;
|
||||
if (tif->tif_foundfield &&
|
||||
@@ -915,59 +916,46 @@ TIFFField *_TIFFCreateAnonField(TIFF *tif, uint32_t tag,
|
||||
{
|
||||
case TIFF_BYTE:
|
||||
case TIFF_UNDEFINED:
|
||||
fld->set_field_type = TIFF_SETGET_C32_UINT8;
|
||||
fld->get_field_type = TIFF_SETGET_C32_UINT8;
|
||||
fld->set_get_field_type = TIFF_SETGET_C32_UINT8;
|
||||
break;
|
||||
case TIFF_ASCII:
|
||||
fld->set_field_type = TIFF_SETGET_C32_ASCII;
|
||||
fld->get_field_type = TIFF_SETGET_C32_ASCII;
|
||||
fld->set_get_field_type = TIFF_SETGET_C32_ASCII;
|
||||
break;
|
||||
case TIFF_SHORT:
|
||||
fld->set_field_type = TIFF_SETGET_C32_UINT16;
|
||||
fld->get_field_type = TIFF_SETGET_C32_UINT16;
|
||||
fld->set_get_field_type = TIFF_SETGET_C32_UINT16;
|
||||
break;
|
||||
case TIFF_LONG:
|
||||
fld->set_field_type = TIFF_SETGET_C32_UINT32;
|
||||
fld->get_field_type = TIFF_SETGET_C32_UINT32;
|
||||
fld->set_get_field_type = TIFF_SETGET_C32_UINT32;
|
||||
break;
|
||||
case TIFF_RATIONAL:
|
||||
case TIFF_SRATIONAL:
|
||||
case TIFF_FLOAT:
|
||||
fld->set_field_type = TIFF_SETGET_C32_FLOAT;
|
||||
fld->get_field_type = TIFF_SETGET_C32_FLOAT;
|
||||
fld->set_get_field_type = TIFF_SETGET_C32_FLOAT;
|
||||
break;
|
||||
case TIFF_SBYTE:
|
||||
fld->set_field_type = TIFF_SETGET_C32_SINT8;
|
||||
fld->get_field_type = TIFF_SETGET_C32_SINT8;
|
||||
fld->set_get_field_type = TIFF_SETGET_C32_SINT8;
|
||||
break;
|
||||
case TIFF_SSHORT:
|
||||
fld->set_field_type = TIFF_SETGET_C32_SINT16;
|
||||
fld->get_field_type = TIFF_SETGET_C32_SINT16;
|
||||
fld->set_get_field_type = TIFF_SETGET_C32_SINT16;
|
||||
break;
|
||||
case TIFF_SLONG:
|
||||
fld->set_field_type = TIFF_SETGET_C32_SINT32;
|
||||
fld->get_field_type = TIFF_SETGET_C32_SINT32;
|
||||
fld->set_get_field_type = TIFF_SETGET_C32_SINT32;
|
||||
break;
|
||||
case TIFF_DOUBLE:
|
||||
fld->set_field_type = TIFF_SETGET_C32_DOUBLE;
|
||||
fld->get_field_type = TIFF_SETGET_C32_DOUBLE;
|
||||
fld->set_get_field_type = TIFF_SETGET_C32_DOUBLE;
|
||||
break;
|
||||
case TIFF_IFD:
|
||||
case TIFF_IFD8:
|
||||
fld->set_field_type = TIFF_SETGET_C32_IFD8;
|
||||
fld->get_field_type = TIFF_SETGET_C32_IFD8;
|
||||
fld->set_get_field_type = TIFF_SETGET_C32_IFD8;
|
||||
break;
|
||||
case TIFF_LONG8:
|
||||
fld->set_field_type = TIFF_SETGET_C32_UINT64;
|
||||
fld->get_field_type = TIFF_SETGET_C32_UINT64;
|
||||
fld->set_get_field_type = TIFF_SETGET_C32_UINT64;
|
||||
break;
|
||||
case TIFF_SLONG8:
|
||||
fld->set_field_type = TIFF_SETGET_C32_SINT64;
|
||||
fld->get_field_type = TIFF_SETGET_C32_SINT64;
|
||||
fld->set_get_field_type = TIFF_SETGET_C32_SINT64;
|
||||
break;
|
||||
default:
|
||||
fld->set_field_type = TIFF_SETGET_UNDEFINED;
|
||||
fld->get_field_type = TIFF_SETGET_UNDEFINED;
|
||||
fld->set_get_field_type = TIFF_SETGET_UNDEFINED;
|
||||
break;
|
||||
}
|
||||
fld->field_bit = FIELD_CUSTOM;
|
||||
@@ -1198,38 +1186,51 @@ int TIFFMergeFieldInfo(TIFF *tif, const TIFFFieldInfo info[], uint32_t n)
|
||||
{
|
||||
tp->field_tag = info[i].field_tag;
|
||||
if (info[i].field_readcount < TIFF_VARIABLE2 ||
|
||||
info[i].field_readcount == 0 ||
|
||||
info[i].field_writecount < TIFF_VARIABLE2 ||
|
||||
info[i].field_writecount == 0)
|
||||
info[i].field_writecount < TIFF_VARIABLE2)
|
||||
{
|
||||
/* The fields (field_readcount) and (field_writecount) may use the
|
||||
* values TIFF_VARIABLE (-1), TIFF_SPP (-2), TIFF_VARIABLE2 (-3). */
|
||||
TIFFErrorExtR(tif, module,
|
||||
"The value of field_readcount and field_writecount "
|
||||
"must be greater than or equal to -3 and not zero.");
|
||||
TIFFErrorExtR(
|
||||
tif, module,
|
||||
"The value of field_readcount %d and field_writecount %d "
|
||||
"must be greater than or equal to -3.",
|
||||
info[i].field_readcount, info[i].field_writecount);
|
||||
return -1;
|
||||
}
|
||||
if ((info[i].field_readcount == 0 || info[i].field_writecount == 0) &&
|
||||
info[i].field_bit != FIELD_IGNORE)
|
||||
{
|
||||
/* The fields (field_readcount) and (field_writecount) may only
|
||||
be zero for pseudo_tags or ignored tags. */
|
||||
TIFFErrorExtR(
|
||||
tif, module,
|
||||
"The value of field_readcount %d and field_writecount %d "
|
||||
"may only be zero for field_bit = 0 (i.e. ignored tags).",
|
||||
info[i].field_readcount, info[i].field_writecount);
|
||||
return -1;
|
||||
}
|
||||
tp->field_readcount = info[i].field_readcount;
|
||||
tp->field_writecount = info[i].field_writecount;
|
||||
tp->field_type = info[i].field_type;
|
||||
tp->field_anonymous = 0;
|
||||
tp->set_field_type =
|
||||
tp->set_get_field_type =
|
||||
_TIFFSetGetType(info[i].field_type, info[i].field_writecount,
|
||||
info[i].field_passcount);
|
||||
tp->get_field_type =
|
||||
_TIFFSetGetType(info[i].field_type, info[i].field_readcount,
|
||||
info[i].field_passcount);
|
||||
tp->field_bit = info[i].field_bit;
|
||||
tp->field_oktochange = info[i].field_oktochange;
|
||||
tp->field_passcount = info[i].field_passcount;
|
||||
/* Define an empty static string to be passed as field_name where a NULL
|
||||
* pointer is passed in. Otherwise, this will lead to buffer overflow
|
||||
* furtheron. */
|
||||
if (info[i].field_name == NULL)
|
||||
{
|
||||
TIFFErrorExtR(tif, module,
|
||||
"Field_name of %d.th allocation tag %d is NULL", i,
|
||||
info[i].field_tag);
|
||||
return -1;
|
||||
static const char *string_static_empty = "";
|
||||
tp->field_name = (char *)string_static_empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
tp->field_name = info[i].field_name;
|
||||
}
|
||||
tp->field_name = info[i].field_name;
|
||||
tp->field_subfields = NULL;
|
||||
tp++;
|
||||
}
|
||||
|
||||
+31
-19
@@ -47,6 +47,9 @@
|
||||
#define TIFFCvtIEEEFloatToNative(tif, n, fp)
|
||||
#define TIFFCvtIEEEDoubleToNative(tif, n, dp)
|
||||
#else
|
||||
/* If your machine does not support IEEE floating point then you will need to
|
||||
* add support to tif_machdep.c to convert between the native format and
|
||||
* IEEE format. */
|
||||
extern void TIFFCvtIEEEFloatToNative(TIFF *, uint32_t, float *);
|
||||
extern void TIFFCvtIEEEDoubleToNative(TIFF *, uint32_t, double *);
|
||||
#endif
|
||||
@@ -2781,7 +2784,7 @@ TIFFReadDirEntryFloatArray(TIFF *tif, TIFFDirEntry *direntry, float **value)
|
||||
case TIFF_FLOAT:
|
||||
if (tif->tif_flags & TIFF_SWAB)
|
||||
TIFFSwabArrayOfLong((uint32_t *)origdata, count);
|
||||
TIFFCvtIEEEDoubleToNative(tif, count, (float *)origdata);
|
||||
TIFFCvtIEEEFloatToNative(tif, count, (float *)origdata);
|
||||
*value = (float *)origdata;
|
||||
return (TIFFReadDirEntryErrOk);
|
||||
}
|
||||
@@ -4310,7 +4313,6 @@ int TIFFReadDirectory(TIFF *tif)
|
||||
tif->tif_flags &= ~TIFF_CHOPPEDUPARRAYS;
|
||||
|
||||
/* free any old stuff and reinit */
|
||||
(*tif->tif_cleanup)(tif); /* cleanup any previous compression state */
|
||||
TIFFFreeDirectory(tif);
|
||||
TIFFDefaultDirectory(tif);
|
||||
|
||||
@@ -4403,10 +4405,13 @@ int TIFFReadDirectory(TIFF *tif)
|
||||
TIFFReadDirectoryFindFieldInfo(tif, dp->tdir_tag, &fii);
|
||||
if (fii == FAILED_FII)
|
||||
{
|
||||
TIFFWarningExtR(tif, module,
|
||||
"Unknown field with tag %" PRIu16 " (0x%" PRIx16
|
||||
") encountered",
|
||||
dp->tdir_tag, dp->tdir_tag);
|
||||
if (tif->tif_warn_about_unknown_tags)
|
||||
{
|
||||
TIFFWarningExtR(tif, module,
|
||||
"Unknown field with tag %" PRIu16
|
||||
" (0x%" PRIx16 ") encountered",
|
||||
dp->tdir_tag, dp->tdir_tag);
|
||||
}
|
||||
/* the following knowingly leaks the
|
||||
anonymous field structure */
|
||||
const TIFFField *fld = _TIFFCreateAnonField(
|
||||
@@ -5281,6 +5286,7 @@ int TIFFReadCustomDirectory(TIFF *tif, toff_t diroff,
|
||||
const TIFFField *fip;
|
||||
uint32_t fii;
|
||||
|
||||
assert(infoarray != NULL);
|
||||
dircount = TIFFFetchDirectory(tif, diroff, &dir, NULL);
|
||||
if (!dircount)
|
||||
{
|
||||
@@ -5313,7 +5319,6 @@ int TIFFReadCustomDirectory(TIFF *tif, toff_t diroff,
|
||||
}
|
||||
|
||||
/* Free any old stuff and reinit. */
|
||||
(*tif->tif_cleanup)(tif); /* cleanup any previous compression state */
|
||||
TIFFFreeDirectory(tif);
|
||||
/* Even if custom directories do not need the default settings of a standard
|
||||
* IFD, the pointer to the TIFFSetField() and TIFFGetField() (i.e.
|
||||
@@ -5344,18 +5349,25 @@ int TIFFReadCustomDirectory(TIFF *tif, toff_t diroff,
|
||||
TIFFReadDirectoryFindFieldInfo(tif, dp->tdir_tag, &fii);
|
||||
if (fii == FAILED_FII)
|
||||
{
|
||||
TIFFWarningExtR(tif, module,
|
||||
"Unknown field with tag %" PRIu16 " (0x%" PRIx16
|
||||
") encountered",
|
||||
dp->tdir_tag, dp->tdir_tag);
|
||||
if (tif->tif_warn_about_unknown_tags)
|
||||
{
|
||||
TIFFWarningExtR(tif, module,
|
||||
"Unknown field with tag %" PRIu16 " (0x%" PRIx16
|
||||
") encountered",
|
||||
dp->tdir_tag, dp->tdir_tag);
|
||||
}
|
||||
const TIFFField *fld = _TIFFCreateAnonField(
|
||||
tif, dp->tdir_tag, (TIFFDataType)dp->tdir_type);
|
||||
if (fld == NULL || !_TIFFMergeFields(tif, fld, 1))
|
||||
{
|
||||
TIFFWarningExtR(tif, module,
|
||||
"Registering anonymous field with tag %" PRIu16
|
||||
" (0x%" PRIx16 ") failed",
|
||||
dp->tdir_tag, dp->tdir_tag);
|
||||
if (tif->tif_warn_about_unknown_tags)
|
||||
{
|
||||
TIFFWarningExtR(
|
||||
tif, module,
|
||||
"Registering anonymous field with tag %" PRIu16
|
||||
" (0x%" PRIx16 ") failed",
|
||||
dp->tdir_tag, dp->tdir_tag);
|
||||
}
|
||||
dp->tdir_ignore = TRUE;
|
||||
}
|
||||
else
|
||||
@@ -6273,19 +6285,19 @@ static int TIFFFetchNormalTag(TIFF *tif, TIFFDirEntry *dp, int recover)
|
||||
}
|
||||
fip = tif->tif_fields[fii];
|
||||
assert(fip != NULL); /* should not happen */
|
||||
assert(fip->set_field_type !=
|
||||
assert(fip->set_get_field_type !=
|
||||
TIFF_SETGET_OTHER); /* if so, we shouldn't arrive here but deal with
|
||||
this in specialized code */
|
||||
assert(fip->set_field_type !=
|
||||
assert(fip->set_get_field_type !=
|
||||
TIFF_SETGET_INT); /* if so, we shouldn't arrive here as this is only
|
||||
the case for pseudo-tags */
|
||||
err = TIFFReadDirEntryErrOk;
|
||||
switch (fip->set_field_type)
|
||||
switch (fip->set_get_field_type)
|
||||
{
|
||||
case TIFF_SETGET_UNDEFINED:
|
||||
TIFFErrorExtR(
|
||||
tif, "TIFFFetchNormalTag",
|
||||
"Defined set_field_type of custom tag %u (%s) is "
|
||||
"Defined set_get_field_type of custom tag %u (%s) is "
|
||||
"TIFF_SETGET_UNDEFINED and thus tag is not read from file",
|
||||
fip->field_tag, fip->field_name);
|
||||
break;
|
||||
|
||||
+22
-17
@@ -35,6 +35,9 @@
|
||||
#define TIFFCvtNativeToIEEEFloat(tif, n, fp)
|
||||
#define TIFFCvtNativeToIEEEDouble(tif, n, dp)
|
||||
#else
|
||||
/* If your machine does not support IEEE floating point then you will need to
|
||||
* add support to tif_machdep.c to convert between the native format and
|
||||
* IEEE format. */
|
||||
extern void TIFFCvtNativeToIEEEFloat(TIFF *tif, uint32_t n, float *fp);
|
||||
extern void TIFFCvtNativeToIEEEDouble(TIFF *tif, uint32_t n, double *dp);
|
||||
#endif
|
||||
@@ -534,6 +537,7 @@ static int TIFFWriteDirectorySec(TIFF *tif, int isimage, int imagedone,
|
||||
{
|
||||
_TIFFfreeExt(tif, tif->tif_rawdata);
|
||||
tif->tif_rawdata = NULL;
|
||||
tif->tif_rawcp = NULL;
|
||||
tif->tif_rawcc = 0;
|
||||
tif->tif_rawdatasize = 0;
|
||||
tif->tif_rawdataoff = 0;
|
||||
@@ -563,7 +567,7 @@ static int TIFFWriteDirectorySec(TIFF *tif, int isimage, int imagedone,
|
||||
if (isimage)
|
||||
{
|
||||
/*-- Step 1: Process named tags for an image with FIELD bits
|
||||
* assocciated. --*/
|
||||
* associated. --*/
|
||||
if (TIFFFieldSet(tif, FIELD_IMAGEDIMENSIONS))
|
||||
{
|
||||
if (!TIFFWriteDirectoryTagShortLong(tif, &ndir, dir,
|
||||
@@ -875,7 +879,7 @@ static int TIFFWriteDirectorySec(TIFF *tif, int isimage, int imagedone,
|
||||
if ((o->field_bit >= FIELD_CODEC) &&
|
||||
(TIFFFieldSet(tif, o->field_bit)))
|
||||
{
|
||||
switch (o->set_field_type)
|
||||
switch (o->set_get_field_type)
|
||||
{
|
||||
case TIFF_SETGET_ASCII:
|
||||
{
|
||||
@@ -1016,7 +1020,8 @@ static int TIFFWriteDirectorySec(TIFF *tif, int isimage, int imagedone,
|
||||
case TIFF_RATIONAL:
|
||||
{
|
||||
/*-- Rational2Double: For Rationals evaluate
|
||||
* "set_field_type" to determine internal storage size. */
|
||||
* "set_get_field_type" to determine internal storage size.
|
||||
*/
|
||||
int tv_size;
|
||||
tv_size = TIFFFieldSetGetSize(
|
||||
tif->tif_dir.td_customValues[m].info);
|
||||
@@ -1038,11 +1043,11 @@ static int TIFFWriteDirectorySec(TIFF *tif, int isimage, int imagedone,
|
||||
* tv_size==4 should be set as default. */
|
||||
if (tv_size != 4)
|
||||
{
|
||||
TIFFErrorExtR(tif,
|
||||
"TIFFLib: _TIFFWriteDirectorySec()",
|
||||
"Rational2Double: .set_field_type is "
|
||||
"not 4 but %d",
|
||||
tv_size);
|
||||
TIFFErrorExtR(
|
||||
tif, "TIFFLib: _TIFFWriteDirectorySec()",
|
||||
"Rational2Double: .set_get_field_type is "
|
||||
"not 4 but %d",
|
||||
tv_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1050,7 +1055,8 @@ static int TIFFWriteDirectorySec(TIFF *tif, int isimage, int imagedone,
|
||||
case TIFF_SRATIONAL:
|
||||
{
|
||||
/*-- Rational2Double: For Rationals evaluate
|
||||
* "set_field_type" to determine internal storage size. */
|
||||
* "set_get_field_type" to determine internal storage size.
|
||||
*/
|
||||
int tv_size;
|
||||
tv_size = TIFFFieldSetGetSize(
|
||||
tif->tif_dir.td_customValues[m].info);
|
||||
@@ -1072,11 +1078,11 @@ static int TIFFWriteDirectorySec(TIFF *tif, int isimage, int imagedone,
|
||||
* tv_size==4 should be set as default. */
|
||||
if (tv_size != 4)
|
||||
{
|
||||
TIFFErrorExtR(tif,
|
||||
"TIFFLib: _TIFFWriteDirectorySec()",
|
||||
"Rational2Double: .set_field_type is "
|
||||
"not 4 but %d",
|
||||
tv_size);
|
||||
TIFFErrorExtR(
|
||||
tif, "TIFFLib: _TIFFWriteDirectorySec()",
|
||||
"Rational2Double: .set_get_field_type is "
|
||||
"not 4 but %d",
|
||||
tv_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1377,7 +1383,6 @@ static int TIFFWriteDirectorySec(TIFF *tif, int isimage, int imagedone,
|
||||
TIFFFreeDirectory(tif);
|
||||
tif->tif_flags &= ~TIFF_DIRTYDIRECT;
|
||||
tif->tif_flags &= ~TIFF_DIRTYSTRIP;
|
||||
(*tif->tif_cleanup)(tif);
|
||||
/* Reset directory-related state for subsequent directories. */
|
||||
TIFFCreateDirectory(tif);
|
||||
}
|
||||
@@ -2966,7 +2971,7 @@ static int TIFFWriteDirectoryTagCheckedFloatArray(TIFF *tif, uint32_t *ndir,
|
||||
EvaluateIFDdatasizeWrite(tif, count, 4, ndir);
|
||||
return 1;
|
||||
}
|
||||
TIFFCvtNativeToIEEEFloat(tif, count, &value);
|
||||
TIFFCvtNativeToIEEEFloat(tif, count, value);
|
||||
if (tif->tif_flags & TIFF_SWAB)
|
||||
TIFFSwabArrayOfFloat(value, count);
|
||||
return (TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_FLOAT, count,
|
||||
@@ -2985,7 +2990,7 @@ static int TIFFWriteDirectoryTagCheckedDoubleArray(TIFF *tif, uint32_t *ndir,
|
||||
EvaluateIFDdatasizeWrite(tif, count, 8, ndir);
|
||||
return 1;
|
||||
}
|
||||
TIFFCvtNativeToIEEEDouble(tif, count, &value);
|
||||
TIFFCvtNativeToIEEEDouble(tif, count, value);
|
||||
if (tif->tif_flags & TIFF_SWAB)
|
||||
TIFFSwabArrayOfDouble(value, count);
|
||||
return (TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_DOUBLE, count,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user