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

Method TestColorspace

processing/colorspace_test.go:76–176  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74}
75
76func (s *ColorspaceTestSuite) TestColorspace() {
77 testCases := []testCase[colorspaceTestCase]{
78 {
79 opts: colorspaceTestCase{
80 name: "8-bpp-png-srgb",
81 sourceFile: "test-images/png/8-bpp.png",
82 outFormat: imagetype.PNG,
83 },
84 outSize: colorspaceTestOutSize,
85 outInterpretation: vips.InterpretationSRGB,
86 },
87 {
88 opts: colorspaceTestCase{
89 name: "16-bpp-png-rgb16",
90 sourceFile: "test-images/png/16-bpp.png",
91 outFormat: imagetype.PNG,
92 },
93 outSize: colorspaceTestOutSize,
94 outInterpretation: vips.InterpretationRGB16,
95 },
96 {
97 opts: colorspaceTestCase{
98 name: "16-bpp-png-jpeg-srgb",
99 sourceFile: "test-images/png/16-bpp.png",
100 outFormat: imagetype.JPEG,
101 },
102 outSize: colorspaceTestOutSize,
103 outInterpretation: vips.InterpretationSRGB,
104 },
105 {
106 opts: colorspaceTestCase{
107 name: "8-bpp-tiff-srgb",
108 sourceFile: "test-images/tiff/8-bpp.tiff",
109 outFormat: imagetype.PNG,
110 },
111 outSize: colorspaceTestOutSize,
112 outInterpretation: vips.InterpretationSRGB,
113 },
114 {
115 opts: colorspaceTestCase{
116 name: "16-bpp-tiff-rgb16",
117 sourceFile: "test-images/tiff/16-bpp.tiff",
118 outFormat: imagetype.PNG,
119 },
120 outSize: colorspaceTestOutSize,
121 outInterpretation: vips.InterpretationRGB16,
122 },
123 {
124 opts: colorspaceTestCase{
125 name: "8-bpp-grayscale-png-bw",
126 sourceFile: "test-images/png/8-bpp-grayscale.png",
127 outFormat: imagetype.PNG,
128 },
129 outSize: colorspaceTestOutSize,
130 outInterpretation: vips.InterpretationBW,
131 },
132 {
133 opts: colorspaceTestCase{

Callers

nothing calls this directly

Calls 2

runTestCaseMethod · 0.95
RunMethod · 0.80

Tested by

no test coverage detected