8180877: More deeply colored ICC spaces

Reviewed-by: serb, rhalade, mschoene
This commit is contained in:
Phil Race 2017-06-29 11:53:19 -07:00
parent 03e33188f3
commit 933e26ad58
2 changed files with 18 additions and 1 deletions

View File

@ -127,6 +127,18 @@ public class ICC_ColorSpace extends ColorSpace {
setMinMax();
}
/**
* Validate an ICC_ColorSpace read from an object input stream
*/
private void readObject(java.io.ObjectInputStream s)
throws ClassNotFoundException, java.io.IOException {
s.defaultReadObject();
if (thisProfile == null) {
thisProfile = ICC_Profile.getInstance(ColorSpace.CS_sRGB);
}
}
/**
* Returns the ICC_Profile for this ICC_ColorSpace.
* @return the ICC_Profile for this ICC_ColorSpace.

View File

@ -644,7 +644,12 @@ JNIEXPORT jobject JNICALL Java_sun_java2d_cmm_lcms_LCMS_getProfileID
{
jclass clsLcmsProfile;
jobject cmmProfile;
jfieldID fid = (*env)->GetFieldID (env,
jfieldID fid;
if (pf == NULL) {
return NULL;
}
fid = (*env)->GetFieldID (env,
(*env)->GetObjectClass(env, pf),
"cmmProfile", "Lsun/java2d/cmm/Profile;");
if (fid == NULL) {