@Override
    public int getNumComponents() {
        switch (colorspace) {
            case ColorSpace.CS_sRGB:
            case ColorSpace.CS_CIEXYZ:
            case ColorSpace.CS_LINEAR_RGB:
            case ColorSpace.CS_PYCC:
                return 3;
            case ColorSpace.CS_GRAY:
                return 1;
            default:
                throw new UnsupportedOperationException("Stub cannot perform this operation"); //$NON-NLS-1$
        }
    }