use of com.sun.media.imageioimpl.plugins.jpeg2000.ColorSpecificationBox in project bioformats by openmicroscopy.
the class FileFormatReader method readColourSpecificationBox.
/**
* Read the color specifications.
*/
public void readColourSpecificationBox(int length) throws IOException {
// read METHOD field
byte method = (byte) in.readByte();
// read PREC field
byte prec = (byte) in.readByte();
// read APPROX field
byte approx = (byte) in.readByte();
if (method == 2) {
byte[] data = new byte[length - 3];
in.readFully(data, 0, data.length);
profile = ICC_Profile.getInstance(data);
} else
// read EnumCS field
colorSpaceType = in.readInt();
if (metadata != null) {
metadata.addNode(new ColorSpecificationBox(method, prec, approx, colorSpaceType, profile));
}
}
use of com.sun.media.imageioimpl.plugins.jpeg2000.ColorSpecificationBox in project bioformats by ome.
the class FileFormatReader method readColourSpecificationBox.
/**
* Read the color specifications.
*/
public void readColourSpecificationBox(int length) throws IOException {
// read METHOD field
byte method = (byte) in.readByte();
// read PREC field
byte prec = (byte) in.readByte();
// read APPROX field
byte approx = (byte) in.readByte();
if (method == 2) {
byte[] data = new byte[length - 3];
in.readFully(data, 0, data.length);
profile = ICC_Profile.getInstance(data);
} else
// read EnumCS field
colorSpaceType = in.readInt();
if (metadata != null) {
metadata.addNode(new ColorSpecificationBox(method, prec, approx, colorSpaceType, profile));
}
}
Aggregations