Improve framing tool usability
* Rename "Resize" to "Resize & Framing" from discoverability * Add ColorPreview class for displaying a solid color * Add border color preview
This commit is contained in:
@@ -1069,7 +1069,9 @@ Imagefloat* ImProcFunctions::drawFrame(Imagefloat* rgb, const FramingParams& par
|
||||
|
||||
Imagefloat* framed = new Imagefloat(dims.framedWidth, dims.framedHeight);
|
||||
|
||||
auto clip = [](int v) { return std::max(0, std::min(v, 65535)); };
|
||||
// Color::gamma2curve expects a 16-bit value, but the GUI sliders are
|
||||
// using 8-bit values. Step up the user value to 16-bits.
|
||||
auto clip = [](int v) { return std::max(0, std::min(v, 255)) * 256; };
|
||||
|
||||
float r = Color::gamma2curve[clip(params.borderRed)];
|
||||
float g = Color::gamma2curve[clip(params.borderGreen)];
|
||||
|
||||
Reference in New Issue
Block a user