TMI-34: Handling of problematic Corbis RGB ICC profiles.

This commit is contained in:
Harald Kuhr
2014-02-06 22:45:35 +01:00
parent 14e12eb2c1
commit db259bff10
7 changed files with 71 additions and 2 deletions
@@ -33,6 +33,7 @@ import org.junit.Test;
import java.awt.color.ColorSpace;
import java.awt.color.ICC_ColorSpace;
import java.awt.color.ICC_Profile;
import java.io.IOException;
import static org.junit.Assert.*;
@@ -184,4 +185,15 @@ public class ColorSpacesTest {
public void testIsCS_sRGBNull() {
ColorSpaces.isCS_sRGB(null);
}
@Test
public void testCorbisRGBSpecialHandling() throws IOException {
ICC_Profile corbisRGB = ICC_Profile.getInstance(getClass().getResourceAsStream("/profiles/Corbis RGB.icc"));
ICC_Profile corbisRGBFixed = ICC_Profile.getInstance(getClass().getResourceAsStream("/profiles/Corbis RGB_fixed.icc"));
ICC_ColorSpace colorSpace = ColorSpaces.createColorSpace(corbisRGB);
assertNotNull(colorSpace);
assertArrayEquals(colorSpace.getProfile().getData(), corbisRGBFixed.getData());
}
}