Skip to content

Commit 9a57502

Browse files
committed
chore: make lint happy
1 parent 54d2c54 commit 9a57502

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

effects.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func (dc *Context) AdjustContrast(s float64) {
2323
dc.im = (*image.RGBA)(imaging.AdjustContrast(dc.im, s))
2424
}
2525

26-
// AdjustContrast 调整饱和度 范围:±100%
26+
// AdjustSaturation 调整饱和度 范围:±100%
2727
func (dc *Context) AdjustSaturation(s float64) {
2828
if math.Abs(s) < 0.001 {
2929
return

effects_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ func TestBrightness(t *testing.T) {
1616
if err := saveImage(dc, "TestBrightness-50"); err != nil {
1717
t.Fatal(err)
1818
}
19-
checkHash(t, dc, "<gg.Context 30e0b039be47de836a9fb4c8b9825ce8>")
19+
checkHash(t, dc, "<gg.Context e495391cc1349c0db98431a3f4ef21d8>")
2020
dc.AdjustBrightness(70) // 70-50=20
2121
if err := saveImage(dc, "TestBrightness+20"); err != nil {
2222
t.Fatal(err)
2323
}
24-
checkHash(t, dc, "<gg.Context d8aaf7a3d0aeb11dce3adc72ae9fb464>")
24+
checkHash(t, dc, "<gg.Context 2a1b5df094e1ffb6b8de120d922400bf>")
2525
}
2626

2727
func TestContrast(t *testing.T) {
@@ -34,10 +34,10 @@ func TestContrast(t *testing.T) {
3434
if err := saveImage(dc, "TestContrast-50"); err != nil {
3535
t.Fatal(err)
3636
}
37-
checkHash(t, dc, "<gg.Context e6f161e094f0d95603aad891c51c0b6b>")
37+
checkHash(t, dc, "<gg.Context 71bfdcec14fa18485e85c80b7a7c3fa3>")
3838
dc.AdjustContrast(100)
3939
if err := saveImage(dc, "TestContrast+100"); err != nil {
4040
t.Fatal(err)
4141
}
42-
checkHash(t, dc, "<gg.Context e1608d9268930ac4f80bd5cb82af927a>")
42+
checkHash(t, dc, "<gg.Context 4854d92c7e15539580349c6876f39070>")
4343
}

image.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ func GetImageWxH(path string) (int, int, error) {
6161
return sz.Width, sz.Height, err
6262
}
6363

64-
// LimitImageBounds returns resized image that newW < w and newH < h, while keeping the W/H ratio.
64+
// ImageBoundsBelow returns resized image that newW < w and newH < h, while keeping the W/H ratio.
6565
//
66-
// LimitImageBounds 返回在保持宽高比的条件下,小于 w x h 的新 bound。
66+
// ImageBoundsBelow 返回在保持宽高比的条件下,小于 w x h 的新 bound。
6767
func ImageBoundsBelow(b image.Rectangle, w, h int) image.Rectangle {
6868
width := b.Dx()
6969
height := b.Dy()

0 commit comments

Comments
 (0)