CaptureMoment 0.1.0
Free and open-source non-destructive photo editor
Loading...
Searching...
No Matches
operation_brightness.h
Go to the documentation of this file.
1
8#pragma once
11
12namespace CaptureMoment::Core {
13
14namespace Operations {
34{
35public:
36 // --- Metadata ---
37 [[nodiscard]] OperationType type() const override { return OperationType::Brightness; }
38 [[nodiscard]] const char* name() const override { return "Brightness"; }
39
40 // --- Range Access (via the centralized ranges) ---
46
52
58
84 [[nodiscard]] Halide::Func appendToFusedPipeline(
85 const Halide::Func& input_func,
86 const Halide::Var& x,
87 const Halide::Var& y,
88 const Halide::Var& c,
89 const Halide::Param<float>& param
90 ) const override;
91};
92
93} // namespace Operations
94
95} // namespace CaptureMoment::Core
Interface for providing the Halide fusion logic of an operation.
Adjusts the brightness of an image region.
Halide::Func appendToFusedPipeline(const Halide::Func &input_func, const Halide::Var &x, const Halide::Var &y, const Halide::Var &c, const Halide::Param< float > &param) const override
Appends this operation's logic to a fused Halide pipeline. This method is used by the PipelineBuilder...
static constexpr float MAX_BRIGHTNESS_VALUE
Maximum allowed brightness value. Defined by OperationRanges::getBrightnessMaxValue().
const char * name() const override
Gets the constant name of the operation.
static constexpr float DEFAULT_BRIGHTNESS_VALUE
Default brightness value. Defined by OperationRanges::getBrightnessDefaultValue().
static constexpr float MIN_BRIGHTNESS_VALUE
Minimum allowed brightness value. Defined by OperationRanges::getBrightnessMinValue().
OperationType type() const override
Gets the unique type identifier of the operation.
Interface for providing the Halide fusion logic of an operation.
OperationType
Identifies the type of an image processing operation.
@ Brightness
Brightness adjustment (Additive). Adds a constant value to all pixels. Use sparingly as it can wash o...
Manages the lifecycle of a single IWorkingImage instance.
Declaration of the OperationRanges struct.
static consteval float getBrightnessMaxValue()
Gets the maximum allowed value for the Brightness operation.
static consteval float getBrightnessMinValue()
Gets the minimum allowed value for the Brightness operation.
static consteval float getBrightnessDefaultValue()
Gets the default value for the Brightness operation.
CaptureMoment — footer