44 Commits

Author SHA1 Message Date
Lawrence Lee
b16287ff6f
Fix rank, color label, and trash status reset
The rank, color label, and trash status from a previous session would
reset after editing an image or clearing the processing profile.
2024-10-20 15:14:50 -07:00
Simone Gotti
1098966a8b Add optional image rank/color load/save from/to xmp sidecar
Add optional ability to load/save image rank property from/to xmp
sidecar "xmp.Rating" and color property from xmp "xmp.Label" ignoring
the ones provided in the processing params file.

This behavior is disabled by default and an option under settings ->
file browser has been added to enable it.

When enabled:

* On load:
  * rank and color are not read from processing params.
  * rank is mapped from xmp sidecar file rating entry.
  * color is mapped from xmp sidecar file label entry.

* On save:
  * rank and color are saved to the xmp sidecar
  * rank and color are also saved to the processing param (pp3) files to
    keep them in sync

Rating mapping:

Since rating can be also -1 but rank only goes from 0 to 5, the -1 value
is ignored like already done when importing from embedded xmp data.

Color mapping:

XMP has no color concept, usually programs like digikam uses the label
field to write a color name ("Red", "Orange"). The problem is that this
isn't standardized and label can be any string. Additionally Rawtherapee
has 5 specific colors while other programs can have different colors
with different name so they won't be shown if they don't map to the 5
color names supported by rawtherapee. On save only the 5 color supported
by rawtherapee wil be saved.

Trash is kept only in the profile files for multiple reasons:

* There's no trash concept in xmp, there's the rejected concept assigned
  to a rating == -1.
* We could map rejected to trash but in rawtherapee rank and trash are two different values and
  an image can have both rank >= 0 and trashed set to true.
  Using an unique value like rating for rank and trash (when -1) will
  require changing the current rawtherapee logic.
* Also digikam only handles ratings from 0 to 5 (no -1) and handles
  trash in its own internal way without reflecting it in the xmp
  sidecar.
2024-04-03 20:06:14 +02:00
Simone Gotti
68fd35d881 thumbnail: decouple proc params rank/color/trash
Add a Properties type that contains values for rank, color and trashed
Each value will also contain an edited flag.

The properties variable is used to store rank, color and trashed. They
are fetched from the proc params and will update the proc params when
needed.

This is the base for future implementations where some properties (like
rank) will be also retrieved from other sources like xmp sidecar files.
2024-03-30 09:46:02 +01:00
Simone Gotti
dcc983331d thumbnail: rename get/setStage to get/setTrashed
Also return a bool in getTrashed since it's already used as a bool in
setTrash and in all the checks.
2024-03-30 09:46:02 +01:00
Lawrence Lee
0fdac3797a
Merge branch 'dev' into browser-preview-applied-pparams 2023-08-29 22:58:51 -07:00
Lawrence Lee
6787c53c9b
Show black level adjustments in file browser
File browser thumbnails for raw images start with a minimally-processed
images. These images are cached and image adjustments are applied on
top. The black level is "baked-into" the cached image. Therefore, to
reflect the black level adjustments in the thumbnail, one of two options
are required:
    1. Cache an image before the black level is applied and process the
       black level on top of this image.
    2. Recreate the base image with the new black level and cache it.
The first option yields better performance when the user changes the
black level. However, it requires other base adjustments to be applied
every time, such as the camera multipliers. The second option requires
the base image to be recreated every time the black level is changed.
This commit implements the second option. It minimizes code changes, and
therefore possible bugs. It does add a performance penalty when the
black level changes, but the black level adjustment is rarely used.
2023-07-29 17:37:13 -07:00
Lawrence Lee
c557b320c2
Refresh cached image data if sidecar is changed 2023-05-14 18:18:27 -07:00
Lawrence Lee
0729deec4b
Merge branch 'dev' into metadata-exiv2 2023-03-22 23:01:40 -07:00
Desmis
69c1caafa1
Whitebalance - Removed GUI Itcwb from whitebalance and preferences (#6710)
* Change Preferences for observer whitebalance

* Change label white balance preferences

* Added Preferences 2 parameters Whitebalance auto correlation

* Add Preference Temperature correlation - sort and tooltip

* Change to rtengine cmakelist

* Apply patch from Lawrence37

* Small comment code

* Change defaut order prefrences wba

* Added force extra algoritm to Preferences

* Harmonize itcwb sorted

* Add fields to Preferences Itcwb

* Change settings precision Itcwb in Preferences

* Change tooltip Itcwb preferences

* First stage Itwcwb settings in main with pp3 and selction in preferences

* Second stage Itwcwb settings in main with pp3 and selction in preferences

* Third stage Itwcwb settings in main with pp3 and selction in preferences

* Add itcwb_fgreen student - green optimize

* Add Itcwb green range

* Itcwb history msg - first tooltips

* Remove force-extra because always used

* reused force-extra to use entire CIExy for sampling datas

* Removed inwanted text in console

* Set sensitive for Itcwbframe

* Various change - comment ..

* Small code review - chnage tooltips

* Remove settings itcwb_delta in Rawimagesource.cc to simplify

* Remove Itcwb Observer - put a single observer for everything - general - itcwb

* Fixed conflicts in colortemp.cc

* Various change - fixed bug - simplify

* Fixed limits for settings pp3 - chnage tooltip

* Clean unused code

* Put itcwb_findgreen in GUI

* Added checkbox 'Low sampling' to find the settings of 5.9

* Set Observer to Observer 10° - preferences default

* Missing setting Low sampling

* Show white balance multipliers

* Change default settings - Itcwb_sorted

* Move observer from preferences to WB

* Make observer selectable for camera WB

* Ensure observer checkbox is in sync with PP3

* Set default ITCWB low sampling for PP3s from <=5.9

Ensure temperature correlation white balance algorithm 1 is used when
opening edits from versions 5.9 and earlier.

* Removed unused White-balance frame in Preferences

* Comment some GUI sliders checkbox

* Removed all GUI itcwb in preferences and whitebalance

* Removed forgotten code in preferences

* Remove labels tooltips history Itcwb

---------

Co-authored-by: Lawrence Lee <45837045+Lawrence37@users.noreply.github.com>
2023-03-19 07:47:58 +01: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
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
Ingo Weyrich
c9e58fea54 cppcheck clean rtgui/thumbnail.* 2021-05-23 14:35:59 +02:00
Thanatomanic
ae754b2492 Merge branch 'dev' into metadata-exiv2 2021-04-27 09:59:52 +02:00
Floessie
1318935a87
Better handle thumbnail generation of extreme aspect ratio images (fixes #3794)
* Backport fix taken from ART
* Enforce minimal thumbnail size of 1x1 px in two places, prevents divison by zero and empty image generation
2020-10-25 18:24:30 +01:00
Thanatomanic
c8ef1ee628 Final changes, branch now buildable 2020-10-16 16:15:10 +02:00
Thanatomanic
8b4389ade9 Resolve exiv2 merge conflicts and merge with 2020-10-16 11:45:26 +02:00
Ingo Weyrich
79431ffa1d Some changes suggested by @Floessie 2019-11-26 19:42:48 +01:00
Ingo Weyrich
2a4891827d Some cleanups 2019-11-26 15:25:11 +01:00
Ingo Weyrich
962f81f6bc Further reduction of include dependencies 2019-11-01 12:51:08 +01:00
Flössie
add5c790d6 #pragma once for our headers plus drive-by formatting 2019-10-31 10:20:50 +01:00
Ingo Weyrich
ba8dda1836 Further cleanup of include dependencies 2019-10-30 16:38:02 +01:00
Ingo Weyrich
068847eb5a Further cleanup of include dependencies 2019-10-29 21:06:27 +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
Hombre
ce04447c7a Fix crash while rotating several thumbnails in File Browser
Fix issue #4858 and possibly #5310
2019-09-03 22:18:20 +02:00
Alberto Griggio
c360fd7e2c Use exiv2 for metadata handling 2019-05-06 09:27:44 +02:00
Flössie
57d030881d More procparams.h relaxation 2019-03-01 17:40:02 +01:00
Flössie
0cbc4923bc Relax dependency from procparams.h 2019-02-28 20:44:50 +01:00
Roel Baars
c8300b137c
Add Crop reset button - 2nd attempt (#5015)
Add dedicated reset button for Crop, rearrange some GUI, disable crop buttons in batch mode
2018-11-23 19:10:04 +01:00
heckflosse
415772254f 'processing profile -> reset to default' and 'processing profile -> clear' seem broken, fixes #4874 2018-10-18 11:41:00 +02:00
heckflosse
095cb010e5 reduce updates to preview, panning background, navigator and thumbs, fixes #4834 2018-09-27 18:16:29 +02:00
Hombre57
86dac147c6 Adding icons on thumbnails and solving a bug in cacheimagedata.cc
See issue #4008.
The bug in cacheimagedata.cc was preventing correct cached thumbnail
loading, asking for a full processing at each loading of the directory.
2017-08-13 18:13:39 +02:00
Hombre57
d5e4980c08 Adding Floessie's patch to use std::unique_ptr (issue #4008) 2017-08-12 19:21:29 +02:00
Alberto Griggio
6fe04e3990 fixed warnings in rtgui 2017-04-01 15:55:39 +02:00
Alberto Griggio
e0d9090420 Changed "Processing profile operations -> Custom Profile Builder" to "Reset to default profile"
The behaviour has changed slightly, so that clicking the menu item now resets
to the default processing profile specified in the preferences. If this
involves calling the custom profile builder, the behaviour is the same as
before. But this is a bit more general, in that it might also simply reapply
the static default profile, or regenerate the dynamic one (depending on the
user's settings)
2017-03-13 23:24:12 +01:00
Alberto Griggio
dca0e41f35 added "Auto White Balance temperature bias" feature
This new slider in the White Balance tools allows to alter the computation of
the "auto white balance" by "biasing" it towards warmer or cooler
temperatures. The bias is expressed as a percentage of the computed
temperature, so that the resuling temperature is given by
"computedTemp + computedTemp * bias".
2017-02-12 17:39:52 +01: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
heckflosse
566d4c9822 Cppcheck: Fixed most issued in rtgui/* 2016-10-04 23:28:19 +02:00
heckflosse
c8779c04f5 Fix all - 2 cppcheck performance hints 2016-07-06 13:04:24 +02:00
Adam Reichold
747a28014b Begin removing simple pass-through wrapper for POSIX-style file system functions from safegtk module. 2016-02-21 10:07:57 +01: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