Example usage for java.awt.color ICC_Profile icSigHead

List of usage examples for java.awt.color ICC_Profile icSigHead

Introduction

In this page you can find the example usage for java.awt.color ICC_Profile icSigHead.

Prototype

int icSigHead

To view the source code for java.awt.color ICC_Profile icSigHead.

Click Source Link

Document

ICC Profile Tag Signature: 'head' - special.

Usage

From source file:Main.java

/**
 * Used in ICC_Transform class to check the rendering intent of the profile
 * @param profile - ICC profile/*from   w  ww  .  j  av  a 2s. c om*/
 * @return rendering intent
 */
public static int getRenderingIntent(ICC_Profile profile) {
    return getIntFromByteArray(profile.getData(ICC_Profile.icSigHead), // pf header
            ICC_Profile.icHdrRenderingIntent);
}

From source file:org.sejda.sambox.pdmodel.graphics.color.PDICCBased.java

/**
 * Returns true if the given profile is represents sRGB.
 *///from  ww w  .jav a2  s .co  m
private boolean is_sRGB(ICC_Profile profile) {
    byte[] bytes = Arrays.copyOfRange(profile.getData(ICC_Profile.icSigHead), ICC_Profile.icHdrModel,
            ICC_Profile.icHdrModel + 7);
    String deviceModel = new String(bytes, StandardCharsets.US_ASCII).trim();
    return deviceModel.equals("sRGB");
}