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

Method TestDownscaleHDR

processing/colorspace_test.go:230–276  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

228}
229
230func (s *ColorspaceTestSuite) TestDownscaleHDR() {
231 testCases := []testCase[colorspaceTestCase]{
232 {
233 opts: colorspaceTestCase{
234 name: "16-bpp-png-srgb",
235 sourceFile: "test-images/png/16-bpp.png",
236 outFormat: imagetype.PNG,
237 },
238 outSize: colorspaceTestOutSize,
239 outInterpretation: vips.InterpretationSRGB,
240 },
241 {
242 opts: colorspaceTestCase{
243 name: "16-bpp-tiff-srgb",
244 sourceFile: "test-images/tiff/16-bpp.tiff",
245 outFormat: imagetype.PNG,
246 },
247 outSize: colorspaceTestOutSize,
248 outInterpretation: vips.InterpretationSRGB,
249 },
250 {
251 opts: colorspaceTestCase{
252 name: "16-bpp-grayscale-png-bw",
253 sourceFile: "test-images/png/16-bpp-grayscale.png",
254 outFormat: imagetype.PNG,
255 },
256 outSize: colorspaceTestOutSize,
257 outInterpretation: vips.InterpretationBW,
258 },
259 {
260 opts: colorspaceTestCase{
261 name: "16-bpp-grayscale-tiff-bw",
262 sourceFile: "test-images/tiff/16-bpp-grayscale.tiff",
263 outFormat: imagetype.PNG,
264 },
265 outSize: colorspaceTestOutSize,
266 outInterpretation: vips.InterpretationBW,
267 },
268 }
269
270 for _, tc := range testCases {
271 s.Run(tc.opts.name+"_no_preserve_hdr", func() {
272 s.Config().Processing.PreserveHDR = false
273 s.runTestCase(tc)
274 })
275 }
276}
277
278func (s *ColorspaceTestSuite) TestWatermarkColorspace() {
279 testCases := []testCase[colorspaceTestCase]{

Callers

nothing calls this directly

Calls 2

runTestCaseMethod · 0.95
RunMethod · 0.80

Tested by

no test coverage detected