    001/*
    002 * Licensed to the Apache Software Foundation (ASF) under one or more
    003 * contributor license agreements.  See the NOTICE file distributed with
    004 * this work for additional information regarding copyright ownership.
    005 * The ASF licenses this file to You under the Apache License, Version 2.0
    006 * (the "License"); you may not use this file except in compliance with
    007 * the License.  You may obtain a copy of the License at
    008 *
    009 *      http://www.apache.org/licenses/LICENSE-2.0
    010 *
    011 * Unless required by applicable law or agreed to in writing, software
    012 * distributed under the License is distributed on an "AS IS" BASIS,
    013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    014 * See the License for the specific language governing permissions and
    015 * limitations under the License.
    016 */
    017package org.apache.commons.imaging.formats.tiff.constants;
    018
    019import java.util.Arrays;
    020import java.util.Collections;
    021import java.util.List;
    022
    023import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo;
    024import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoAscii;
    025import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoAsciiOrRational;
    026import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoBytes;
    027import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoLong;
    028import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoRational;
    029import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoRationals;
    030import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoSShorts;
    031import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoShort;
    032import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoShorts;
    033import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoUndefineds;
    034
    035/**
    036 */
    037public final class TiffEpTagConstants {
    038
    039    public static final TagInfoShorts EXIF_TAG_CFAREPEAT_PATTERN_DIM = new TagInfoShorts("CFARepeatPatternDim", 0x828d, 2,
    040            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
    041
    042    public static final TagInfoBytes EXIF_TAG_CFAPATTERN_2 = new TagInfoBytes("CFAPattern2", 0x828e, -1, TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
    043
    044    public static final TagInfoAsciiOrRational EXIF_TAG_BATTERY_LEVEL = new TagInfoAsciiOrRational("BatteryLevel", 0x828f, -1,
    045            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    046
    047    public static final TagInfoUndefineds EXIF_TAG_INTER_COLOR_PROFILE = new TagInfoUndefineds("InterColorProfile", 0x8773, -1,
    048            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
    049
    050    public static final TagInfoShort EXIF_TAG_INTERLACE = new TagInfoShort("Interlace", 0x8829, TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
    051
    052    public static final TagInfoSShorts EXIF_TAG_TIME_ZONE_OFFSET = new TagInfoSShorts("TimeZoneOffset", 0x882a, -1, TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
    053
    054    public static final TagInfoShort EXIF_TAG_SELF_TIMER_MODE = new TagInfoShort("SelfTimerMode", 0x882b, TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
    055
    056    public static final TagInfoRationals EXIF_TAG_FLASH_ENERGY = new TagInfoRationals("FlashEnergy", 0x920b, -1, TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
    057
    058    public static final TagInfoUndefineds EXIF_TAG_SPATIAL_FREQUENCY_RESPONSE_1 = new TagInfoUndefineds("SpatialFrequencyResponse", 0x920c, -1,
    059            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
    060
    061    public static final TagInfoUndefineds EXIF_TAG_NOISE_1 = new TagInfoUndefineds("Noise", 0x920d, -1, TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
    062
    063    public static final TagInfoRational EXIF_TAG_FOCAL_PLANE_XRESOLUTION = new TagInfoRational("FocalPlaneXResolution", 0x920e,
    064            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
    065
    066    public static final TagInfoRational EXIF_TAG_FOCAL_PLANE_YRESOLUTION = new TagInfoRational("FocalPlaneYResolution", 0x920f,
    067            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
    068
    069    public static final TagInfoShort EXIF_TAG_FOCAL_PLANE_RESOLUTION_UNIT = new TagInfoShort("FocalPlaneResolutionUnit", 0x9210,
    070            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
    071    public static final int FOCAL_PLANE_RESOLUTION_UNIT_VALUE_NONE = 1;
    072    public static final int FOCAL_PLANE_RESOLUTION_UNIT_VALUE_INCHES = 2;
    073    public static final int FOCAL_PLANE_RESOLUTION_UNIT_VALUE_CM = 3;
    074    public static final int FOCAL_PLANE_RESOLUTION_UNIT_VALUE_MM = 4;
    075    public static final int FOCAL_PLANE_RESOLUTION_UNIT_VALUE_UM = 5;
    076
    077    public static final TagInfoLong EXIF_TAG_IMAGE_NUMBER_EXIF_IFD = new TagInfoLong("ImageNumber", 0x9211, TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
    078
    079    public static final TagInfoAscii EXIF_TAG_SECURITY_CLASSIFICATION_EXIF_IFD = new TagInfoAscii("SecurityClassification", 0x9212, -1,
    080            TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
    081
    082    public static final TagInfoAscii EXIF_TAG_IMAGE_HISTORY_EXIF_IFD = new TagInfoAscii("ImageHistory", 0x9213, -1, TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
    083
    084    public static final TagInfoRationals EXIF_TAG_EXPOSURE_INDEX = new TagInfoRationals("ExposureIndex", 0x9215, -1, TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
    085
    086    public static final TagInfoBytes EXIF_TAG_TIFF_EPSTANDARD_ID_1 = new TagInfoBytes("TIFF/EPStandardID", 0x9216, 4, TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
    087
    088    public static final TagInfoShort EXIF_TAG_SENSING_METHOD = new TagInfoShort("SensingMethod", 0x9217, TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
    089    public static final int SENSING_METHOD_VALUE_MONOCHROME_AREA = 1;
    090    public static final int SENSING_METHOD_VALUE_ONE_CHIP_COLOR_AREA = 2;
    091    public static final int SENSING_METHOD_VALUE_TWO_CHIP_COLOR_AREA = 3;
    092    public static final int SENSING_METHOD_VALUE_THREE_CHIP_COLOR_AREA = 4;
    093    public static final int SENSING_METHOD_VALUE_COLOR_SEQUENTIAL_AREA = 5;
    094    public static final int SENSING_METHOD_VALUE_MONOCHROME_LINEAR = 6;
    095    public static final int SENSING_METHOD_VALUE_TRILINEAR = 7;
    096    public static final int SENSING_METHOD_VALUE_COLOR_SEQUENTIAL_LINEAR = 8;
    097
    098    public static final List<TagInfo> ALL_TIFF_EP_TAGS = Collections.unmodifiableList(Arrays.asList(EXIF_TAG_CFAREPEAT_PATTERN_DIM, EXIF_TAG_CFAPATTERN_2,
    099            EXIF_TAG_BATTERY_LEVEL, EXIF_TAG_INTER_COLOR_PROFILE, EXIF_TAG_INTERLACE, EXIF_TAG_TIME_ZONE_OFFSET, EXIF_TAG_SELF_TIMER_MODE,
    100            EXIF_TAG_FLASH_ENERGY, EXIF_TAG_SPATIAL_FREQUENCY_RESPONSE_1, EXIF_TAG_NOISE_1, EXIF_TAG_FOCAL_PLANE_XRESOLUTION, EXIF_TAG_FOCAL_PLANE_YRESOLUTION,
    101            EXIF_TAG_FOCAL_PLANE_RESOLUTION_UNIT, EXIF_TAG_IMAGE_NUMBER_EXIF_IFD, EXIF_TAG_SECURITY_CLASSIFICATION_EXIF_IFD, EXIF_TAG_IMAGE_HISTORY_EXIF_IFD,
    102            EXIF_TAG_EXPOSURE_INDEX, EXIF_TAG_TIFF_EPSTANDARD_ID_1, EXIF_TAG_SENSING_METHOD));
    103
    104    private TiffEpTagConstants() {
    105    }
    106}