# HG changeset patch # User Sebastien Jodogne # Date 1787764308 -7200 # Node ID da89bfe91873e25133cf93dc71a3e09ab18d788a # Parent e388e2b15b2266d3153391698e61d8bdcc8c364f display values of brightness/contrast/saturation diff -r e388e2b15b22 -r da89bfe91873 ViewerPlugin/WebApplication/viewer.html --- a/ViewerPlugin/WebApplication/viewer.html Wed Aug 26 19:05:57 2026 +0200 +++ b/ViewerPlugin/WebApplication/viewer.html Wed Aug 26 19:11:48 2026 +0200 @@ -538,18 +538,18 @@
- - Brightness: {{brightness}} +
- - Contrast: {{contrast}} +
- - Saturation: {{saturation}} +
diff -r e388e2b15b22 -r da89bfe91873 ViewerPlugin/WebApplication/viewer.js --- a/ViewerPlugin/WebApplication/viewer.js Wed Aug 26 19:05:57 2026 +0200 +++ b/ViewerPlugin/WebApplication/viewer.js Wed Aug 26 19:11:48 2026 +0200 @@ -32,9 +32,9 @@ level: '', resourceId: '', frameNumber: 0, - brightness: 0, // In the range between [-1,1] - contrast: 0, // In the range between [-1,1] - saturation: 0, // In the range between [-1,1] + brightness: 0, // In the range between [-100,100] + contrast: 0, // In the range between [-100,100] + saturation: 0, // In the range between [-100,100] // hue: 0, // Degrees, in the range between [-180,180] // Main state for annotations @@ -746,9 +746,9 @@ if (context) { context.save(); - var brightness = Math.pow(4, that.brightness); // Ranges between 0.25 and 4 - var contrast = Math.pow(4, that.contrast); // Ranges between 0.25 and 4 - var saturation = Math.pow(4, that.saturation); // Ranges between 0.25 and 4 + var brightness = Math.pow(4, that.brightness / 100.0); // Ranges between 0.25 and 4 + var contrast = Math.pow(4, that.contrast / 100.0); // Ranges between 0.25 and 4 + var saturation = Math.pow(4, that.saturation / 100.0); // Ranges between 0.25 and 4 context.filter = 'brightness(' + brightness.toFixed(4) + ') ' + 'contrast(' + contrast.toFixed(4) + ')' +