Example usage for javax.imageio.spi IIOServiceProvider getVendorName

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

Introduction

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

Prototype

public String getVendorName() 

Source Link

Document

Returns the name of the vendor responsible for creating 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   w w w .ja  va 2  s.co 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());
}