Example usage for java.awt.color ICC_Profile icHdrModel

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

Introduction

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

Prototype

int icHdrModel

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

Click Source Link

Document

ICC Profile Header Location: device model number.

Usage

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

/**
 * Returns true if the given profile is represents sRGB.
 */// w w w  .  j av  a2  s  . c o  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");
}