Miloš Komarčević
bcb75b6404
Add Tamron 35-150mm F/2-2.8 Di III VXD for Nikon Z
2 years ago
Miloš Komarčević
e9ba89411b
Use appropriate print format specifiers and constants
2 years ago
Miloš Komarčević
de8f1bd849
Apply suggestions from code review
...
Co-authored-by: Kevin Backhouse <kevinbackhouse@github.com>
2 years ago
Miloš Komarčević
10d233dad2
RAF: extract more details when printing structure
2 years ago
Miloš Komarčević
9002797011
Add Sony 9M3 ID
2 years ago
Tomasz Kłoczko
3e977c5cf0
install exiv2 cmake module in LIBDIR
...
installed cmake module contains arch dependent library description.
It should be installed not in DATADIR but in LIBDIR.
Signed-off-by: Tomasz Kłoczko <kloczek@github.com>
2 years ago
Kevin Backhouse
a1f254358d
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=61675
...
Avoid integer overflow in the calculation of available_out.
2 years ago
norbertwg
9a068a3712
easy access: Tag sequence changed
...
for serialNumber and lensName
2 years ago
Miloš Komarčević
fb7f3d48dc
Add new Nikon Z lenses
...
(cherry picked from commit 7ebeddd44e41dc602de40d5b4636e800b2e1a847)
2 years ago
norbertwg
c622ba2632
fix return code of inet_pton under _WIN32
2 years ago
Rosen Penev
b1225ca9dc
remove stringFormat from Error()
...
No need.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
norbertwg
da58ec9e47
add Sigma 50-100mm f/1.8 DC HSM Art
2 years ago
norbertwg
581d1442b1
Update src/nikonmn_int.cpp
...
Co-authored-by: Miloš Komarčević <4973094+kmilos@users.noreply.github.com>
2 years ago
norbertwg
0caa32d08f
Update src/nikonmn_int.cpp
...
Co-authored-by: Miloš Komarčević <4973094+kmilos@users.noreply.github.com>
2 years ago
norbertwg
b974a05e44
Two Sigma lenses added for Nikon:
...
ID 191: Sigma 60–600mm F4.5-6.3 DG OS HSM | Sports
ID 193: Sigma 14-24mm f/2.8 DG HSM Art Lens
2 years ago
Miloš Komarčević
fe44c8ccd5
Add a few more IDs for cameras and lenses
...
(cherry picked from commit f20977c4fa6bc442aa21322d117cb6407215fbdb)
# Conflicts:
# src/canonmn_int.cpp
2 years ago
Miloš Komarčević
8250fb299c
Add DNG 1.7 support
2 years ago
norbertwg
d43d91e5f0
three Nikon keys added to easyaccess
2 years ago
norbertwg
fc7d570207
remove Exif.Photo.SceneCaptureType from sceneMode,
...
because it is included in easyaccess group sceneCaptureType
2 years ago
Rosen Penev
08c09bb340
some cleanups
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
e9f07e2e48
constexpr conversions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
b6204ccb1d
clang-tidy: cast to unsigned instead of int
...
Found with: bugprone-signed-char-misuse
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
0fed9f16ab
clang-tidy: fix bad roundings
...
Found with bugprone-incorrect-roundings
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
0f85d5a0e9
cmake: add format file
...
Helps to keep the CMake stuff consistent.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Miloš Komarčević
590f615320
Fix WebP ICCP chunk header
...
Resolves https://github.com/Exiv2/exiv2/issues/2734
2 years ago
Miloš Komarčević
1ae47bcfd8
Merge pull request #2760 from norbertwg/translation-of-value-0-in-Exif.NikonLd4.MaxAperture
...
Nikon printApertureLd4 translate value 0 to n/a
2 years ago
Miloš Komarčević
ffacfda886
update some more n/a related strings for translation
2 years ago
norbertwg
f3c4fb7461
some more Nikon print functions changed
...
to translate value 0 to n/a
2 years ago
Matthias Kuhn
4224e4c914
One logic for all the apples
2 years ago
Matthias Kuhn
19d78fef24
Explain include
2 years ago
Matthias Kuhn
887945b624
Fix building for ios
2 years ago
norbertwg
d8174f23bc
Nikon printApertureLd4 translate value 0 to n/a
2 years ago
Rosen Penev
fa41d9d84e
fix Doxygen comments to be more consistent
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Miloš Komarčević
bbedc0bcfb
Add new Sony camera IDs
2 years ago
Miloš Komarčević
11df54018d
Improve focus distance precision for Nikon Z
2 years ago
Rosen Penev
6621332674
meson: add missing includes
...
Also make video support properly optional.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
fcc45a3036
meson: basic cmake conf
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
ec561bb185
meson: use more subdir meson files
...
Makes the main one smaller.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
8588024a66
add maybe_unused
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
e7f6a286f3
http: convert to inet_pton and getaddrinfo
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
6ea6e2cb13
replace stat with std::filesystem
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
3b15b6f9fb
use SHGetKnownFolderPath
...
SHGetFolderPathA is deprecated.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
898faffa0d
use ReplaceFileA directly
...
This was introduced in Windows 95. exiv2 does not work on older.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
4d2d5f3673
fix compilation with newer CMake
...
It seems CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS on CMake 3.27 breaks
compilation on Windows.
The reason for it here is wrong: unit tests do not need non exported
symbols.
2 years ago
Ryan Friedman
4dfb78131c
Switch back to exporting dep on EXPAT because it's needed for static libs
...
Signed-off-by: Ryan Friedman <ryan.friedman+github@avinc.com>
2 years ago
Ryan Friedman
9f5767da7c
Link expat only for the build interface
...
Signed-off-by: Ryan Friedman <ryan.friedman+github@avinc.com>
2 years ago
Rosen Penev
b832728988
add std::endian support if available
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
9894c69cd0
small cleanup
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
100eabbc08
add std::byteswap support
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
8a4fa1c146
extra comma
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
c52bc0ff95
silence GCC8 warning on non default constructor
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
dae2b6dda8
more doxygen
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Ryan Friedman
eb05551ed2
Add Exiv2 namespace for exported targets
...
* This matches an alias target name
* Recommend using the namespaced target in the README
Signed-off-by: Ryan Friedman <ryan.friedman+github@avinc.com>
2 years ago
Ryan Friedman
a8c3455e5c
Add a cmake config file export
...
Signed-off-by: Ryan Friedman <ryan.friedman+github@avinc.com>
2 years ago
Miloš Komarčević
b7c45b49aa
Leverage global BUILD_TESTING option
2 years ago
kamiccolo
52fb9ee191
Revert "Isolate samples, unittests, coverage and overall build to PROJECT_BINARY_DIR"
...
This reverts commit 057ddfcf1755380583c6eb4ac97767a652fbfe9d.
2 years ago
kamiccolo
6f5b1c94db
Isolate samples, unittests, coverage and overall build to PROJECT_BINARY_DIR
2 years ago
Rosen Penev
c827648127
add missing commas
...
Formats the structs properly.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
e1b3dfa278
fix toAscii function
...
c == 0 was a dead branch because of the way printable ascii was
calculated. Move it up instead.
While at it, replace std::transform with std::replace. Easier to read.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
22a4b71752
optimize other toAscii function with early exit
...
GCC is able to see that the branch is useless as it can be done at
compile time. Produces shorter assembly with both -O2 and -O3.
Assign the pointer to the std::string directly and use proper iterators
with std::transform. Also produces shorter assembly.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Pino Toscano
b826a7d733
asf: fix GUID reading on big endian platforms
...
Setting the initial parts (data1_, data2_, data3_) from the bytes
directly using memcpy() means that they will be interpreted depending
on the platform endianness. For example, the initial 4 bytes of the ASF
header are 0x30, 0x26, 0xB2, 0x75, which will be read as 0x3026B275 on
big endian platforms, never matching the actual GUID (0x75B22630), which
is always specified in little endian format.
Hence, when reading a GUID from data, make sure to turn the GUID parts
to little endian. This fixes the reading of ASF files on big endian
platforms.
Fixes commit bed8d3d93c
2 years ago
Miloš Komarčević
029dc9f24a
Add some Sony IDs
2 years ago
Rosen Penev
1837bf055e
memcpy to copy_n conversions
...
The latter is more strict regarding types
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
640282f33b
replace reinterpret_cast with copy_n
...
On mips64, this throws a cast-align warning. Silence it.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
d4f6c9cf40
coverity fixes
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
7473b4a715
optimize toAscii function with early exit
...
GCC is able to see that the branch is useless as it can be done at
compile time. Produces shorter assembly with both -O2 and -O3.
https://godbolt.org/z/ejhfxh8Tx
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Miloš Komarčević
c686bed5f8
Use compiler macros for endianness
2 years ago
Rosen Penev
50648dd4b0
use if constexpr instead of macros
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
7477293e41
avoid newer clang-format issue
...
More readable anyway.
Also remove specific version. Problems have been fixed already. All
versions should work the same now.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
8a09f2dee1
avoid LTO issues
...
Place structs inside the places where used.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Matthias Andree
91af0905db
FreeBSD Fix getLoadedLibraries() crash
...
FreeBSD's getLoadedLibraries() uses libprocstat(3) to obtain
the list of mapped files (libraries). However, the list
obtained from procstat_getfiles() does not only return regular files,
but might also return anonymous objects that have no fs->path.
With exiv2 v0.28, I had also observed crashes with a real TTY,
and the entry->fs_path dereference would crash, even if it
was only for a test "non-null", so we need something more thorough.
Add a check to only consider VNODEs (actual file system entries),
and also make sure that entry->fs_path is defined so we don't
pass a nullptr to the std::string(const char *) constructor when
we are reading corrupt data. std::string((const char *)0)
on FreeBSD 13.2 - calls strlen() and crashes there.
2 years ago
Rosen Penev
d18a21847b
avoid division by 0 false positive
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
4783581b27
add null dynamic_cast checks
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
4c4bf7c749
avoid copy_n
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
e4a4791b35
endian check from runtime to compile time
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Kevin Backhouse
1119a68a1e
Check if the metadata is NULL.
2 years ago
Kevin Backhouse
360c6cd41f
Check if the metadata is NULL.
2 years ago
Miloš Komarčević
6b186a4cd2
Add new Exif 3.0 tags
...
(cherry picked from commit eb303ae63e79bf680901951c2ddcc7386f15e71b)
2 years ago
luzpaz
39a4b9b930
Fix various typos
...
Found via `codespell -q 3 -S *.po,*.pot,*.ts,./doc/ChangeLog,./xmpsdk -L alis,discus,filetest,ist,nd,ois,optio,siz,te,tempdate`
Excluded 3rd-party code (ie ./xmpsdk)
2 years ago
Kevin Backhouse
3202e86e73
Avoid triggering assertion in std::vector::operator[]
2 years ago
Kevin Backhouse
96d0e5faf1
Allow c_data() to return zero byte buffer.
2 years ago
Miloš Komarčević
b66ebd9481
Fix regression parsing PNG text chunks with zero length payload
...
(cherry picked from commit 16c1cd7da0cd159ee2d53c39088564edaf046c77)
2 years ago
Rosen Penev
6ee4a168ca
reduce nesting of operator
...
Easier to read
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
norbertwg
f7de846909
clang format
2 years ago
norbertwg
31620a6522
adjust descriptions in canonLiOpId to fit tag name
2 years ago
Miloš Komarčević
05ccb5ae58
Merge pull request #2613 from cytrinox/fuji_xmp_fix
...
Extract XMP data from embedded JPEG preview inside RAF files
2 years ago
Daniel Vogelbacher
c493e38d5a
RAF: Copy comment from embedded JPEG image
2 years ago
Daniel Vogelbacher
f5f1f30f5b
RAF: Ignore JPEG decoder errors if the JPEG offsets are invalid
2 years ago
Thomas Klausner
d92fb10cdb
Fix build on NetBSD.
2 years ago
Miloš Komarčević
c04dcc8341
Remove exiv2-xmp from CMake exported config
2 years ago
Miloš Komarčević
972795741b
Remove exiv2-xmp from pkg-config file
2 years ago
Daniel Vogelbacher
d27c5ac838
RAF: Simplify metadata extraction
...
Remove manual TiffParser usage for reading APP1 segement,
instead use JpegImage for proper parsing.
2 years ago
Daniel Vogelbacher
6c4b6d9d7f
Extract XMP data from embedded JPEG preview inside RAF files
...
The Fujifilm X-T5 camera stores in-camera rating for RAF images
by using XMP. But the XMP data is not directly encoded into the
RAF structure - instead it is attached as a second APP1 segment
to the embedded JPEG preview file.
This patch extracts the JPEG preview and parses it like a standalone
JPEG file.
2 years ago
Miloš Komarčević
53fe85b2c4
BMFF: fix handling of boxes w/ zero length or type
...
(cherry picked from commit f80403767b34818f3298d7ae54e6b36315f3b0a5)
2 years ago
Rosen Penev
c319699ac5
use variadic template
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
954153a4ec
replace inline with coonstexpr
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
4c66b4440a
pair noexcept with move operations
...
Typically done with noexcept.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
37184fd713
fix print format
...
Allows the compiler to actually diagnose formats.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Miloš Komarčević
b4179adab8
Merge pull request #2472 from Exiv2/fix_soversion
...
Fix shared object versioning
2 years ago
Rosen Penev
b2cd60eeac
fix asfvideo unicode handling
...
Use convertStringCharset to convert instead of reimplementing.
Some data is UTF-32 and other is UTF-16. Instead of implementing another
function for Windows, convert from UCS2-LE to UTF-8 twice.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago