Example usage for javax.imageio.spi IIOServiceProvider getDescription

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

Introduction

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

Prototype

public abstract String getDescription(Locale locale);

Source Link

Document

Returns a brief, human-readable description 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//w ww.  ja  va  2 s. c o  m
 *            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());
}