()
| 176 | } |
| 177 | |
| 178 | func (s *ColorspaceTestSuite) TestLinearColorspace() { |
| 179 | testCases := []testCase[colorspaceTestCase]{ |
| 180 | { |
| 181 | opts: colorspaceTestCase{ |
| 182 | name: "16-bpp-linear-png-rgb16", |
| 183 | sourceFile: "test-images/png/16-bpp-linear.png", |
| 184 | outFormat: imagetype.PNG, |
| 185 | }, |
| 186 | outSize: colorspaceTestOutSize, |
| 187 | outInterpretation: vips.InterpretationRGB16, |
| 188 | }, |
| 189 | { |
| 190 | opts: colorspaceTestCase{ |
| 191 | name: "32-bpp-linear-tiff-rgb16", |
| 192 | sourceFile: "test-images/tiff/32-bpp-linear.tiff", |
| 193 | outFormat: imagetype.PNG, |
| 194 | }, |
| 195 | outSize: colorspaceTestOutSize, |
| 196 | outInterpretation: vips.InterpretationRGB16, |
| 197 | }, |
| 198 | { |
| 199 | opts: colorspaceTestCase{ |
| 200 | name: "16-bpp-linear-png-jpeg-srgb", |
| 201 | sourceFile: "test-images/png/16-bpp-linear.png", |
| 202 | outFormat: imagetype.JPEG, |
| 203 | }, |
| 204 | outSize: colorspaceTestOutSize, |
| 205 | outInterpretation: vips.InterpretationSRGB, |
| 206 | }, |
| 207 | { |
| 208 | opts: colorspaceTestCase{ |
| 209 | name: "8-bpp-png-jpeg-srgb", |
| 210 | sourceFile: "test-images/png/8-bpp.png", |
| 211 | outFormat: imagetype.JPEG, |
| 212 | }, |
| 213 | outSize: colorspaceTestOutSize, |
| 214 | outInterpretation: vips.InterpretationSRGB, |
| 215 | }, |
| 216 | } |
| 217 | |
| 218 | for _, tc := range testCases { |
| 219 | s.Run(tc.opts.name+"_linear", func() { |
| 220 | s.ImageMatcher, _ = testutil.NewLazySuiteObj(s, func() (*testutil.ImageHashCacheMatcher, error) { |
| 221 | return testutil.NewImageHashCacheMatcher(s.TestData, testutil.HashTypeDct), nil |
| 222 | }) |
| 223 | s.Config().Processing.PreserveHDR = true |
| 224 | s.Config().Processing.UseLinearColorspace = true |
| 225 | s.runTestCase(tc) |
| 226 | }) |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | func (s *ColorspaceTestSuite) TestDownscaleHDR() { |
| 231 | testCases := []testCase[colorspaceTestCase]{ |
nothing calls this directly
no test coverage detected