public GLImageFormat getImageFormatWithError(Format fmt, boolean isSrgb) {
        //if the passed format is one kind of depth there is no point in getting the srgb format;
        isSrgb = isSrgb && !fmt.isDepthFormat();
        GLImageFormat glFmt = getImageFormat(fmt, isSrgb);
        if (glFmt == null && isSrgb) {
            glFmt = getImageFormat(fmt, false);               
            logger.log(Level.WARNING, "No sRGB format available for ''{0}''. Falling back to linear.", fmt);
        }
        if (glFmt == null) { 
            throw new RendererException("Image format '" + fmt + "' is unsupported by the video hardware.");
        }
        return glFmt;
    }
Internal utility class used by {@link GLRenderer} to manage textures.

@author Kirill Vainer
jme3-core/src/main/java/com/jme3/renderer/opengl/TextureUtil.java