Code example for ImageTypeSpecifier

Methods: getSampleModel

0
 
        registered = true;
    } 
 
    public boolean canEncodeImage(ImageTypeSpecifier type) {
        int dataType = type.getSampleModel().getDataType();
        if ((dataType < DataBuffer.TYPE_BYTE) ||
            (dataType > DataBuffer.TYPE_INT))
            return false; 
 
	int numBands = type.getSampleModel().getNumBands();
	if (numBands != 1 && numBands != 3)
	    return false; 
 
        return true; 
    } 
 
    public ImageWriter createWriterInstance(Object extension)
        throws IIOException {
        return new PNMImageWriter(this);
Contextual code suggestions in your IDE  Get Codota for Java