1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
|
Q: "make" reports "usage: git rev-list [OPTION] …"
A: the Makefile uses version.mk to build a version information for the tool.
In that case you should comment out the lines in version.mk and set
REPO_REVISION manually
Q: I did not have "peg" and my config_dsl.grammar.c has zero size and there are
compile errors.
A: remove that file and use "git checkout config_dsl.grammar.c" to restore it
from repository. Try to avoid "make distclean", because it erases the file.
Q: My C-compiler reports error-messages like "cc: error: unrecognized command
line option '-fsanitize=undefined'"
A: You use an older GCC variant. Try 'SANITIZE="" make'
Q: How can I compile a windows version of your program?
A: I have only tested creating Windows executables using the crosscompiler
minGW under Debian Bullseye. You need the installed mingw-w64-x86-32 packages,
also you need to download and extract libpcre2 (check https://www.pcre.org/)
In libpcre2 (pcre2-10.40), call "./configure --host=i686-w64-mingw32
--disable-win32-io --disable-shared -enable-static" and "make -j 4". Change
into checkit-tiff/build, call:
"cmake -DCMAKE_TOOLCHAIN_FILE=toolchain-mingw32.cmake ../src/
-DPCRE2_STATIC
-DPCRE2_LIBRARY=~/Downloads/pcre2-10.40/.libs/
-DPCRE2_POSIX_LIBRARY=~/Downloads/pcre2-10.40/.libs/libpcre2-posix.a
-DPCRE2_INCLUDE_DIR=~/Downloads/pcre2-10.40/src ../src/" and "make -j 4"
A2: I have only tested creating Windows executables using the crosscompiler
minGW under Debian Bullseye. You need the installed mingw-w64-x86-64 packages,
also you need to download and extract libtiff and libpcre2. in
libpcre2 (pcre2-10.4ß), call "./configure --host=x86_64-w64-mingw32
--disable-win32-io --disable-shared -enable-static" and "make -j 4". Change
into checkit-tiff/build, call:
"cmake -DCMAKE_TOOLCHAIN_FILE=toolchain-mingw64.cmake ../src/
-DPCRE2_POSIX_LIBRARY=~/Downloads/pcre2-10.40/.libs/libpcre2-posix.a
-DPCRE2_LIBRARY=~/Downloads/pcre2-10.40/.libs/libpcre2-8.a
-DPCRE2_INCLUDE_DIR=~/Downloads/pcre2-10.40/src ../src/" and "make -j 4"
Q: How to compile to Javascript?
A: Use emscripten, do same steps as above but with "emconfigure
./configure...". Compile checkit_tiff with ff. options:
$> emcmake cmake
-DCMAKE_C_COMPILER=$(which emcc)
-DPCRE2_LIBRARY=~/Downloads/pcre2-10.40/.libs/libpcre2-8.a
-DPCRE2_POSIX_LIBRARY=~/Downloads/pcre2-10.40/.libs/libpcre2-posix.a
-DPCRE2_INCLUDE_DIR=~/Downloads/pcre2-10.40/ -DEMSCRIPTEN=1 ../src/
$> make -j 4
$> js --experimental-wasm-threads checkit_tiff.js -c ../tiffs_should_pass/minimal_valid.tiff ../example_configs/cit_tiff6_baseline_SLUB.cfg
HINT: the Debian Bullseye package seems broken, try the upstream version instead!
A: If you want to compile for a website, change cmake call to this:
$> emcmake cmake
-DCMAKE_C_COMPILER=$(which emcc)
-DPCRE2_LIBRARY=~/Downloads/pcre2-10.40/.libs/libpcre2-8.a
-DPCRE2_POSIX_LIBRARY=~/Downloads/pcre2-10.40/.libs/libpcre2-posix.a
-DPCRE2_INCLUDE_DIR=~/Downloads/pcre2-10.4ß/ -DEMSCRIPTEN_WEB=1 ../src/
Q: How to compile for m68k?
A: Use a m68k-compiler, you only need to set CMAKE_C_COMPILER to your compiler variant. The checkit_tiff was tested
under big-endian successfully (without ICC proflib). Here the command line for my cross compiling project:
$> cmake -DCMAKE_C_COMPILER=/usr/bin/m68k-linux-gnu-gcc
-DCMAKE_C_FLAGS="-Og -g -std=c11 -Wall -pedantic" -DSTATIC=1
-DWITHOUT_ICC_PROFLIB=1 -DPCRE2_STATIC=1 -DPCRE2_LIBRARY=~/Downloads/pcre2-10.39/.libs/libpcre2-8.a
-DPCRE2_POSIX_LIBRARY=~/Downloads/pcre2-10.39/.libs/libpcre2-posix.a -DPCRE2_INCLUDE_DIR=~/Downloads/pcre2-10.39/src/ ../src
Q: Where are older TIFF specs?
A: take a look to:
TIFF 4: https://web.archive.org/web/20050323073243/http://palimpsest.stanford.edu/bytopic/imaging/std/tiff4.html
TIFF 5: https://web.archive.org/web/20050323073243/http://palimpsest.stanford.edu/bytopic/imaging/std/tiff5.html
Q: I am using cmake, but it fails with "CMake Error: your CXX compiler:
"CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CMAKE_CXX_COMPILER
to a valid compiler path or name". But your program is C only, why I need a
C++compiler then?
A: cmake uses C++-compiler for its checks. Sorry, you need a C++ then.
Q: Your tool processes very slow, why?
A: No, the tool is optimized for very fast processing. On a NVME-based SSD it
processes 550 TIFF files (2,9GB) in less 0,8 seconds. We have tested it also
on our NFS based filesystem with similar fast results. There is only one
cornercase, if you have a broken TIFF with very large IFDs. Because
checkit_tiff tries to find all errors in a given TIFF file it does not use
early aborts than some other tools.
You could also try the memory mapped I/O, which should be very fast on
supported filesystems.
Q: I have a fully destroyed TIFF because checkit_tiff reports IFD errors. Is
there any chance to repair the file?
A: You could give "fixit_tiff" a try:
http://andreas-romeyke.de/software.html#_fixit_tiff
This project comes with some helper tools to find lost IFDs and could
fix some typical errors in broken TIFF files.
Q: I have a checkit_tiff understanding problem. For my file I get the error
message: "(EE) tag 34665 (EXIFDOffset) --> Tag should have a valid and
correct type. Unexpected tag type; found: IFD (lineno: 72)". I checked this
and dug through the TIFF using the hex editor and the specification and
found no problem. Offset 05F9F3F2 contains the tag 0x8769 (Exif tag: 34665),
the Type Value is 0x000d (13 according to specification: Offset to child
IFDs. Each value is an offset (from the beginning of the TIFF file, as
always) to a child IFD. Child images provide extra information for the
parent image - such as a subsampled version of the parent image. TIFF data
type is Long or 13, IFD. The IFD type is identical to LONG, except that it
is only used to point to other valid IFDs), see Offset 05f9f3f4 05f9f3f5.
In the offset range 05f9f310 - 05f9f3fD is the offset to the Exif tags.
I can also find them at this offset (3 pieces).
So I don't see any problem here? Can you please check this?
A: The basis for ExifIFD is the EXIF specification, which contains clear
instructions for TIFF files. There the tag type Long is specified. The tag
330 (SubIFDs) is not comparable with tag 34665 (EXIF private directory),
the former is used for multi-TiFFs.
The current EXIF specification is 2.32 from 2019, it says under
section 4.6.3 A:
"Exif IFD is a set of tags for recording Exif-specific attribute
information. It is pointed to by the offset from the TIFF header (Value
Offset) indicated by an Exif private tag value.
Exif IFD Pointer
Tag = 34665 (8769.H)
Type = LONG
Count = 1
Default = None"
|