List of usage examples for java.awt.image DirectColorModel getNumComponents
public int getNumComponents()
From source file:BlendCompositeDemo.java
private static boolean checkComponentsOrder(ColorModel cm) { if (cm instanceof DirectColorModel && cm.getTransferType() == DataBuffer.TYPE_INT) { DirectColorModel directCM = (DirectColorModel) cm; return directCM.getRedMask() == 0x00FF0000 && directCM.getGreenMask() == 0x0000FF00 && directCM.getBlueMask() == 0x000000FF && (directCM.getNumComponents() != 4 || directCM.getAlphaMask() == 0xFF000000); }//from w w w. java2 s . com return false; }