mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 21:04:37 +03:00
Upgrade to go 1.19 and update dependencies (#3069)
* Update to go 1.19 * Update dependencies * Update cross-compile script * Add missing targets to cross-compile-all * Update cache action to remove warning
This commit is contained in:
7
vendor/github.com/disintegration/imaging/adjust.go
generated
vendored
7
vendor/github.com/disintegration/imaging/adjust.go
generated
vendored
@@ -91,11 +91,12 @@ func AdjustContrast(img image.Image, percentage float64) *image.NRGBA {
|
||||
|
||||
v := (100.0 + percentage) / 100.0
|
||||
for i := 0; i < 256; i++ {
|
||||
if 0 <= v && v <= 1 {
|
||||
switch {
|
||||
case 0 <= v && v <= 1:
|
||||
lut[i] = clamp((0.5 + (float64(i)/255.0-0.5)*v) * 255.0)
|
||||
} else if 1 < v && v < 2 {
|
||||
case 1 < v && v < 2:
|
||||
lut[i] = clamp((0.5 + (float64(i)/255.0-0.5)*(1/(2.0-v))) * 255.0)
|
||||
} else {
|
||||
default:
|
||||
lut[i] = uint8(float64(i)/255.0+0.5) * 255
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user