< prev index next >
test/javax/imageio/plugins/tiff/TIFFDirectoryWriteReadTest.java
Print this page
@@ -205,11 +205,12 @@
for (int b: bps) { check(b == 8, "invalid bits per sample"); }
// RGB: PhotometricInterpretation = 2
f = dir.getTIFFField(BaselineTIFFTagSet.TAG_PHOTOMETRIC_INTERPRETATION);
check(f.getCount() == 1, "invalid count");
- check(f.getAsInt(0) == 2, "invalid photometric interpretation for RGB");
+ check(f.getAsInt(0) == BaselineTIFFTagSet.PHOTOMETRIC_INTERPRETATION_RGB,
+ "invalid photometric interpretation value");
String rat = " resolution must be rational";
f = dir.getTIFFField(BaselineTIFFTagSet.TAG_X_RESOLUTION);
check(f.getType() == TIFFTag.TIFF_RATIONAL, "x" + rat);
check(f.getCount() == 1 &&
< prev index next >