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.
This commit is contained in:
Lawrence Lee
2023-07-29 17:37:13 -07:00
parent b68a6e9581
commit 6787c53c9b
19 changed files with 141 additions and 34 deletions

View File

@@ -69,6 +69,7 @@ class FileBrowserEntry final : public ThumbBrowserEntryBase,
void updateCursor (int x, int y);
void drawStraightenGuide (Cairo::RefPtr<Cairo::Context> c);
void customBackBufferUpdate (Cairo::RefPtr<Cairo::Context> c) override;
void refreshThumbnailImage(bool upgradeHint);
public:
@@ -98,7 +99,7 @@ public:
void getIconSize (int& w, int& h) const override;
// thumbnaillistener interface
void procParamsChanged (Thumbnail* thm, int whoChangedIt) override;
void procParamsChanged (Thumbnail* thm, int whoChangedIt, bool upgradeHint) override;
// thumbimageupdatelistener interface
void updateImage(rtengine::IImage8* img, double scale, const rtengine::procparams::CropParams& cropParams) override;
void _updateImage(rtengine::IImage8* img, double scale, const rtengine::procparams::CropParams& cropParams); // inside gtk thread