MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / TestColor

Method TestColor

processing/trim_test.go:113–148  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

111}
112
113func (s *TrimTestSuite) TestColor() {
114 testCases := []testCase[trimTestCase]{
115 {
116 opts: trimTestCase{threshold: 1},
117 outSize: testSize{200, 170},
118 },
119 {
120 opts: trimTestCase{
121 threshold: 1,
122 color: &color.Red,
123 },
124 outSize: testSize{200, 170},
125 },
126 {
127 opts: trimTestCase{
128 threshold: 1,
129 color: &color.Blue,
130 },
131 outSize: testSize{200, 130},
132 },
133 {
134 opts: trimTestCase{
135 threshold: 1,
136 color: &color.White,
137 },
138 outSize: testSize{200, 200},
139 },
140 }
141
142 for _, tc := range testCases {
143 s.Run(tc.opts.String(), func() {
144 tc.opts.sourceFile = "trim2.png"
145 s.processImageAndCheck(tc)
146 })
147 }
148}
149
150func (s *TrimTestSuite) TestAlpha() {
151 testCases := []testCase[trimTestCase]{

Callers

nothing calls this directly

Calls 3

RunMethod · 0.80
processImageAndCheckMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected