1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
|
/*
* Copyright 2002-2012 Drew Noakes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* More information about this project is available at:
*
* http://drewnoakes.com/code/exif/
* http://code.google.com/p/metadata-extractor/
*/
package com.drew.metadata.icc;
import com.drew.lang.annotations.NotNull;
import com.drew.metadata.Directory;
import java.util.HashMap;
/** @author Yuri Binev, Drew Noakes http://drewnoakes.com */
public class IccDirectory extends Directory
{
// These (smaller valued) tags have an integer value that's equal to their offset within the ICC data buffer.
public static final int TAG_ICC_PROFILE_BYTE_COUNT = 0;
public static final int TAG_ICC_CMM_TYPE = 4;
public static final int TAG_ICC_PROFILE_VERSION = 8;
public static final int TAG_ICC_PROFILE_CLASS = 12;
public static final int TAG_ICC_COLOR_SPACE = 16;
public static final int TAG_ICC_PROFILE_CONNECTION_SPACE = 20;
public static final int TAG_ICC_PROFILE_DATETIME = 24;
public static final int TAG_ICC_SIGNATURE = 36;
public static final int TAG_ICC_PLATFORM = 40;
public static final int TAG_ICC_CMM_FLAGS = 44;
public static final int TAG_ICC_DEVICE_MAKE = 48;
public static final int TAG_ICC_DEVICE_MODEL = 52;
public static final int TAG_ICC_DEVICE_ATTR = 56;
public static final int TAG_ICC_RENDERING_INTENT = 64;
public static final int TAG_ICC_XYZ_VALUES = 68;
public static final int TAG_ICC_PROFILE_CREATOR = 80;
public static final int TAG_ICC_TAG_COUNT = 128;
// These tag values
public static final int TAG_ICC_TAG_A2B0 = 0x41324230;
public static final int TAG_ICC_TAG_A2B1 = 0x41324231;
public static final int TAG_ICC_TAG_A2B2 = 0x41324232;
public static final int TAG_ICC_TAG_bXYZ = 0x6258595A;
public static final int TAG_ICC_TAG_bTRC = 0x62545243;
public static final int TAG_ICC_TAG_B2A0 = 0x42324130;
public static final int TAG_ICC_TAG_B2A1 = 0x42324131;
public static final int TAG_ICC_TAG_B2A2 = 0x42324132;
public static final int TAG_ICC_TAG_calt = 0x63616C74;
public static final int TAG_ICC_TAG_targ = 0x74617267;
public static final int TAG_ICC_TAG_chad = 0x63686164;
public static final int TAG_ICC_TAG_chrm = 0x6368726D;
public static final int TAG_ICC_TAG_cprt = 0x63707274;
public static final int TAG_ICC_TAG_crdi = 0x63726469;
public static final int TAG_ICC_TAG_dmnd = 0x646D6E64;
public static final int TAG_ICC_TAG_dmdd = 0x646D6464;
public static final int TAG_ICC_TAG_devs = 0x64657673;
public static final int TAG_ICC_TAG_gamt = 0x67616D74;
public static final int TAG_ICC_TAG_kTRC = 0x6B545243;
public static final int TAG_ICC_TAG_gXYZ = 0x6758595A;
public static final int TAG_ICC_TAG_gTRC = 0x67545243;
public static final int TAG_ICC_TAG_lumi = 0x6C756D69;
public static final int TAG_ICC_TAG_meas = 0x6D656173;
public static final int TAG_ICC_TAG_bkpt = 0x626B7074;
public static final int TAG_ICC_TAG_wtpt = 0x77747074;
public static final int TAG_ICC_TAG_ncol = 0x6E636F6C;
public static final int TAG_ICC_TAG_ncl2 = 0x6E636C32;
public static final int TAG_ICC_TAG_resp = 0x72657370;
public static final int TAG_ICC_TAG_pre0 = 0x70726530;
public static final int TAG_ICC_TAG_pre1 = 0x70726531;
public static final int TAG_ICC_TAG_pre2 = 0x70726532;
public static final int TAG_ICC_TAG_desc = 0x64657363;
public static final int TAG_ICC_TAG_pseq = 0x70736571;
public static final int TAG_ICC_TAG_psd0 = 0x70736430;
public static final int TAG_ICC_TAG_psd1 = 0x70736431;
public static final int TAG_ICC_TAG_psd2 = 0x70736432;
public static final int TAG_ICC_TAG_psd3 = 0x70736433;
public static final int TAG_ICC_TAG_ps2s = 0x70733273;
public static final int TAG_ICC_TAG_ps2i = 0x70733269;
public static final int TAG_ICC_TAG_rXYZ = 0x7258595A;
public static final int TAG_ICC_TAG_rTRC = 0x72545243;
public static final int TAG_ICC_TAG_scrd = 0x73637264;
public static final int TAG_ICC_TAG_scrn = 0x7363726E;
public static final int TAG_ICC_TAG_tech = 0x74656368;
public static final int TAG_ICC_TAG_bfd = 0x62666420;
public static final int TAG_ICC_TAG_vued = 0x76756564;
public static final int TAG_ICC_TAG_view = 0x76696577;
public static final int TAG_ICC_APPLE_MULTI_LANGUAGE_PROFILE_NAME = 0x6473636d;
@NotNull
protected static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>();
static {
_tagNameMap.put(TAG_ICC_PROFILE_BYTE_COUNT, "Profile Size");
_tagNameMap.put(TAG_ICC_CMM_TYPE, "CMM Type");
_tagNameMap.put(TAG_ICC_PROFILE_VERSION, "Version");
_tagNameMap.put(TAG_ICC_PROFILE_CLASS, "Class");
_tagNameMap.put(TAG_ICC_COLOR_SPACE, "Color space");
_tagNameMap.put(TAG_ICC_PROFILE_CONNECTION_SPACE, "Profile Connection Space");
_tagNameMap.put(TAG_ICC_PROFILE_DATETIME, "Profile Date/Time");
_tagNameMap.put(TAG_ICC_SIGNATURE, "Signature");
_tagNameMap.put(TAG_ICC_PLATFORM, "Primary Platform");
_tagNameMap.put(TAG_ICC_CMM_FLAGS, "CMM Flags");
_tagNameMap.put(TAG_ICC_DEVICE_MAKE, "Device manufacturer");
_tagNameMap.put(TAG_ICC_DEVICE_MODEL, "Device model");
_tagNameMap.put(TAG_ICC_DEVICE_ATTR, "Device attributes");
_tagNameMap.put(TAG_ICC_RENDERING_INTENT, "Rendering Intent");
_tagNameMap.put(TAG_ICC_XYZ_VALUES, "XYZ values");
_tagNameMap.put(TAG_ICC_PROFILE_CREATOR, "Profile Creator");
_tagNameMap.put(TAG_ICC_TAG_COUNT, "Tag Count");
_tagNameMap.put(TAG_ICC_TAG_A2B0, "AToB 0");
_tagNameMap.put(TAG_ICC_TAG_A2B1, "AToB 1");
_tagNameMap.put(TAG_ICC_TAG_A2B2, "AToB 2");
_tagNameMap.put(TAG_ICC_TAG_bXYZ, "Blue Colorant");
_tagNameMap.put(TAG_ICC_TAG_bTRC, "Blue TRC");
_tagNameMap.put(TAG_ICC_TAG_B2A0, "BToA 0");
_tagNameMap.put(TAG_ICC_TAG_B2A1, "BToA 1");
_tagNameMap.put(TAG_ICC_TAG_B2A2, "BToA 2");
_tagNameMap.put(TAG_ICC_TAG_calt, "Calibration Date/Time");
_tagNameMap.put(TAG_ICC_TAG_targ, "Char Target");
_tagNameMap.put(TAG_ICC_TAG_chad, "Chromatic Adaptation");
_tagNameMap.put(TAG_ICC_TAG_chrm, "Chromaticity");
_tagNameMap.put(TAG_ICC_TAG_cprt, "Copyright");
_tagNameMap.put(TAG_ICC_TAG_crdi, "CrdInfo");
_tagNameMap.put(TAG_ICC_TAG_dmnd, "Device Mfg Description");
_tagNameMap.put(TAG_ICC_TAG_dmdd, "Device Model Description");
_tagNameMap.put(TAG_ICC_TAG_devs, "Device Settings");
_tagNameMap.put(TAG_ICC_TAG_gamt, "Gamut");
_tagNameMap.put(TAG_ICC_TAG_kTRC, "Gray TRC");
_tagNameMap.put(TAG_ICC_TAG_gXYZ, "Green Colorant");
_tagNameMap.put(TAG_ICC_TAG_gTRC, "Green TRC");
_tagNameMap.put(TAG_ICC_TAG_lumi, "Luminance");
_tagNameMap.put(TAG_ICC_TAG_meas, "Measurement");
_tagNameMap.put(TAG_ICC_TAG_bkpt, "Media Black Point");
_tagNameMap.put(TAG_ICC_TAG_wtpt, "Media White Point");
_tagNameMap.put(TAG_ICC_TAG_ncol, "Named Color");
_tagNameMap.put(TAG_ICC_TAG_ncl2, "Named Color 2");
_tagNameMap.put(TAG_ICC_TAG_resp, "Output Response");
_tagNameMap.put(TAG_ICC_TAG_pre0, "Preview 0");
_tagNameMap.put(TAG_ICC_TAG_pre1, "Preview 1");
_tagNameMap.put(TAG_ICC_TAG_pre2, "Preview 2");
_tagNameMap.put(TAG_ICC_TAG_desc, "Profile Description");
_tagNameMap.put(TAG_ICC_TAG_pseq, "Profile Sequence Description");
_tagNameMap.put(TAG_ICC_TAG_psd0, "Ps2 CRD 0");
_tagNameMap.put(TAG_ICC_TAG_psd1, "Ps2 CRD 1");
_tagNameMap.put(TAG_ICC_TAG_psd2, "Ps2 CRD 2");
_tagNameMap.put(TAG_ICC_TAG_psd3, "Ps2 CRD 3");
_tagNameMap.put(TAG_ICC_TAG_ps2s, "Ps2 CSA");
_tagNameMap.put(TAG_ICC_TAG_ps2i, "Ps2 Rendering Intent");
_tagNameMap.put(TAG_ICC_TAG_rXYZ, "Red Colorant");
_tagNameMap.put(TAG_ICC_TAG_rTRC, "Red TRC");
_tagNameMap.put(TAG_ICC_TAG_scrd, "Screening Desc");
_tagNameMap.put(TAG_ICC_TAG_scrn, "Screening");
_tagNameMap.put(TAG_ICC_TAG_tech, "Technology");
_tagNameMap.put(TAG_ICC_TAG_bfd, "Ucrbg");
_tagNameMap.put(TAG_ICC_TAG_vued, "Viewing Conditions Description");
_tagNameMap.put(TAG_ICC_TAG_view, "Viewing Conditions");
_tagNameMap.put(TAG_ICC_APPLE_MULTI_LANGUAGE_PROFILE_NAME, "Apple Multi-language Profile Name");
}
public IccDirectory()
{
this.setDescriptor(new IccDescriptor(this));
}
@NotNull
public String getName()
{
return "ICC Profile";
}
@NotNull
protected HashMap<Integer, String> getTagNameMap()
{
return _tagNameMap;
}
}
|