Skip to content

Conversation

Desmis
Copy link
Collaborator

@Desmis Desmis commented Jun 23, 2024

Contrast Enhancement

Purpose
This module complements the Tonal Response Curve (TRC) in the Abstract Profile (Color tab) and allows the user to carry out tonal contrast adjustments.

Is tonal contrast a difficult concept?
Traditionally, any graphics software can be used to retouch contrast. Empirically, this can be translated as modifying the difference in luminosity between the light and dark parts of an image.
There are various algorithms some of which may or may not take into account the following:

  • the dynamic range ;
  • the whole or just part of the image (using masks or spots).

Contrast acts on the luminance channel, whether in RGB (or its HSV derivatives, etc.) or Lab mode. and can be modified using various tools of varying complexity, linear or non-linear. For example by using functions such as log encoding, Laplacians, wavelets, guided filters, tone curves, sigmoid curves etc.

The special case of wavelets:
Wavelets are a little-known mathematical tool that is not widely used as such in image-processing software but can be the basis for other tools. Rawtherapee is, to my knowledge, the only one to have a coherent and grouped set of tools using wavelets. Unfortunately, the whole package may seem complex and off-putting.
Extensive information about the principles of wavelets and the various tools can be found in RawPedia so I won’t repeat the information here. To summarise:

  • The image details are decomposed into groups of pixels, sorted according to their size (from 2x2 up to 1024x1024 pixels if the system allows it), and distributed across the wavelet decomposition levels (one size per level). The details in each level are then assigned values which correspond to the amount of contrast in each detail (i.e. in each group of pixels) and are only generated if there is a variation between neighbouring pixels (in R,G,B or L,a,b mode).
    They are then sorted according to whether the values are positive or negative for the horizontal, vertical and diagonal directions. The decomposition method used allows the user to choose the number of Daubechies vanishing moments, which affect the quality and finesse of the decomposition.
  • The undecomposed part, which no longer has any variations in the values of neighbouring pixels (beyond the maximum value chosen by the user), constitutes the residual image and can be processed using the same tools as a traditional image.

The following tools are available in Rawtherapee:

  • Contrast by level -this tool can be found in various forms in:
    -The Selective Editing tab
    -Local Contrast & Wavelets > Pyramid 2 > Contrast by level
    -Contrast by Detail Levels
    -The Advanced tab (Advanced > Wavelet Levels > Contrast)
    -The Detail tab (Contrast by Detail Levels)
    It allows you to modify the contrast values of each group of pixels on a per-level basis in each of the 3 directions and for both the positive and negative values. However visible artefacts can appear fairly quickly (noise, blurring, distortion, sculpting effects, etc.) even when taking measures such as progressively reducing the strength of the action for high levels of detail. Additional tools can be used to reduce - but not eliminate - these artefacts (“Attenuation response”, “Selective luminance range”, etc.).

  • Edge sharpness (Advanced > Wavelet Levels and in Selective Editing > Local Contrast & Wavelets) is used both to reinforce edges, similar to the methods used in sharpening tools, and to soften backgrounds (similar to tools such as darktable's “diffuse or sharpen”). Refer to RawPedia for details.

  • Other tools such as Clarity and “Blur levels” (both in Advanced > Wavelet Levels and in Selective Editing > Local Contrast & Wavelets) etc., allow effects that virtually only wavelets can provide.

  • Local contrast: faced with the problems inherent in contrast by level, I decided a few years ago (around 2013) to take a different approach to wavelet contrast. For each level and direction, I evaluate the shape of the signal (average, standard deviation, maximum for positive and negative values). The whole thing is modelled in such a way that the user is faced with a single curve for modifying the contrast, whatever the level. This curve uses the characteristics of the signal to position the mean value at the centre of the graph, take into account the variations on either side of the mean and position the maximum at the far right of the graph. It weakens the action for large values close to the maximum. The system's behaviour avoids the majority of artefact problems, and acts in a fairly similar way across the different levels of detail. I've called this approach 'Local contrast', but this doesn't really convey what it does. This tool is present in Rawtherapee in the Wavelet Levels > Final Touchup module, in several other modules such as Wavelet Levels > “Edge sharpness” and in Selective Editing > Local Contrast & Wavelets. It can also be found in ART.
    Curiously, until now this tool has not been available separately in the tools available in full-image mode.

Variable contrast
However, despite this improvement, the system cannot, at the same time, and with the same quality as seen from the user's point of view, process the levels containing small details (from 0 to around 6) and those containing large details (from around 5 to 9) in the same way.This is why I propose to combine the action of the two systems (“Contrast by levels” and Local Contrast) into a single system.

In this new system, which I have called Contrast Enhancement, per-level contrast is contained in a series of contrast-profile presets, which provide the information needed to adjust the amount of local contrast in each of the levels.

Each preset contains a selection of decomposition levels.
In each of these levels, the contrast values are divided up into ten discrete samples ranging from the lowest to the highest values. The low-contrast-value samples and the high-contrast-value samples (which are often synonymous with artifacts) are then attenuated. The nature and intensity of this attenuation depends on the preset and whether or not "Highlight attenuation" has been activated.
Each preset also contains information used to weight the overall level data to either attenuate the data for the first level (to reduce noise) or to progressively attenuate it for the higher levels.
-the resulting data from each decomposition level is then sent to the curve, which should be preferably “bell shaped” to concentrate the action on the useful levels and attenuate the action at the extremities.

The Contrast Enhancement module has the following characteristics:

  • it works on the whole image,
  • it differentiates the action according to the existing contrast values of the detail levels,
  • it avoids artefacts by reducing the action on the upper and lower contrast values in each pixel group.
  • it introduces the notion of “Variable contrast”, which allows the user to control the areas (small, large, dark or light) where they want to modify the sharpness, structure and differentiation of the highlights, with the minimum number of commands and in the most intuitive way possible, without having to master the mathematical concepts and language of wavelets.
    What does this tool consist of?
    It consists of three parts:
    A “Contrast profile” slider that lets you select several contrast-profile presets as described above.These presets offer a selection of possible degrees of contrast.

These presets are classified :

  • from the least aggressive, corresponding essentially to the lower settings of the Contrast by Detail Levels tool, with the number of detail levels limited to 6, and an attenuated first level to take account of noise.
  • to the most aggressive, going so far as to use the maximum possibilities of the system (memory, size of the Preview).
    At the same time, these presets progressively weaken the action of the “Variable contrast” curve as you move the “Contrast profile” slider to the right.

The “Variable contrast” curve , which is the heart of the system, is used to modify the existing contrast values, based on the size of the pixel groups, their contrast and possible artefacts. The information contained in the presets determines the behaviour of the curve. However, whatever the preset and the level of detail: a) the mid-point of the x-axis corresponds to the most important contrast value for the action; b) the maximum point, to the right of x-axis, corresponds to the maximum contrast found. It is recommended to reduce the variable contrast beyond the mean value.

A Refinement expander, which can be used to modify: a) the distribution of the action between the low, medium and high values of the “Variable contrast” curve, in particular by widening or narrowing the effects of the width of the curve; b) adjust the residual image after decomposition to compensate for excessive effects linked to the action of the curve and the presets.

Moving the Color Management module
The Color Management module (which includes the Abstract Profile) has been moved up in the Color tab and positioned just after the White Balance module. This is to improve it’s visibility and to take into account the fact that it is likely to be used more frequently.

Selective Editing Cam16
In Source Data Adjustments > Highlight attenuation & RGB channels, The RGB Channel Slope module has been improved to better use the tone mapping algorithm.

@Desmis
Copy link
Collaborator Author

Desmis commented Jan 14, 2025

@Lawrence37 @waynesutton50

As agreed, and even if I think it's a mistake, I changed "procparams.cc" taking into account "ppversion < 352"

Three groups of variables are concerned:

  • logcieq - which allowed in 5.11 to have the Brightness Q version of Log encoding (in the loop Ciecam)
  • sigq - which allowed in 5.11 - for Brightness Q (in the loop Ciecam), to use the old Sigmoid Q algorithm
  • sigjz - which allowed in 5.11 - for Brightness J (in JzCzHz), to use the old Sigmoid J algorithm

I tested with the 2 pp3 files you attached "Cam16.pp3" and "Jzazbz.pp3". It seems to work. But as these manipulations are not my strong point, you can check and modify if necessary.

I also changed the ModeQJ toolip which no longer has any reason to exist in its old form.

Cordially

Jacques

@Lawrence37
Copy link
Collaborator

Thanks, I confirm the pp3s result in the same output between 5.11 and this PR.

I assure you that this is not a mistake. Here's why. There are two possible scenarios when someone opens an old edit. First, they are fine with what the old algorithm did. In this scenario, there is no point in forcing them to use a different algorithm because the results are already satisfactory. Second, they want to tweak the edit or start fresh. In this scenario, the processing parameters have changed. Backward compatibility is no longer relevant. You are free to prevent them from going back to the old algorithms. There is no disagreement between us because my only concern is the backward compatibility.

So really, only the first scenario restricts what you can do, and I doubt anyone can come up with a good argument why a user isn't actually satisfied with an edit whey they think they are satisfied.

@Desmis
Copy link
Collaborator Author

Desmis commented Jan 15, 2025

@Lawrence37 @waynesutton50

OK, thank you, this confirms that I was not mistaken...

I am waiting, today or tomorrow, for comments on Laels and Tooltips from Wayne

Then I think you will agree to "merge" with dev? (I hope)

Thank you

Jacques

@waynesutton50
Copy link

waynesutton50 commented Jan 15, 2025

@Desmis Jacques, In the “Cam16” CAM model the tooltip TP_LOCALLAB_QJMODE_TOOLTIP Vous permet de choisir, pour les opérateurs tone-mapping utilisant les données Brightness : Q pour Cam16 - et J pour Jz, entre la version courante (recommandée) 5.12 et les versions antérieures 5.11.
implies that there are changes in the behaviour of the “Tone mapping operators *” further down in the menu (just under the TRC) , however after playing around with the settings, I suspect that it refers in fact to the Sigmoid Q/ Sigmoid Q & Slope based menus just prior to Viewing Conditions. Is this the case?
A few other remarks not related to the tooltip.

  • in the JzCzHz CAM model mode the tone mappers are in the Scene Conditions menu whereas in the “Cam 16” mode they are in Source Data Adjustments menu (which doesn’t exist in the JzCzHz mode). Should there be consistency between the Cam16 and JzCzHz menus?
  • if you check the Log Encoding Jz checkbox and switch between 5.11 and 5.12, the box stays checked which is not the case if you check the Sigmoid Jz checkbox and change between 5.11 and 5.12.
  • I’m not sure that it's necessary to differentiate the 5.11 and 5.12 Sigmoid Jz labels with an asterisk (same remark for "Tone mapping operators*".
  • There are a few inconsistencies in the use of sentence case for some of the sliders. e.g. Hue Rotation should be “Hue rotation” and Threshold Chroma should be “Threshold chroma”.
  • You could maybe shorten the "Log Encoding Q - with CIECAM - Deprecated" label to "Log Encoding Q with CIECAM (deprecated)"

@Desmis
Copy link
Collaborator Author

Desmis commented Jan 15, 2025

@waynesutton50
Thanks for these comments, I will answer you more precisely tomorrow.

It is obvious that this "addition" of 5.11 compatibility with different algorithms is not easy to explain in a tooltip.

For Cam16, for Sigmoid this only concerns the Sigmoid Q part "in the Ciecam loop" -Cam16 Image Adjustments

  • with 5.11 => Sigmoid Q - deprecated
  • with 5.12 ==> Sigmoid Q & Slope based

The 2 Sigmoid algorithms are different

The new part brought since 5.12 in SDA remains the same (5.11 or 5.12) with the menu "Tone mapping operators *" with choices : none, Ev based, Gamma based, Slope based, RGB channel slope, Sigmoid Based . Sigmoid base has been added with 5.12 but is not affected by the tooltip

For Cam16 and Log encoding in SDA (Source Data Adjustments) version 5.11 is seen with one more choice:
Log encodind Q - with Ciecam - Deprecated - which was removed in 5.12, as unreliable

For JzCzHz the difference is only Sigmoid Jz in "Scene conditions" - the algorithms and settings are different

I have taken note of your remarks and thank you for them and will continue tomorrow morning.

Jacques

@Lawrence37
Copy link
Collaborator

@Desmis There is one comment I made about using a unique pointer. Let me know when I can push the code to address the comment.

@Desmis
Copy link
Collaborator Author

Desmis commented Jan 16, 2025

@waynesutton50
In french : la phrase du tooltip pourrait s'enrichir des commentaires suivants. Tu peux adapter - aussi bien le français, que évidemment l'anglais

====
Vous permet de choisir, pour les opérateurs tone-mapping utilisant les données Brightness : Q pour Cam16 - et J pour Jz, entre la version courante (recommandée) 5.12 et les versions antérieures 5.11 (obsolètes). Ces versions sont incompatibles entre elles.

  • pour Cam16 les procédures concernées sont :
    ** dans Cam16 Image Adjustments, pour Sigmoid Q : Sigmoid Q & Slope based pour 5.12, et Sigmoid Q (deprecated) pour 5.11.
    ** dans Source Data Adjustments, pour Log Encoding Q, une case à cocher Log encoding Q with CIECAM (deprecated), n'apparaît que pour 5.11

  • pour JzCzHz , les procédures concernées sont dans Scene Conditions : Sigmoid Jz pour 5.12 et Sigmoid Jz (deprecated) pour 5.11

Les autres variables et fonctions dans Cam16, situées dans Source Data Adjustments : Log Encoding ou Tone mapping operators utilisent toutes les données RGB.

=====

  • if you check the Log Encoding Jz checkbox and switch between 5.11 and 5.12, the box stays checked which is not the case if you check the Sigmoid Jz checkbox and change between 5.11 and 5.12.

Log encoding Jz is not concerned by this change, only Sigmoid Jz

  • Should there be consistency between the Cam16 and JzCzHz menus?

I don't think so. Cam16 is a real CAM (Color Appearance Model), which JzCzHz is not.
I think we used the term "Source Data Adjustments" together to get the idea of ​​a process upstream of Cam16 Image adjustments, but which is not exactly "Scene conditions".
In the case of JzCzHz, we are well upstream of the main process and even if JzCzHz is not a CAM, I have assigned it CAM functions, like Scene conditions, and Surround.
So I think it is correct (or acceptable depending on what we perceive)

I made the changes you suggested and harmonized in the "deprecated" Labels by putting it in parentheses. (deprecated)

In French
Reste la traduction et/ou la compréhension du tooltip relatif à Display White point (cd/m2)
TP_LOCALLAB_SIGMOIDNORMCIEDISP_TOOLTIP;(provisional).
“Adapte le point blanc à destination du périphérique de sortie pour le rendre compatible avec son pic de luminance. Cette fonctionnalité, n’est pas à l’endroit souhaité du pipe-line, car trop éloigné du processus output final. Donc à utiliser avec précautions”.

Ce slider ménage l'avenir, il suppose un moniteur HDR (ou très performant). Malheureusement actuellement, les profils de sortie vers les moniteurs - au moins ceux présents dans RT - sont en Lab 8 bits, donc incapables d'utiliser pleinement ces données. On peut dire la même chose en grande partie pour le module JzCzHz

Thank you

Jacques

@waynesutton50
Copy link

@Desmis @Lawrence37
Here are the suggested translations for the two tooltips. I'd recommend putting the additional comments and recommendations in the documentation to keep the tooltips relatively short.

TP_LOCALLAB_QJMODE_TOOLTIP;The tone-mapping operators that use brightness data (Q for CAM 16 and J for Jz) have been modified in RawTherapee version 5.12. This allows you to select either the current or the deprecated version.

TP_LOCALLAB_SIGMOIDNORMCIEDISP_TOOLTIP;Allows you to adapt the white point to the peak luminance of the display device. Its position in the processing pipeline is not optimal so use with caution.

@Desmis
Copy link
Collaborator Author

Desmis commented Jan 16, 2025

@waynesutton50

Thank you, I will update this afternoon :)

Jacques

@Desmis
Copy link
Collaborator Author

Desmis commented Jan 16, 2025

@Lawrence37

No problem, you can push your change about using a unique pointer.

:)

Jacques

@Lawrence37
Copy link
Collaborator

@Desmis I added the commit.

@Desmis
Copy link
Collaborator Author

Desmis commented Jan 17, 2025

@Lawrence37
After thinking, I changed in RT all the terms Cam16 and Cam02 to CAM16 and CAM02, to respect the standards, even if the modifications made at the algorithm level mean that it is not CAM16

I also tried to better take into account the recommendations of Rawpedia (allways down) for respecting uppercase (U) and lowercase (L) in Frames, checkboxes, etc. I also tried in these modifications to update the tooltips with these same modifications. But nothing is perfect.

I don't think I have to make any more changes to this PR

My computer returned from repair after a power surge (motherboad burned) is working very poorly, I returned it to the manufacturer, and so I am still with my (very) old machine

Jacques

@Desmis
Copy link
Collaborator Author

Desmis commented Jan 18, 2025

I think, after this big review on Labels, tooltips, convention, etc. that I finished

@Desmis
Copy link
Collaborator Author

Desmis commented Jan 19, 2025

@Lawrence37

OK thank you.

I will merge soon :)

@Desmis Desmis merged commit a578423 into dev Jan 19, 2025
6 of 8 checks passed
@Lawrence37 Lawrence37 linked an issue Mar 2, 2025 that may be closed by this pull request
Benitoite added a commit to Benitoite/RawTherapee that referenced this pull request Jul 22, 2025
* Add cammatrices.json update tool (taken from ART)

* Update cammatrices.json from ART (ADC 16.5)

* Add offset times to default selected EXIF

* Generalized Hyperbolic Stretch in Selective Editing (RawTherapee#7210)

* GHS GUI first step

* GHS GUI first step

* GUI step 3

* Hide show ghsmethod

* Siril functions for ghs

* Init ghs in iplocallab

* ghs step 2

* ghs step 4

* Comment copyright Pixlnsight 2021

* Smooth highlights and tooltips

* Enabled saturation and luminance ghs mode

* First tooltip

* Ghs tooltips

* Remove wrong packstart inverssh

* Change labels and tooltips

* Disabled mask in global and other improvments

* Comment code

* appimage and windows yml ghs

* Change tooltip

* Ghsmethod hue and change tolltips

* Change tooltip

* Inverse Stretch step 1

* Inverse GHS

* GHS tooltips

* Change tooltips

* Change tooltip

* Linear black point

* Small change to blackpoint

* Change tooltip

* Clean and comment code

* forgotten GHS highlight attenuation msg in history

* Comment code with Transformation equations

* Change tooltip

* Wrong default value balck point

* Comment code iplocallab

* Ghs curve step 1

* GHS curve step 2

* Show GHS setting in a Curve Box

* Tooltip for ghs S curve

* Disabled warning in compilation simpleprocess

* Simplified code part 1

* Simplified code GHS graph part 2

* Improve black point with negatives values

* Improve BP and tooltip

* Listener enable only with GHS

* White point for GHS

* Change label and tooltip

* Improve behavior white point and black point

* Link sliders ghs_SP ghs_LP ghs_HP and change code to avoid balck screen

* hide unused button in diagonal curve GHS

* prevents the GHS representation in S from displaying artifacts if ghs-d=0

* Change tooltips

* Improvment and tooltips

* Forgotten tooltip

* Improve GUI GHS S curve - change tooltips

* Set transition gray areas in S curve GHS with values of the RT-spot

* Change label GHS

* setlogscale blackpoint and symmetry

* Set recursive reference enable by default in controlspotpanel

* Change lastlocalCurvesDir Dirghs in locallabtools and options - change labels

* Added in converttonormal ghsMode.. not sure if this is useful

* DIY to make GHS curve work without the choices

* Change RGB calculation with luminance function working profile

* 5 modes GHS method

* Label to show datas clipped Black point and White point

* Various change white point tooltips

* Bad behavior wp bp labels

* Small change to improccordinator call to ghschanged ghsbwchanged

* Set log scale ghs_D

* Hide Graduated filter if GHS enable

* Luminance Lab in ghsmethod

* Lab slope factor step 1

* Slope and Chromaticity GHS improvments

* Fixed bad sqrt line 17477 iplocallab

* Workaround linear GHS - re-enable Graduated filer GHS

* Change limits slope lab factor

* Ghs chromaticity Lab (Lch)

* Improve ghs chromaticity

* Change labels and tooltips Lab chroma

* Slope Lab to 100

* Noise and saturation RGB

* Saturation RGB standard and labels

* Change histogram and navigator panel without gamma when using working profile

* Remove gray in GHS curve

* Local contrast a minima

* Regularization stretch

* Improve Graduated Filter in all cases GHS Color and Light etc.

* Improves nlmeans to reduce noise after GHS

* Change to GF - tooltip Nlmeans

* Added oW oH tW tH etc.

* Added call GF

* tX tY for previewProps

* Comment code GF

* Improve local contrast ghs

* Change norm to norm2

* Improve GUI mode complexity and Lab GHS

* Show values BP WP in GUI

* Labgrid ghs step 1

* Labgrid for simulation GHS - step 2

* More points for Labgrid ghs

* Clean and comment code

* Fixed crash in inverse GHS white point - set to 10 points for GSH simulation

* Change to black point in inverse GHS

* Intilialize simulation with nothing if new spot

* Remove curve GHS - optimize code simulation - improve GUI

* set ghs default - fixed crash is case HP SP LP

* Fixed crash - I hope in inverse GHS

* Simplify WP and BP limits to avoid crash in inverse GHS

* Clean code with ghscurve - ghsshape

* Change tooltips

* Change to D - GUI - comment code

* Simulation with 4 more points

* Best simulation with point 0.05 and 0.95

* Clean code - change for crsah in Inverse GHS

* Show values WP and BP

* Revert "Generalized Hyperbolic Stretch in Selective Editing (RawTherapee#7210)" (RawTherapee#7250)

This reverts commit 16db618.

* Gamut compression  - reduce artifacts resulting from out of gamut (RawTherapee#7205)

* First functions needs for ACES

* New file GUI compressgamut

* GUI first step

* GUI first step

* Gui step 2

* GUI procparams and paramsedit

* GUI read

* GUI step 4

* GUI step 5

* First tooltip

* Gamut compression tooltips

* Various GUI improvment

* History msg

* Comment code with Aces remarks

* First change improccoordinator and events

* Save work on matrix

* Compress gamut next work

* First try gamut compress

* Replace cout by printf in invertmatrix

* Change tooltips and events

* Added namespace std to iplab2rgb

* Comment code

* Active rtthumbnail

* Change tooltip

* Various improvment GUI and rolloff

* Added adobeRGB gamut

* Appimage windows yml

* Remove rttumbnail gamutcompr

* Change event to COMPR

* Change tooltip and verbose

* Restore raw de-haze history message

* Refactor ACES gamut compression functions

* Fix gamut compression color space history message

Correctly display the color space name.

* Add "unchanged" for gamut compression color space

Allow "unchanged" in batch mode.

* Fix gamut compression yellow distance for batch

* Update copyright for gamut compression GUI

* Fix gamut compression color space names

* Refactor gamut compression code

* Remove comment rtthumnail.cc - Acesp1 default

* Change matrix DCI-P3 - threshold maximum to 1 in GUI and in gamut compression - tooltips

* Change tooltip

* Clean code - change tooltips

* Remove appimage windows yml

---------

Co-authored-by: Lawrence Lee <[email protected]>

* Fix dcraw reading of black level for Sony

Don't set black level from tiff_bps if a black level is in the metadata.

Remove the Sony ILCE-7M3 black level from camconst.json. The black level
is in the metadata (512 for ISOs < 128000, 1024 for ISOs >= 128000).

* Fix Canon R8 black level with electronic shutter

Remove bad pixels from the masked areas. The top ~40 rows are slightly
brighter than the rest, and the remaining rows at the top near the
center are brighter too (not as bright as the top 40 rows though).

* 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

* Fix compiler warnings

* Fix compiler warnings

* Refactor aspect ratios out of crop.cc

* Add framing tool GUI

* Added under the Resize tool like PR sharpening
* Adds FramingParams and FramingParamsEdited structs
* No parameter read/write implemented
* No support for batch mode
* No adjuster listeners implemented
* Signals and callback functions are defined but do nothing

* Add RAII listener blocking utility

* Added for ToolPanel listener and Adjuster
* Follows style of ConnectionBlocker for sigc::connection

* Add framing tool ProcParams

* Adds FramingParams parameter struct to ProcParams
* Implement saving and writing to struct from framing tool GUI

* Implement load/save for FramingParams

* Implement writing FramingParams to keyfile
* Implement reading FramingParams from keyfile

* Implement FramingParamsEdited operations

* Implements edited param manipulation operations for framing tool

* Implement partial profile for framing tool

* Update partial profile load/save GUI to include framing tool
* Allows for loading/saving framing tool parameters from the clipboard

* Implement ProcEvents for framing tool

* Add new events to ProcEvents
* Add new events to refresh map under RESIZE category
* Add new strings for displaying events in history panel
* Hook up GUI events with emitting ProcEvents

* Tweak framing tool GUI

* Set sensitivity of aspect ratio and orientation combo boxes
* Sensitivity determined by absolute/relative sizing method
* Show allow upscaling box for BBOX framing method

* Calculate required image and frame sizes

* Refactor simpleprocess.cc to be more clear on resize dimensions
* Implement image and frame sizing calculations
* Resizes the image based on adjusted framing calculations
* Missing functionality to draw border around image after resizing

* Implement drawing border for framing tool

* Draws border after all resize operations are complete
* Update the RGB sliders for 16-bit channels

* Fix framing tool batch mode behavior

* Add adjuster add/set options to preferences
* Update width/height limits
* Trim adjuster values
* Batch mode fixes
  * Display all settings with sensitivity
  * Add "(Unchanged)" option to combo boxes
  * Fix checked button toggle modes

* Fix computation errors in framing tool

* Compute image aspect ratio if required instead of leaving at 0
* Fix divide by zero error in computing framed size
* Compute resize scale based on original crop
* Reword "Current" aspect ratio to "As Image"

* Fix missing FramingParams equality check in ProcParams

* Improve framing tool usability

* Rename "Resize" to "Resize & Framing" from discoverability
* Add ColorPreview class for displaying a solid color
* Add border color preview

* Fix resize scale adjustment with framing

* Add uniform relative sizing method to framing tool

* Fix some more compiler warnings

* Fix usage of deprecated Exiv2 function

Exiv2::enableBMFF() is deprecated as of v0.28.3. Only the CMake flag
EXIV2_ENABLE_BMFF is required to enable BMFF support.

* Fix for review remarks

* Fix crash when opening multi-frame images

Fix source of raw data when calculating raw minimum values for raw
de-haze.

* Fix bugs in framing tool sizing

* Rework uniform relative size calculations
* Fix minimum size requirements not being respected
* Fix typo in framing tool keylib value
* Drive-by code formatting changes

* Fix framing tool issues

* Print messages only in verbose mode
* Linearize 8-bit values to 16-bit values properly
* Fix memory leak

* Switch framing tool events to use event mapper

* Removed hard coded events from ProcEventCode and RefreshMap
* Change HISTORY_MSG_* to HISTORY_MSG_FRAMING_*

* Fix missing min frame border

* Previously only considered min border if the current border is smaller
* Need to consider as long as min size is enabled

* Support demosaiced floating point DNGs with LibRaw

* Set font size of quick info display

Use the main font size set in preferences.

* Read color label from embedded XMP

Cherry-picked and adapted from fdca0e4cd178b5f3b1a8fbd1f999b667837d7615.

* macOS CI: upgrades x86_64 runner to macOS 13

* Reject bad pixels with raw de-haze

Do not consider pixels lower than the black level.

* Clean up framing compiler warnings

* Remove unused variables/dead code
* Add missing `.children = {}`
* Remove relative includes

* Fix rank and color label filtering

Ensure color label values are between 0 and 5 (no label + 5 colors).

* Add sliders for scaling images horizontally or vertically only

* Notify RTImage on scaling change

The code only updates scalable icons on first initialization. That means
the icons do not resize if the user changes the scaling by settings or by
dragging to a different monitor.

Another edge case is if the user has a monitor with lower scaling that
is the initialization monitor but is not the main display monitor.
The scaling and icons are initialized for the init monitor, but the app is
displayed on the main display monitor.

This CL adds a global signal that is emitted when the scaling changes.
RTImage will refresh its cached image and request a redraw when this
signal is received.

Limitations:
The current infrastructure is not window-aware. If there are multiple
windows open, the scaling is applied globally which could lead to
discrepencies between windows.

* Fix blurry preview with HiDPI

The preview image buffer should be scaled to match the physical widget
size in device pixels. Otherwise, a scaling will be applied on the
under-sized preview image causing blurring.

* Formalize HiDPI API utilities

* Add a variety of "types" to make logical/device pixel space clear
* Fix preview image border sizing issues

* Fix blurry thumbnails

* Set device scale on thumbnail back buffer image surfaces
* Track device scale changes on thumbnail entries and update if needed

* Fix blurry editor image info text

* Fix blurry editor preview when panning

* Fix blurry image in editor panel

* Fix preview sizing to match crop
* Modify variables so coordinate system is clear
* Drive-by code style

Issues:
* Incorrect positions for selecting on image
* Incorrect sizing for crop guides

* Fix crop guide sizing

* Fix zoom positioning

* Fix crop window drawing outside boundary

* Fix incorrectly sized observed crop area indicator

* Remove unused parameters in functions and add const

* Fix resize/drag crop window tracking

* Fix image to screen coordinate conversion

* Fix blurry lockable color picker

* Fix edit subscriber object positions and mouseover

* Fix histogram and pipette coordinates and better crop frame

* Fix missing batch queue thumbnails

* Properly handle device scale
* Remove dead code

* Fix segfault on empty main crop window

* Adjust margin scaling for image info

* Fix unscaled icons with non-96 DPI

* Improve lens identification for Sony ARWs

Let Exiv2 get the lens name if the lens spec is present. Otherwise, use
the lens ID.

* Added an option to the batch queue output location template.
New option adds a specifier for the output file format.
The "%e" specifier is replaced with the output file format.
For example, "converted_%e" will be replaced with "converted_jpg" if the output format is jpg.

An argument was added to the calcAutoFilenameBase function to allow the format to be passed in.

Changes to be committed:
	modified:   rtgui/batchqueue.cc
	modified:   rtgui/batchqueue.h

* Fix pp3 deletion when clearing processing params

Fix comparison of original vs. current rank. The rank value can be -1,
which should be interpreted as 0. This allows proper assessment if the
rank has been changed. The pp3 is deleted if and only if the rank, color
label, and trash status are unchanged. pp3s were not getting deleted
because of the mismatch between the original rank (-1) and current rank
(0).

Also consider the rank and color label in the metadata and XMP sidecars.
If the rank and color label have not been edited in the current session
and the current values match the ones in the metadata and XMP sidecars,
the pp3 can be deleted.

* Added a couple comments in the code to support the updates made in
support of the addition of a formatting specifier for the output file format

Changes to be committed:
	modified:   rtgui/batchqueue.cc

* Updated the help panel for the batch queue output location template

Added in an example and a description of the "%e" format specifier which puts the file name extension in the output path

Changes to be committed:
	modified:   rtdata/languages/default
	modified:   rtgui/batchqueuepanel.cc

* Abstract Profile - Contrast enhancement -- Selective Editing Cam16 and JzCzHz - improvments (RawTherapee#7111)

* Init levels trc GUI

* Levels TRC

* Complete with gamma based attenuation

* Limit RGB channel Slope with checkbox

* Improve GUI and code channel TRC

* Change default values - compexity levels RGB channels

* Relative gamma mode RGB channel TRC

* Change label and ponderation rolloff

* Change rolloff level

* Threshold attenuation

* Threshold attenuation 2 part

* GUI Link R G B

* Linked RGB with Green slope - RGB channels

* Set Freeman TM functions with ImProcFunctions

* First GUI Abstract profile highlight attenuation

* GUI AP part 2

* Restore olg GUI AP

* Expander AP primaries adn illuminant

* Disable RGB channel TRC

* Expander contrast AP

* Slider attenuation response

* Save work GUI local contrast

* Save GUI part 2 AP curve

* Local contrast GUI Abstract Profile

* Move Abstract profile in toolpanel and ICMpanel

* rtengine variable contrast

* Variable contrast 2

* Variable contrast engine 3

* Variable contrast engine 4

* Variable contrast engine

* Detail levels pyramid

* Engine residual contrast

* Residual contrast

* Change settings detail levels

* Expander refinement - new tooltips - low resid contrast

* Change contrast profile and labels

* Remove warning message GUI Gtk

* Gamutcontrol code - disabled

* Improve with calceffect

* Other improvement variable contrast

* Offset variable contrast

* Range offset - comment code

* Parametric inva fot lut

* Clean cmakelist.txt

* Change contrast profiles

* Comment code ipwavelet

* Added orthogonal Daubechies scaling D20

* Change strenght curve - tooltip Daubechies

* Forgotten changes

* Comment code

* Move variable in process - take into account highlight attenuation

* Display label maximum preview and preset selection

* Remove console message

* harmonize levels wavelets iplocallab

* Tooltips contrast enhancement

* Change tooltip Contrast profile

* Chnage tooltip Contrast

* Message warning preview size

* Change gamma TRC values in GUI

* Remove itanium architecture support for windows as PR 7105

* Change windows.yml and appimage.yml

* Windows.yml apseimprov

* Clean and comment ipwavelet

* Clean comment icmpanel.cc

* Harmonize local contrast wavelet Selective editing with Abstract profile

* Harmonize with AP - offset

* vanishing moment D20 - Selective editing wavelet

* Offset only in advanced mode

* GUI expander contrast enable and pyrwavtrc

* Clean and comment code

* merge with dev

* Prepare sigmoid based

* Contrast sigmoid GUI

* Skew sigmoid GUI

* Sigmoid tone mapper in iplocallab

* Change GUI settings

* White-point and black-point auto

* Change EvDCP to ALLNORAW as others events DCP

* Change default skew

* Change settings - enable scale Yb

* Display white point - advanced mode

* Improve GUI

* Clean unused variable

* new sigmoid Q in cam16

* Change tooltips and default sigmoid Q settings

* Sigmoid Jz

* Clean code Jz and sigmoid

* Harmonize Sigmoid Q and Sigmoid RGB

* Harmonize Sigmoid Jz

* Clean code

* Improve labels wit cd/m2

* Slope base Q methode first

* GUI slope based Q

* Change default settings and tooltips

* Change tooltips

* Clean code - change default setting

* Change default local contrast & wavelet to wavelet & basic mode

* Fixed bad assignation slopesmoq

* Improve sigmoid and slope based Q - GUI for Log encoding Color appearance

* Remove wrong change

* various small improvments

* Allows black and white AP and SDA in basic mode

* Change  the writing of wGamma and wSlope - attenuates the effect of the first 2 AP contrast profiles

* Clean code wgamma wslope

* Set curve Cam16 in basic mode

* Change position curve in GUI cam16

* Enable tonecurve1 in colorappearance & lighting in standard mode

* Fixed bug scale yb scene - ciecam curve - change default contrast enhancement

* not reset curve shape ciecam in strandard

* Change label Tone mapping operators and tooltips

* Change some labels and tooltips - Appearance - Mask and Mofifications - Recovery Based On Luminance Mask

* Forgotten changes

* Clean locallabtools2.cc

* Maxlevel wavelet minimum to 5

* Reset mask and modifications in SE wavelet and all tools in Global

* Show modified areas SE wavelet

* Tooltip show wavelets decomposition

* Fixed another bad behavior in Global - changes also in color & light for merge file

* Change behavior fullimage - global as in PR GHS

* Disable all mask and modifications in Global but remain active in fullimage and normal

* Set expander expanded = true

* Chane contrast enhancement coef

* Replace VBox trcWavVBox by ToolParamBlock trcWavFBox

* Forgotten code in icmpanel read pedited opacityShapeWLI - hope solve batch mode

* Change RGB Slope behavior with link

* No access to last level contrast enhancement

* Move Abstract Profile tooltip to title

The tooltip was popping up when the cursor was over almost any part of
the tool which was inconvenient. Now, the tooltip only appears when
hovering over the title.

* Improve Color Management expanders behavior

By default, collapse Abstract Profile and leave it's sub-expanders
expanded.

Keep the expanded state of all the sub-expanders during the editing
session.

Fix the right-click behavior. The clicked expander should be expanded
and all siblings, if any, should be collapsed.

* Fix RGB slope tone mapping RGB linkage

Synchronize the red, green, and blue values before updating the preview
to avoid using incorrect values to generate the preview.

* Fix SE CAM tone mapping slider defocus

Avoid unnecessarily hiding then showing the adjusters in tone mapping so
that focus is not lost while adjusting the adjusters.

* Delete history kslopesmo - remove IcmOpacityCurveWL

* change the tooltips as suggested by Lawrence

* Review L37 - change strengthjz strengthlc - MIDDLE_GREY MIDDLE_GREYjz - artifacts ciecam

* Change name Tone map freeman functions

* Remove gamutcont - rename localcont - change allocation memory wdspot

* Clean procparams

* remove sigmoidsenscie - logcieq

* Added * to three labels 'sigmoid' - change tooltip which shows the incompatibility with 5.11

* Forgotten correction suggested by Lawrence

* Compatibility 5.11 log encoding - sigmoid part 1

* Compatibility 5.11 part 2

* Compatibility 5.11 - step 3

* Compatibility 5.11 - step 4

* Compatibility 5.11 step xx

* Compatibility 5.11 - combobox operators Q and J

* Compatibility 5.11 Cam16 GUI first part

* Improve GUI Cam16 sigmoid compatibility

* Compatibility 5.11 Jz - sigmoid - step 1

* Compatibility 5.11 Jz gui step 2

* Compatibility 5.11 Jz GUI step x

* Compatibility 5.11 Jz - history - etc.

* Various change labels - history ...

* Improve GUI - hide show 5.11 5.12

* Jz 5.11 in iplocallab - step 1

* Compatibility 5.11 iplocallab cam16 step 1

* Improve GUI hide show 511 512

* Solved - I hope - GUI problem with tone mapper Q and J 5.11 and 5.12

* Compatibility 5.11 iplocallab Cam16 step 2

* Improve GUI compatibility 5.11 labels tooltips

* Small improvments GUI - labels - history...

* Fixed typo in paramsedited.cc clcurve issue 7283

* Change tooltips method 5.12 - 5.11 for cam16 and Jz  brightness Q or J

* Clean and refine code

* Various change dafult language  and CAM16 CAM02 replace by Cam16 Cam02

* Change modeQJ method for 5.11 in function ppversion

* Change labels as suggested by Wayne PR 7111

* Others changes suggested for label

* Change tooltips as suggested in PR

* Use unique pointer instead of manual management

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <[email protected]>

* Change all Cam16 references to CAM16

* Change convention uppercase and lowercase in frame - checkbox

* Improve tooltips for Tone Mapping Operators

* Another change CIECAM and uppercase lowercase in checkbox

* Remove appimage and windows yml

---------

Co-authored-by: Lawrence Lee <[email protected]>

* CodeQL workflow fix (RawTherapee#7290)

The ubuntu-latest runner is now using Ubuntu 24.04. Package libhwy0 has
been renamed to libhwy1t64. Since libhwy-dev is required and dev
packages depend on the runtime library, libhwy1t64 does not need to be
explicitly installed.

Update libjxl and its dependencies in CodeQL workflow.

* Fixed pb step 1

* Replace get_source_for_surface with home grown version

* Fix processing params clear when XMP sync enabled

Fix caching of XMP when clearing processing parameters so that it knows
if the pp3 can be deleted without affecting the rank and color labels.

* Improve proc params clear when XMP sync enabled

Always check the rank and color label in the XMP if XMP sync is enabled
when clearing the processing parameters. Allows the pp3 to be deleted
whenever possible, even if the rank or color label has been edited.

* Fix workflow ability to upload artifacts

Add content write permission to AppImage, macOS, and Windows workflows.

* Fix macOS ARM build

Add permission to upload artifacts to release tags.

* Fix Fujifilm electronic shutter dcraw crop

Applies to the X-T3, X-T4, X100V, X-S10, X-T30, and X-Pro3.

* Reduce unnecessary directory browser refreshes

Ignore more file change events that do not have an effect on what should
be displayed by the directory browser.

* Update Chinese (Simplified) translation

Improves readability and updates CIECAM02/16 translations. Provided by
syyrmb in RawTherapee#7303.

* Fix code quality issues

* Fix for DCPProfile constructor not respecting verbose on all printf occurrences.

* Added missing newlines to keep verbose output more readable.

* Selective Editing  - Enable global for sharpening and contrast by detail levels issue 7312 (RawTherapee#7313)

* Enable fullim global for sharpening cbdl

* Enable fullim global retinex

* Improve Global mode for cbdl

* Improve chroma mode

* Fix crash when using Japanese on Windows

Work around possible GLib bug in string comparison.

* Lensfun automatic detection speedup (RawTherapee#7318)

* Speed up LensFun automatic detection

Replace use of std::regex with manual string manipulation.
std::regex is slow for some locales, such as for Chinese or Japanese.

* Fix typo in comment

* Fixes issue RawTherapee#7282

Fixes issue RawTherapee#7282 "Noise Reduction Luminance Curve changed when using Batch Edit"

* Selective Editing - Avoid negatives values  - see on Pixls.us (RawTherapee#7319)

* Avoid negatives values input SE with CBDL Dehaze and SE Settings

* Change appimage and windows yml with Rawtherapee:avoidneg

* Change Rawtherapee by Beep6581 for yml windows

* Change Rawtherapee by Beep6581 in Appimage yml

* Limits negatives values control to cbdl before

* Changes suggested by Lawrence37

* Change in code, labels and history Avoid zero and negative values to Pre-filter zero and negative values

* Change appimage and windows yml

* Fix partial profile parameter selection

Add Gamut Compression parameters and group raw de-haze into raw black
levels.

* Update repository owner in GitHub workflows

* Allow LibRaw to get white level while loading data

The function for loading the image data from Minolta RD175 raw images
sets the white level. Make use of this white level.

* Add DCP for Canon EOS R8

Created from color target shots provided in
RawTherapee#7300. This profile
does not contain a tone curve nor a look table to reduce the file size.
See RawTherapee#6467 for an
explanation.

* Run generateTranslationDiffs

* Preparing for release 5.12-rc1

* Squashed 'rtengine/libraw/' changes from 12b0e5d60..8afe44cd0

8afe44cd0 Snapshot 202502
29d9785c2 Do not apply canon metadata crop to DNG files
015b27fff Changelog updated
d1a27c26e Merge branch 'master' of git.lexa.ru:LibRaw
ca1368d8e check split_col/split_row values in phase_one_correct
fb23332a9 UINT32=>unsigned as defined in structure declaration
354bc2907 Revert "build: add handling of openmp library"
797ac1934 Merge pull request RawTherapee#680 from ssssota/remove-duplicated-camera
52421b19e fix: remove duplicated supported camera
ca57a1103 Merge pull request RawTherapee#679 from dlemstra/fix-profile-length
25bb86fe7 Merge pull request RawTherapee#678 from clan/openmp
591239482 Changelog updated
42fce9f8e Make sure the profile_length is the same size as the allocated memory.
f767a2fbe prevent OOB reads in phase_one_correct
638154a5b build: add handling of openmp library
bdd9e3436 Prevent out-of-bounds read in fuji 0xf00c tag parser
59cfa8b8a Prevent out-of-bounds read in fuji 0xf00c tag parser
3240fb21f Merge pull request RawTherapee#677 from ssssota/windows-makefile-invalid-indent
416912f43 build: fix indentation (8 spaces -> tab)
bf7a0346d Merge pull request RawTherapee#676 from lance5/master
6a0ef2483 [fix] use LIBRAW_OWN_SWAB control swab
816ab359b [feature] support android NDK 21
cc118c1c1 H265 and JPEG-XL thumbnails support for dcraw_make_mem_thumb
9bcb8a1d9 LIBRAW_CALLOC_RAWSTORE; replace for w/ memmove in dng_sdk glue
bf1a9140e panasonic decoder: limit load_flags to 0x4000
77a46b319 panasonic loader: zero buf to avoid uninitalized data leak
4f5a4cfb3 null-terminate xmp block
f9bb7d126 small allocations: replace malloc with calloc
70f511871 define NOMINMAX before including winsock2 in public header file => do not provide min/max maco
3772d1be2 Merge pull request RawTherapee#661 from nekopsykose/end
f2d1070f7 fix endian detection for ppc64le
47c7a2394 Ignore vendor crops for Fuji S6000/6500
17f16837e Prevent Sony-LJPEG decoder buffer overrun
9c9c04b44 Ensure SR2 block is fully read from file
d3cbbd0e9 4-component DNG-JPEG support
891630152 additional check for imgdata.color.WB_Coeffs index range
54c6af90b prevent possible imgdata.color.WBCT_Coeffs overrun
158e635e5 X100V color updated w/ actual data; X-T4 and X-Pro3 typo fixed
393dc925d Fuji X-T3x colormatrix: fixed typo
66a81c333 removed extra Pentax KP colordata
6475fd04b pass all images with wrong bayer filter data to vng_interpolate
fe2a7e2b7 Refuse images with colors==2
c2e8a908d additional offset checks in Sony metadata parser
c9facb4b7 Clean wrong aber values; allocate extra data to image to avoid overrun on specially crafted test images
83bf3ad5e Merge pull request RawTherapee#640 from Calandracas606/fix-clback-docs
c294e7075 fix the docs to properly reflect the size of cblack[LIBRAW_CBLACK_SIZE]
072eeaeb4 fixed integer overflow in largest frame selection code
e58e8e43a additional checked_buffer_t offset checks
73d6daa05 Check for negatife offset checked_buffer_t
0d011198b Oops. Forgot to increase version
a625a7d53 Merge pull request RawTherapee#633 from thesamesam/openmp
b396d92d8 README.md: removed unprintable symbols
9893eb825 README.md: update policy actualized to match libraw.org site
54fbe8f47 libraw_adjust_to_raw_inset_crop
2f75ef793 m4: update ax_openmp.m4 from autoconf-archive (8->14)

git-subtree-dir: rtengine/libraw
git-subtree-split: 8afe44cd0e96611ba3cb73779b83ad05e945634c

* Update dependencies for AppImage workflow

Upgrade the runner from Ubuntu 20.04 to 22.04.

Upgrade exiv2 from v0.28.3 to v0.28.5.

Upgrade libjxl from 0.10.3 to 0.11.1.

Use the system librsvg2.

* Update links to the repository

Change from github.com/Beep6581/RawTherapee to
github.com/RawTherapee/RawTherapee.

* added dcp profile for Panasonic S5mkII

* Update color matrices from ADC 17.2

* Updated Chinese (Simplified) translation.

Provided by syyrmb in
RawTherapee#7343.

* Re-open Generalized Hyperbolic Stretch (RawTherapee#7251)

* GHS GUI first step

* GHS GUI first step

* GUI step 3

* Hide show ghsmethod

* Siril functions for ghs

* Init ghs in iplocallab

* ghs step 2

* ghs step 4

* Comment copyright Pixlnsight 2021

* Smooth highlights and tooltips

* Enabled saturation and luminance ghs mode

* First tooltip

* Ghs tooltips

* Remove wrong packstart inverssh

* Change labels and tooltips

* Disabled mask in global and other improvments

* Comment code

* appimage and windows yml ghs

* Change tooltip

* Ghsmethod hue and change tolltips

* Change tooltip

* Inverse Stretch step 1

* Inverse GHS

* GHS tooltips

* Change tooltips

* Change tooltip

* Linear black point

* Small change to blackpoint

* Change tooltip

* Clean and comment code

* forgotten GHS highlight attenuation msg in history

* Comment code with Transformation equations

* Change tooltip

* Wrong default value balck point

* Comment code iplocallab

* Ghs curve step 1

* GHS curve step 2

* Show GHS setting in a Curve Box

* Tooltip for ghs S curve

* Disabled warning in compilation simpleprocess

* Simplified code part 1

* Simplified code GHS graph part 2

* Improve black point with negatives values

* Improve BP and tooltip

* Listener enable only with GHS

* White point for GHS

* Change label and tooltip

* Improve behavior white point and black point

* Link sliders ghs_SP ghs_LP ghs_HP and change code to avoid balck screen

* hide unused button in diagonal curve GHS

* prevents the GHS representation in S from displaying artifacts if ghs-d=0

* Change tooltips

* Improvment and tooltips

* Forgotten tooltip

* Improve GUI GHS S curve - change tooltips

* Set transition gray areas in S curve GHS with values of the RT-spot

* Change label GHS

* setlogscale blackpoint and symmetry

* Set recursive reference enable by default in controlspotpanel

* Change lastlocalCurvesDir Dirghs in locallabtools and options - change labels

* Added in converttonormal ghsMode.. not sure if this is useful

* DIY to make GHS curve work without the choices

* Change RGB calculation with luminance function working profile

* 5 modes GHS method

* Label to show datas clipped Black point and White point

* Various change white point tooltips

* Bad behavior wp bp labels

* Small change to improccordinator call to ghschanged ghsbwchanged

* Set log scale ghs_D

* Hide Graduated filter if GHS enable

* Luminance Lab in ghsmethod

* Lab slope factor step 1

* Slope and Chromaticity GHS improvments

* Fixed bad sqrt line 17477 iplocallab

* Workaround linear GHS - re-enable Graduated filer GHS

* Change limits slope lab factor

* Ghs chromaticity Lab (Lch)

* Improve ghs chromaticity

* Change labels and tooltips Lab chroma

* Slope Lab to 100

* Noise and saturation RGB

* Saturation RGB standard and labels

* Change histogram and navigator panel without gamma when using working profile

* Remove gray in GHS curve

* Local contrast a minima

* Regularization stretch

* Improve Graduated Filter in all cases GHS Color and Light etc.

* Improves nlmeans to reduce noise after GHS

* Change to GF - tooltip Nlmeans

* Added oW oH tW tH etc.

* Added call GF

* tX tY for previewProps

* Comment code GF

* Improve local contrast ghs

* Change norm to norm2

* Improve GUI mode complexity and Lab GHS

* Show values BP WP in GUI

* Labgrid ghs step 1

* Labgrid for simulation GHS - step 2

* More points for Labgrid ghs

* Clean and comment code

* Fixed crash in inverse GHS white point - set to 10 points for GSH simulation

* Change to black point in inverse GHS

* Intilialize simulation with nothing if new spot

* Remove curve GHS - optimize code simulation - improve GUI

* set ghs default - fixed crash is case HP SP LP

* Fixed crash - I hope in inverse GHS

* Simplify WP and BP limits to avoid crash in inverse GHS

* Clean code with ghscurve - ghsshape

* Change tooltips

* Change to D - GUI - comment code

* Simulation with 4 more points

* Best simulation with point 0.05 and 0.95

* Clean code - change for crsah in Inverse GHS

* Show values WP and BP

* Change tooltips

* Midtones after GHS

* Modification code WP BP

* Tests changes in settings for transition and Shape detection - see Preferences

* Change order labels luma chroma hue

* Fixed bad behavior localllistener denchanged in dcrop.cc

* Save work

* Work on graduated filter

* Improve a little graduated filter SH and others...

* 3 configurations tests graduated filter SH plain image - color more sk - exposure normal

* Forgotten code ...

* Change improccordinator parameter

* Save work printf parameters GF

* New test for GF

* Hide plain image calculation GF

* Small chnages and comment code

* Change tooltip exp graduated filter

* Change tooltip exp graduated filter

* Save work

* Change GF for some tools only in Global and Fullimage - test for GF SH mode plain image

* Fixed crash and GUI part 1

* Others change GF

* Change label - allow GF plain image in SH

* Change GF with cx cy sk

* Adapt locallabtool and locallabtools2 to GF

* Clean code

* GF wavelet only in fullimage and global

* GF - Empirical correction to cx and cy in function of sk

* Change label GHS and position in GUI

* Fixed Black point bad behavior history - an oversight may be age

* Change real strength of GF - to look like GF main

* Include ksk - Skip correction in all code GF

* Passed other parameters to try

* New parameter for GF

* Change position graph-curv ghs and labels black and white point

* Change behavior and default value white point

* Save provisory work

* Save provisory work

* Curve GHS with 21 points including 0 and 1

* Two prameters added to change behavior GF - rationalize their using

* Change Black point direction

* Change range black-point for negatives values - chnage tooltips

* Change tooltips

* Various change to avoid crash and settings defaults

* Disabled showmùaskmethod - set max white point to 5

* Fixed bad behavior when change fullimage to global for mask

* Clean comment code

* Fixed - I hope - bad behavior when we go from Fullimage to Global and vice versa

* Fixed crash in output tif and show time to calculate WP and BP

* Change tooltip BP and WP

* Change tooltips BP WP

* move GF after GHS so as not to influence BP and WP

* Clean code

* Disable all mask and modifications in Global but remain active in fullimage and normal

* Change tooltip graduated filter

* Restore GF in normal mode - and increases GF strength as before

* Clean code locallabtools 1 2

* Comment in calclocalGradientParams in iplocallab for changes in Graduated F

* Change convention labels - tooltips

* Change tooltips

* improves (I hope) the readability of the tooltips

* Remove with comment change complexity in Settings

* Improve settings BP WP - improve tooltips

* Refactor GHS curve and increase resolution

Simplify how the curve parameters are passed to the drawing area.

Use up to 400 line segments to draw the curve.

* Update GHS curve tooltip

Remove statement regarding the number of points used because it is no
longer accurate.

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <[email protected]>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <[email protected]>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <[email protected]>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <[email protected]>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <[email protected]>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <[email protected]>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <[email protected]>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <[email protected]>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <[email protected]>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <[email protected]>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <[email protected]>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <[email protected]>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <[email protected]>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <[email protected]>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <[email protected]>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <[email protected]>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <[email protected]>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <[email protected]>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <[email protected]>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <[email protected]>

* Change Luma with Lightness

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <[email protected]>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <[email protected]>

* Remove warnings in icmpanel

* Changes suggested by Lawrence37

* GHS - Hide inverse always show in some cases - improve tooltip BP WP

* Change tooltip

* Change tooltip

* Small changes

* Change tootip suggested by Lawrence37 - set midtones and LC set_sensitive in function of D

* Add tooltip as suggest by Lawrence37 for LC and midtones

* Remove tooltip on Frame LC and Midtones

* Remove all traces toottips frame LD and Midtones

* set sensitive BLP and HLP to false if stretch = 0

* Change Beep6581 to Rawtherapee in appimage.yml and Windows.yml

* Hide LC and midtones when Stretch = 0

* Clean up Generalized Hyperbolic Stretch code

Convert some ints into enum classes.

Replace new/delete with std::unique_ptr for image.

Remove unused GHS parameters in ProcParams and ParamsEdited which were
used to draw the curve.

Revert changes to the curve editors because they are not needed.

Simplify the drawing of the curve background for efficiency.

Restore the const-ness of some variables.

* Change appimage.yml and windows.yml

---------

Co-authored-by: Lawrence Lee <[email protected]>

* Synchronize translation files with default

* Fix Nikon D5 black level when using LibRaw

With LibRaw, the black level is provided in the global black variable
instead of the per-channel array. Black levels in camconst.json override
the global black level instead of adding to the black level as with the
per-channel levels. LibRaw and dcraw have the same black level for the
D5, so it is sufficient to remove the black level from camconst.json.

* possibly fixed itcwb from command line?

* Fix AppImage build and launch

Use an older version of linuxdeploy to work around a FUSE memory
allocation error (see
https://discuss.pixls.us/t/countdown-to-5-12/49160/6).

Override the minimum CMake version when building libjxl to fix the CMake
configuration error for the sjpeg dependency.

* Update Deutsch for 5.12

* Update release notes

* Fix inconsistent GHS tool width

Allow the black and white point information to wrap.

* Change title Generlized Hyperbolic Stretch to Generalized Hyperbolic Strech (GHS) (RawTherapee#7354)

* Avoid crash issue 7355

* parse_qt: possible integer overflow

* dcraw.cc: parse_qt: possible integer overflow

* Change tooltips TP_LOCALLAB_GHS_LP_TOOLTIP and TP_LOCALLAB_GHS_HP_TOOLTIP

* Change tooltips as suggested in PR

* Change tooltip TP_LOCALLAB_GHS_MID_TOOLTIP as suggested

* Update Chinese (Simplified) translation

Provided in RawTherapee#7361.

* Revert "rtengine/draw.c: parse_qt: possible integer overflow"

This reverts commit c466177.

* Generate translation diffs

* Update Dutch translation

Provided in RawTherapee#7365.

* Update 5.12rc1 release date

* Update Italian translation

Provided in RawTherapee#7368.

* Fix blown images when using LibRaw

dcraw code only normalizes the pre-multipliers for the number of colors
in the raw image. LibRaw can set the pre-multipliers for a greater
number of colors. For example, it can set the 4th multiplier for a
3-color raw. This causes the dcraw code to produce incorrect
multipliers.

Remove the 4th multiplier if the number of colors is less than 4 and the
multiplier is equal to the 2nd multiplier. This lets the multiplier be
set equal to the 2nd one after normalization. For images where the
multipliers are not equal, print a warning.

* Selective Editing - Retinex in global mode issue 7367 (RawTherapee#7370)

* Change in transit_shapedetect_retinex to take into account Global mode

* Change appimage.yml and windows.yml

* Set appimage.yml and windows.yml to neutral

* Use camconst black/white levels for Samsung DNGs

Applies to DNGs from the camera for Samsung cameras that have Pentax
counterparts. This makes the camconst behavior the same as with Pentax
DNGs.

* Add white levels for Samsung GX20 & Pentax K20D

Data from GX20 white frames provided in
RawTherapee#7374.

* Update Chinese (Simplified) translation

Provided in
RawTherapee#7361 (comment).

* Update release notes and splash for 5.12-rc2

* SE sharpening - avoid amount = 0 and show slider in all cases - hide slider gamma in inverse (RawTherapee#7385)

* Selective editing sharpening - avoid amount 0 and show slider in all cases

* SE Hide gamma slider in inverse sharpening

* Preparing for release 5.12

* Update Dutch (Nederlands) translation

Provided in RawTherapee#7392.

* macos: handle SVG pixbufloader

* macOS: swap order of commands

* Remove benchmarking

* macOS: update bundle jxl-cms handler

* macos: touch the dmg background message file

allows a blank and/or missing central dmg background png messge.

* Fix data loading of manually selected Lensfun lens

Remove requirement that the lens mount matches the camera mount. This
allows adapted lenses to work. Matching the lens mount isn't even
necessary because the make and model names together should be unique.

* Adding some code documentation to IdleRegister helper class

* Update date of release 5.12

* Preparing to merge back to dev

* Improve lens names of adapted Olympus lenses

Use Exif.OlympusEq.LensType whenever available because it provides a
better name.

* Fix build with older Lensfun versions (< v0.3.3)

The lfCamera copy constructor was not implemented in older versions.

* Fix black octagons and crash with RL deconvolution

Remove negative values from the input, which cause numerical
instability.

* Support camconst masked areas when using LibRaw

* Add raw crop, black and white levels for EOS R5m2

Data from RawTherapee#7408 and
raw.pixls.us.

* Add ImProcFunctions::needsScaleAny() which returns true if any type of scaling is needed

* Constify parameters to make it easier to read for new developers

* Fix confusion of hscale and vscale in ImProcFunctions::transCoord

* Remove explicit addition of half-way points in ImProcFunctions::transCoord which are added by the automatic subdivision anyways

* Simplify computation of step sizes in ImProcFunctions::transCoord

* Simplify computation of bounding box in ImProcFunctions::transCoord

* Wavelet levels - crash with Highlight threshold in residual image (RawTherapee#7429)

* Avoid zero to threshold residual

* Change appimage.yml and windows.yml

* Remove appimage.yml and windows.yml

* Correctly assign events to EvTransScale(Horizontally|Vertically)

* Remove unnecessary assigning of default values

* Organize tools panes under `rtgui/tools` directory

WARNING: The code does not compile in this commit!

* Fix compilation after moving files

Adds `rtgui/tools` as an rth target include directory to compile
without modifying include paths in files.

* Update includes for moved headers

* Address code review comments

* Fix crop cursor pos in file browser

* Fix cursor delta pos in file browser

* Upgrade R5m2 camconst entry quality rating

Electronic shutter does not affect the raw images and dual-pixel capture is not supported.

* Update rtgui/guiutils.h

Co-authored-by: Copilot <[email protected]>

* Fix macOS ARM build

Make the pixbuf loader query use libraries in the Frameworks directory

* mac: modify librsvg before pixbuf query

---------

Co-authored-by: Lawrence Lee <[email protected]>
Co-authored-by: Desmis <[email protected]>
Co-authored-by: Daniel Gao <[email protected]>
Co-authored-by: Pandagrapher <[email protected]>
Co-authored-by: Alexander Brock <[email protected]>
Co-authored-by: digitalteg <[email protected]>
Co-authored-by: kaesa <[email protected]>
Co-authored-by: Bezierr <[email protected]>
Co-authored-by: Alberto Griggio <[email protected]>
Co-authored-by: Jackson Legge <[email protected]>
Co-authored-by: Martin <[email protected]>
Co-authored-by: npt-1707 <[email protected]>
Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Something could be better than it currently is
Projects
None yet
3 participants