public static boolean is_INT_PACK_Data(SampleModel sm, boolean requireAlpha) {
        // Check ColorModel is of type DirectColorModel
        if (!(sm instanceof SinglePixelPackedSampleModel))
            return false;

        // Check transfer type
        if (sm.getDataType() != DataBuffer.TYPE_INT)
            return false;

        SinglePixelPackedSampleModel sppsm;
        sppsm = (SinglePixelPackedSampleModel) sm;

        int[] masks = sppsm.getBitMasks();
        if (masks.length == 3) {
            if (requireAlpha)
                return false;
        } else if (masks.length != 4)
            return false;

        if (masks[0] != 0x00ff0000)
            return false;
        if (masks[1] != 0x0000ff00)
            return false;
        if (masks[2] != 0x000000ff)
            return false;
        return !((masks.length == 4) && (masks[3] != 0xff000000));

    }