Example usage for com.itextpdf.text Image getICCProfile

List of usage examples for com.itextpdf.text Image getICCProfile

Introduction

In this page you can find the example usage for com.itextpdf.text Image getICCProfile.

Prototype

public ICC_Profile getICCProfile() 

Source Link

Document

Gets the images ICC profile.

Usage

From source file:pdfcreator.PDFCreator.java

License:Open Source License

protected ICC_Profile getImageColorProfile(String filename) {
    try {//www.j ava  2 s .co  m
        Image img = Image.getInstance(filename);
        ICC_Profile icc = img.getICCProfile();
        return icc;
    } catch (BadElementException ex) {
        Logger.getLogger(PDFCreator.class.getName()).log(Level.SEVERE, null, ex);
    } catch (MalformedURLException ex) {
        Logger.getLogger(PDFCreator.class.getName()).log(Level.SEVERE, null, ex);
    } catch (IOException ex) {
        Logger.getLogger(PDFCreator.class.getName()).log(Level.SEVERE, null, ex);
    }

    return null;
}