privatestaticvoid test(ICC_Profile profile) { // Gray profile should be implemented as ICC_ProfileGray and includes // the mediaWhitePointTag and grayTRCTag tags if (!(profile instanceof ICC_ProfileGray)
|| profile.getData(ICC_Profile.icSigMediaWhitePointTag) == null
|| profile.getData(ICC_Profile.icSigGrayTRCTag) == null) { thrownew RuntimeException("Wrong profile: " + profile);
}
ICC_ProfileGray gray = (ICC_ProfileGray) profile;
int length = gray.getMediaWhitePoint().length; if (length != 3) { thrownew RuntimeException("Wrong data length: " + length);
}
// if getTRC() throws an exception then getGamma() should work boolean trc = false; try {
gray.getTRC();
trc = true;
System.out.println("getTRC() works fine");
} catch (ProfileDataException ignore) {
gray.getGamma();
} // if getGamma() throws an exception then getTRC() should work boolean gamma = false; try {
gray.getGamma();
gamma = true;
System.out.println("getGamma() works fine");
} catch (ProfileDataException ignore) {
gray.getTRC();
}
if (gamma == trc) { // only one should work thrownew RuntimeException("Only one operation should work");
}
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.