()
| 25 | } |
| 26 | |
| 27 | private void testICC() throws IOException { |
| 28 | ColorSpace cs1 = ColorSpace.makeFromICCProfile(new byte[0]); |
| 29 | assertNull(cs1); |
| 30 | |
| 31 | ColorSpace cs2 = ColorSpace.makeFromICCProfile(new byte[] { 1, 2, 3, 4, 5 }); |
| 32 | assertNull(cs2); |
| 33 | |
| 34 | for (String path: new String[] { "color_spaces/sRGB Profile.icc", "color_spaces/Display P3.icc" }) { |
| 35 | byte[] data = Files.readAllBytes(Path.of(path)); |
| 36 | try (ColorSpace cs = ColorSpace.makeFromICCProfile(data);) { |
| 37 | assertNotNull(cs); |
| 38 | assertEquals(true, cs.isGammaCloseToSRGB()); |
| 39 | } |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | private void testExtendedApi() throws IOException { |
| 44 | ColorSpace srgb = ColorSpace.getSRGB(); |
no test coverage detected