mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-04 03:55:28 -04:00
#474: Fix java.awt.color.CMMException: Can not access specified profile
This commit is contained in:
parent
7985cdd4a7
commit
64178bd636
@ -218,10 +218,14 @@ public final class ColorSpaces {
|
||||
}
|
||||
}
|
||||
|
||||
private static void validateColorSpace(ICC_ColorSpace cs) {
|
||||
// Validate the color space, to avoid caching bad color spaces
|
||||
private static void validateColorSpace(final ICC_ColorSpace cs) {
|
||||
// Validate the color space, to avoid caching bad profiles/color spaces
|
||||
// Will throw IllegalArgumentException or CMMException if the profile is bad
|
||||
cs.fromRGB(new float[] {1f, 0f, 0f});
|
||||
cs.fromRGB(new float[] {0.999f, 0.5f, 0.001f});
|
||||
|
||||
// This breaks *some times* after validation of bad profiles,
|
||||
// we'll let it blow up early in this case
|
||||
cs.getProfile().getData();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user