Example usage for javax.imageio.spi IIOServiceProvider getVersion

List of usage examples for javax.imageio.spi IIOServiceProvider getVersion

Introduction

In this page you can find the example usage for javax.imageio.spi IIOServiceProvider getVersion.

Prototype

public String getVersion() 

Source Link

Document

Returns a string describing the version number of this service provider and its associated implementation.

Usage

From source file:org.apache.xmlgraphics.image.loader.impl.imageio.ImageLoaderImageIO.java

/**
 * Checks if the provider ignores the ICC color profile. This method will
 * assume providers work correctly, and return false if the provider is
 * unknown. This ensures backward-compatibility.
 *
 * @param provider/*from  ww  w . j a  v  a  2 s  . c om*/
 *            the ImageIO Provider
 * @return true if we know the provider to be broken and ignore ICC
 *         profiles.
 */
private boolean checkProviderIgnoresICC(IIOServiceProvider provider) {
    // TODO: This information could be cached.
    StringBuffer b = new StringBuffer(provider.getDescription(Locale.ENGLISH));
    b.append('/').append(provider.getVendorName());
    b.append('/').append(provider.getVersion());
    if (log.isDebugEnabled()) {
        log.debug("Image Provider: " + b.toString());
    }
    return ImageLoaderImageIO.providersIgnoringICC.contains(b.toString());
}