private GLImageFormat getGlFormat(Image.Format format) {
        EnumSet<Caps> caps = EnumSet.allOf(Caps.class);
        GLImageFormat[][] formats = GLImageFormats.getFormatsForCaps(caps);
        return formats[0][format.ordinal()];
    }
get the glformat from JME image Format
@param format
@return
jme3-core/src/plugins/java/com/jme3/texture/plugins/ktx/KTXWriter.java