Java Code Examples for java.awt.image.Raster#getTransferType()

The following examples show how to use java.awt.image.Raster#getTransferType() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SignedColorModel.java    From scifio with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Override
public boolean isCompatibleRaster(final Raster raster) {
	if (pixelBits == 16) {
		return raster.getTransferType() == DataBuffer.TYPE_SHORT;
	}
	return helper.isCompatibleRaster(raster);
}
 
Example 2
Source File: UnsignedIntColorModel.java    From scifio with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
public boolean isCompatibleRaster(final Raster raster) {
	return raster.getNumBands() == getNumComponents() && raster
		.getTransferType() == getTransferType();
}