112 Commits

Author SHA1 Message Date
Lawrence37
98752a2433
Merge pull request #7257 from Beep6581/fix-warnings-5.12
Compiler warning fixes
2024-12-26 22:26:11 -08:00
Lawrence Lee
4e9ceff1e9
Merge remote-tracking branch 'origin/fix-warnings-5.9' into fix-warnings-5.12 2024-11-16 22:27:29 -08:00
Daniel Gao
711f274403 Get rid of relative include paths
* Use target_include_directories to specify include paths
* Specify project root (parent of rtgui and rtengine) as include path
* Replace relative includes with normal includes
2024-11-16 17:20:02 -05:00
Lawrence37
13a07a58e2
Merge pull request #7093 from Lawrence37/fix-unclosed-jpg-file
Always close JPEG after reading
2024-06-16 15:27:21 -07:00
Lawrence37
59e8832dfb
Merge pull request #6367 from xiota/jxl-import
Add ability to import JXL images
2024-06-08 17:12:13 -07:00
Lawrence Lee
324f488f5b
Fix jpg file not writable after save
Use a unique_ptr to automatically close the jpg file after.
2024-06-01 19:11:41 -07:00
xiota
a5954ad4c2 Switch g_printerr to std::cerr 2024-05-26 11:11:07 +00:00
xiota
106ade3d8d Fix version for libjxl API change 2024-05-25 06:49:09 +00:00
xiota
8c5fc60a7d Make requested changes
* Remove cast in scanline
* Improve Glib::ustring conversion
2024-04-21 09:56:25 +00:00
xiota
4d715cf281 Make requested changes 2024-04-16 17:28:32 +00:00
xiota
fe68e913be Conditional compilation for old/new API
Debian/Ubuntu package libjxl 0.7.0,
but Arch/MSYS2 package 0.10.2
2024-04-11 15:44:55 +00:00
xiota
7715d15615 Update to current libjxl API 2024-04-10 12:58:01 +00:00
xiota
dd01cc110b Add error code to returns
Fix conditional libjxl compilation
2024-04-10 11:32:42 +00:00
xiota
dfc82c403c Add ability to import JXL images 2024-04-10 10:17:42 +00:00
Simone Gotti
52e88e8954 imageio: fix issues/crash on png with transparency
If a png has a transparency chunk (tRNS), after converting the
transparency to alpha we should also strip alpha (color_type is not
updated with PNG_COLOR_MASK_ALPHA flag set) or the row parsing will
return also the alpha channel causing a memory overflow.
2024-03-29 15:16:55 +01:00
Lawrence Lee
c5bb1f093e
Fix issues found by AddressSanitizer
Fix memcpy overlap in TIFF reader.
Fix memory leaks of SpotRows in control spot panel.
Fix memory leaks of SpotRows in locallab.
Fix memory leak of Glib::ThreadPool in file browser entry.
Fix memory leak of Glib::ThreadPool in thumbnail image updater.
2023-11-11 16:56:34 -08:00
Stephen Shkardoon
23f2a2fc9f Use _WIN32 instead of WIN32 to detect Windows
`WIN32` is not defined when building a 64-bit executable on Windows with Clang. `_WIN32` is the more appropriate option here.
http://web.archive.org/web/20191012035921/http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system contains a handy table/matrix of the options and why this is best.
2023-08-13 17:09:49 +12:00
Lawrence Lee
0ac49e4d9a
Support Exiv2 >= v0.28.0
The various Datum classes no longer have the toLong method and must be
replaced with toInt64.
ErrorCode is an enum class instead of an enum.
Error classes are reduced to Exiv2::Error.
2023-05-13 16:43:47 -07:00
Lawrence Lee
1e6cc85fe2
Add missing includes
Thanks to Benitoite
(https://github.com/Beep6581/RawTherapee/pull/5889#issuecomment-1475033091)
2023-03-18 18:15:38 -07:00
Lawrence Lee
20e78068cd
Merge branch 'dev' into metadata-exiv2 2023-03-17 22:16:17 -07:00
Flössie
e2311cc3da Some minor improvements to ImageIO::saveTIFF() 2023-03-03 09:17:12 +01:00
Flössie
8587fe068d Don't perform EXIF hack on BigTIFF 2023-03-03 08:57:08 +01:00
Flössie
a07c38f405 Support for saving TIFFs as BigTIFF (#6690) 2023-03-01 12:47:55 +01:00
Lawrence Lee
e590429786
Remove outdated comment
Issue #5787 in the Exiv2 branch is handled by commit 522f6f4.
2023-02-11 17:51:43 -08:00
Alberto Griggio
522f6f4473
metadata: make sure to include XResolution and YResolution when writing TIFFs
This is mandatory (according to http://dpfmanager.org), and in fact needed for
Photoshop compatibility

(cherry picked from commit 5d281810cc7a7f7dc563dde030cf90c78dbf55d0)
2022-12-10 10:46:29 -08:00
Alberto Griggio
322e709bcb
metadata: do not accidentally remove exif tags when embedding the arp sidecar in XMP
Fixes #127

(cherry picked from commit 49cbe9bd19db558a4be36221472cbb5e78aa95a2)
2022-12-10 10:01:15 -08:00
Alberto Griggio
6cec805774
metadata: try to be more robust when saving
Tentative fix for #89

(cherry picked from commit a8b53fef753c7a1146013feeb66be87c688b8631)
2022-12-10 09:51:16 -08:00
Alberto Griggio
ea3cf2fe8f
imageio: do not fail in saving an image if no metadata is available
(cherry picked from commit 86d48be88b6f9fe36e5e25185ec4fda7696efc25)
2022-12-05 21:34:20 -08:00
Alberto Griggio
e90ffe979b
metadata: catch std::exception instead of Exiv2::AnyError for better robustness
(cherry picked from commit 0e2d9332f633b060bd4d5cbcd9d47009bab0c46c)
2022-12-05 21:19:21 -08:00
Alberto Griggio
1a771fa211
more work on synchronizing metadata with xmp sidecars
(cherry picked from commit 81bbff6e6ae87bd35e8050a1cc621297ca24939b)
2022-12-04 15:55:09 -08:00
Lawrence Lee
4223f114cb
Clean up merge 2022-12-03 21:24:17 -08:00
Lawrence Lee
aa02ee8c49
Qualify some std integer types 2022-09-08 23:14:16 -07:00
Lawrence Lee
4b97a5cf3c
Placate some GCC warnings (#6563) 2022-09-05 18:05:35 -07:00
Flössie
6819b32be7 Mute some warnings (#6563) 2022-08-26 11:54:12 +02:00
Ruslan Kabatsayev
9988fa1fdc Fix size of TIFFTAG_EXIFIFD as passed to TIFFSetField
Starting with libtiff 4.0.0, TIFFTAG_EXIFIFD has size of 64 bits, so it
must be set as a 64-bit value. Otherwise, since TIFFSetField is a
variadic function, there's no conversion, and the function reads garbage
into the higher dword.

This patch implements the fix and thus closes #5141.
2021-07-15 12:43:33 +03:00
Thanatomanic
ae754b2492 Merge branch 'dev' into metadata-exiv2 2021-04-27 09:59:52 +02:00
Adam Reichold
fae40a137a
A few more minor fixes geared towards lgtm.com alerts (#6127)
* Remove unfilled formatting placeholders in KLT parser.
* Fix presumably unintentionally missing reference on PlanatPtr and ChunkyPtr call operators.
* Fix catching pointer and make use-after-free of workimg easier to spot.
Make sure all of our thrown exceptions derive from std::exception and then catch
by reference instead of by pointer.
* Fix mismatch between array form new and non-array form delete.
* Simplify memory management of embedded color profiles by unifying allocation to use operator new.
2021-03-17 08:37:19 +01:00
Ingo Weyrich
24df5166f2 assume SAMPLEFORMAT_UINT for tiff files when SAMPLEFORMAT_VOID is set 2021-02-21 13:32:16 +01:00
Ingo Weyrich
80c5816084 Improve error logging and memory handling when reading tiff files 2020-11-18 13:52:07 +01:00
Thanatomanic
d9799ec5de Fix dcp.cc with some help from the implementation in ART 2020-10-16 12:39:17 +02:00
Thanatomanic
8b4389ade9 Resolve exiv2 merge conflicts and merge with 2020-10-16 11:45:26 +02:00
Flössie
d033dbc810 Add 300dpi resolution to exported TIFFs (fixes #5787) 2020-06-16 10:52:56 +02:00
Ingo Weyrich
d731e172c2 Further reduction of include dependencies 2019-11-01 16:15:59 +01:00
Ingo Weyrich
cac2eb53ef Further reduction of include dependencies 2019-10-31 20:41:08 +01:00
Ingo Weyrich
6935faa258 Further cleanup of include dependencies 2019-10-30 22:12:06 +01:00
Flössie
28f0bc14da Merge branch 'dev' into metadata-exiv2
- Rating (#5325) not yet implemented
2019-09-24 14:30:54 +02:00
Morgan Hardwood
60b2196bce Updated gnu.org links to use HTTPS 2019-09-10 12:34:57 +02:00
Ingo Weyrich
17f343f682 add -Wcast-qual switch and fix all related warnings 2019-07-25 17:45:43 +02:00
Flössie
21a97980b6 Merge branch 'dev' into metadata-exiv2 2019-07-09 13:34:19 +02:00
Ingo Weyrich
0f09559413 Windows build crashes when trying to load a corrupted jpg, fixes #5366 2019-07-06 12:58:53 +02:00