mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2026-05-27 00:00:02 -04:00
TMI-34: Handling of problematic Corbis RGB ICC profiles.
This commit is contained in:
+12
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user