45 Commits

Author SHA1 Message Date
Lawrence Lee
bb44729490
Merge branch 'dev' into libraw-copylib 2024-07-18 21:57:57 -07:00
Simone Gotti
5159de89cb imagedata: report if file is DNG 2024-07-08 10:29:43 +02:00
Lawrence Lee
d13badbbe0
Implement DNG bad pixels constant for LibRaw
Works if the FixBadPixelsConstant is zero, as implemented for dcraw.
Other constant values may be implemented in the future.
2024-01-06 21:40:00 -08:00
Lawrence Lee
f296991419
Implement DNG gain map for LibRaw 2023-12-17 16:00:30 -08:00
Lawrence Lee
3833c6e634
Merge branch 'dev' into metadata-exiv2 2023-02-05 12:29:58 -08:00
Niklas Haas
2101b846c3
Implement file sorting in thumbnail view (#6449)
* Use mtime as fallback timestamp for files without EXIF data

As suggested in #6449, with date-based sorting it can be useful to have
at least *some* sort of time-relevant information for EXIF-less files,
to prevent them from falling back to getting sorted alphabetically all
the time.

This commit simply defaults the file timestamp to the file's mtime as
returned by g_stat. For annoying reasons, it doesn't suffice to merely
forward the timestamp to the FileData structs - we also need to keep
track of it inside FilesData to cover the case of a file with 0 frames
in it.

* Add DateTime to Thumbnail

Putting it here facilitate easier sorting without having to re-construct
the DateTime on every comparison.

To simplify things moving forwards, use the Glib::DateTime struct right
away. This struct also contains timezone information, but we don't
currently care about timezone - so just use the local timezone as the
best approximation. (Nothing currently depends on getting the timezone
right, anyway)

In addition to the above, this commit also changes the logic to allow
generating datetime strings even for files with missing EXIF (which
makes sense as a result of the previous commit allowing the use of mtime
instead).

* Implement file sorting in thumbnail view

For simplicity, I decided to only implement the attributes that I could
verily easily reach from the existing metadata exported by Thumbnail.
Ideally, I would also like to be able to sort by "last modified" but I'm
not sure of the best way to reach this from this place in the code.

It's worth pointing out that, with the current implementation, the list
will not dynamically re-sort itself until you re-select the sorting
method - even if you make changes to the files that would otherwise
affect the sorting (e.g. changing the rank while sorting by rank). One
might even call this a feature, not a bug, since it prevents thumbnails
from moving around while you're trying to re-label them. You can always
re-select "sort by ..." from the context menu to force a re-sort.

Fixes #3317

Co-authored-by: Thanatomanic <6567747+Thanatomanic@users.noreply.github.com>
2023-01-02 21:27:12 +01:00
Alberto Griggio
92befa7e81
refactored code for extracting image dimensions from metadata
(cherry picked from commit 0ece9c5bfad09bc9052238d83fa696ef39effaaa)
2022-12-10 10:37:58 -08:00
Alberto Griggio
b92e77fb96
improved support for metadata editing
(cherry picked from commit 85da0b51ecf7ece768c0267aead71dd94404d4dc)
2022-12-09 22:35:26 -08:00
Alberto Griggio
b01b0fbef0
metadata: initialize thumbnail rating from exif
(cherry picked from commit 96bd2db0d2e127678bded3bee7aa3275332826c0)
2022-12-04 17:02:33 -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
Thanatomanic
8b4389ade9 Resolve exiv2 merge conflicts and merge with 2020-10-16 11:45:26 +02:00
Ingo Weyrich
aae22fcc86
Merge pull request #5617 from Beep6581/devirtualize
devirtualize method calls by declaring classes and methods final
2020-02-07 17:06:30 +01:00
Ingo Weyrich
9a4ade6f20 devirtualize method calls by declaring classes and methods final 2020-01-23 22:18:46 +01:00
Ingo Weyrich
d82ea3af02 reduce some include dependencies 2020-01-17 23:18:48 +01:00
Ingo Weyrich
d731e172c2 Further reduction of include dependencies 2019-11-01 16:15:59 +01:00
Flössie
add5c790d6 #pragma once for our headers plus drive-by formatting 2019-10-31 10:20:50 +01:00
Ingo Weyrich
81575a6e36 Further cleanup of include dependencies 2019-10-29 23:49:43 +01:00
Ingo Weyrich
068847eb5a Further cleanup of include dependencies 2019-10-29 21:06:27 +01:00
Ingo Weyrich
ed161c6288 Reduce rawimage.h dependencies 2019-10-29 15:21:02 +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
0ed517d972 cppcheck: more explicit contructors 2019-07-31 16:08:25 +02:00
Eric Jiang
789edc5bd3 Apply code-cleanup patch from @Floessie
See https://github.com/Beep6581/RawTherapee/pull/5325
2019-06-18 13:02:10 -07:00
Eric Jiang
820024972a Use rating from EXIF/XMP where available 2019-05-18 15:22:00 -07:00
lewiatan
105517c561 support rating tag from EXIF/XMP 2019-05-16 17:04:07 -07:00
Flössie
ba4de904cc Cleanups and a few fixes 2019-05-10 21:24:22 +02:00
Alberto Griggio
c360fd7e2c Use exiv2 for metadata handling 2019-05-06 09:27:44 +02:00
Flössie
0cbc4923bc Relax dependency from procparams.h 2019-02-28 20:44:50 +01:00
heckflosse
831e18ca45 Add override keyword. Thanks @Floessie 2018-11-22 16:19:16 +01:00
George Hilliard
ec814dbf05 FramesData: Don't leak allocated frames, and remove unused functions
Valgrind report:

```
14,960 (11,544 direct, 3,416 indirect) bytes in 37 blocks are definitely lost in loss record 20,483 of 20,540
   at 0x4837DEF: operator new(unsigned long) (vg_replace_malloc.c:334)
   by 0xC06963: rtengine::FramesData::FramesData(Glib::ustring const&, std::unique_ptr<rtengine::RawMetaDataLocation, std::default_delete<rtengine::RawMetaDataLocation> >, bool) (imagedata.cc:1121)
   by 0xBD774F: rtengine::DFManager::addFileInfo(Glib::ustring const&, bool) (dfmanager.cc:380)
   by 0xBD6E90: rtengine::DFManager::init(Glib::ustring) (dfmanager.cc:303)
   by 0xC3EC5D: rtengine::init(rtengine::Settings const*, Glib::ustring, Glib::ustring, bool) [clone ._omp_fn.0] (init.cc:93)
   by 0x897CABD: gomp_thread_start (team.c:120)
   by 0x89B7A9C: start_thread (in /usr/lib/libpthread-2.28.so)
   by 0x8ACCB22: clone (in /usr/lib/libc-2.28.so)
```
2018-11-02 03:07:07 -05:00
heckflosse
4a1a10aab0 Pixel Shift: Improve motion mask and further changes 2018-04-14 01:11:01 +02:00
heckflosse
15794cc1ba First steps to extend dynamic profiles for Pixel Shift and HDR images 2018-04-05 14:41:02 +02:00
heckflosse
80b23e7168 Make compilation unit rtengine/imagedata.cc -Wextra clean, #4155 2017-10-23 20:59:47 +02:00
Hombre57
dfe40677e2 Fix coverity issue 2017-10-13 23:25:24 +02:00
Hombre57
bb874bcce7 Bigfix (see #4008) :
- CIECam now gets the shot's setting of the selected frame
- 'UserComment' metadata now correctly handled
- RT prepared to handle XTrans multiframe
- SensorType now set in the cache/data files
2017-10-04 23:27:08 +02:00
Hombre57
0807510603 Bigfix: CR2 files couldn't find the metadata for display (see #4008) 2017-09-26 21:42:59 +02:00
Hombre57
17c7ec684d PixelShift detection for PEF files was broken (see #4008) 2017-09-17 23:05:34 +02:00
Hombre57
ee0bff4124 Updated frame handling with any type of hierarchy (see #4008)
Images can now be detected in nested IFDs or as root IFDs.
2017-09-16 22:30:07 +02:00
Hombre57
d5e4980c08 Adding Floessie's patch to use std::unique_ptr (issue #4008) 2017-08-12 19:21:29 +02:00
Hombre57
1a296b763f Correction as discussed in commit review (see also issue #4008) 2017-08-10 00:50:26 +02:00
Hombre57
f23be9345c Add multi-frame handling.
- Exif of all frames are displayed in the Editor's Exif tab (without
separator)
- isHDR and isPixelShift is added to the data files stored in cache
- In the Editor panel, the QuickInfo frame display the HDR and
PixelShift information, as well as the number of frame and bit-depth for
HDR image
- the number of frame is provided by dcraw. If not set, it is provided
by the Exif's main IFD count
- the PixelShift information (for Pentax as of now) is provided by
looking at the Exif informations
- the HDR information is provided by the Exif information of the first
frame for Pentax raw files, or by the bitspersample, sampleformat and
compression tags for other files

TODO: add icons to the thumbnails to tag HDR and PixelShift files.
2017-08-08 23:42:05 +02:00
Flössie
0731975ff0 Apply modernize-use-nullptr
Setup:
- `mkdir tidy; cd tidy`
- `cmake .. -DCMAKE_BUILD_TYPE=debug -DPROC_TARGET_NUMBER=1 -DCACHE_NAME_SUFFIX=4 -DBINDIR=. -DDATADIR=. -DBUILD_BUNDLE=ON -DWITH_LTO=OFF -DOPTION_OMP=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON`
- `cd ..`
- `find -name '*.cc' -exec clang-tidy-3.8 -header-filter=.* -p=tidy -fix-errors -checks=modernize-use-nullptr {} \;`
2016-10-12 17:48:40 +02:00
DrSlony
0e0cfb9b25 Formatted all .cc and .h code in rtengine, rtexif and rtgui using astyle 2015-08-11 11:55:03 +02:00
torger
d5ca351c20 Issue 2134: removed obsolete raw highlight preservation setting from GUI (still left in procparams for backwards compatilibility) 2015-07-10 12:00:36 +02:00