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 * 037 */ 038public final class TiffEpTagConstants { 039 040 public static final TagInfoShorts EXIF_TAG_CFAREPEAT_PATTERN_DIM = new TagInfoShorts( 041 "CFARepeatPatternDim", 0x828d, 2, 042 TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN); 043 044 public static final TagInfoBytes EXIF_TAG_CFAPATTERN_2 = new TagInfoBytes( 045 "CFAPattern2", 0x828e, -1, 046 TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN); 047 048 public static final TagInfoAsciiOrRational EXIF_TAG_BATTERY_LEVEL = new TagInfoAsciiOrRational( 049 "BatteryLevel", 0x828f, -1, 050 TiffDirectoryType.TIFF_DIRECTORY_ROOT); 051 052 public static final TagInfoUndefineds EXIF_TAG_INTER_COLOR_PROFILE = new TagInfoUndefineds( 053 "InterColorProfile", 0x8773, -1, 054 TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN); 055 056 public static final TagInfoShort EXIF_TAG_INTERLACE = new TagInfoShort( 057 "Interlace", 0x8829, 058 TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN); 059 060 public static final TagInfoSShorts EXIF_TAG_TIME_ZONE_OFFSET = new TagInfoSShorts( 061 "TimeZoneOffset", 0x882a, -1, 062 TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD); 063 064 public static final TagInfoShort EXIF_TAG_SELF_TIMER_MODE = new TagInfoShort( 065 "SelfTimerMode", 0x882b, 066 TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD); 067 068 public static final TagInfoRationals EXIF_TAG_FLASH_ENERGY = new TagInfoRationals( 069 "FlashEnergy", 0x920b, -1, 070 TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN); 071 072 public static final TagInfoUndefineds EXIF_TAG_SPATIAL_FREQUENCY_RESPONSE_1 = new TagInfoUndefineds( 073 "SpatialFrequencyResponse", 0x920c, -1, 074 TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN); 075 076 public static final TagInfoUndefineds EXIF_TAG_NOISE_1 = new TagInfoUndefineds( 077 "Noise", 0x920d, -1, 078 TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN); 079 080 public static final TagInfoRational EXIF_TAG_FOCAL_PLANE_XRESOLUTION = new TagInfoRational( 081 "FocalPlaneXResolution", 0x920e, 082 TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN); 083 084 public static final TagInfoRational EXIF_TAG_FOCAL_PLANE_YRESOLUTION = new TagInfoRational( 085 "FocalPlaneYResolution", 0x920f, 086 TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN); 087 088 public static final TagInfoShort EXIF_TAG_FOCAL_PLANE_RESOLUTION_UNIT = new TagInfoShort( 089 "FocalPlaneResolutionUnit", 0x9210, 090 TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN); 091 public static final int FOCAL_PLANE_RESOLUTION_UNIT_VALUE_NONE = 1; 092 public static final int FOCAL_PLANE_RESOLUTION_UNIT_VALUE_INCHES = 2; 093 public static final int FOCAL_PLANE_RESOLUTION_UNIT_VALUE_CM = 3; 094 public static final int FOCAL_PLANE_RESOLUTION_UNIT_VALUE_MM = 4; 095 public static final int FOCAL_PLANE_RESOLUTION_UNIT_VALUE_UM = 5; 096 097 public static final TagInfoLong EXIF_TAG_IMAGE_NUMBER_EXIF_IFD = new TagInfoLong( 098 "ImageNumber", 0x9211, 099 TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD); 100 101 public static final TagInfoAscii EXIF_TAG_SECURITY_CLASSIFICATION_EXIF_IFD = new TagInfoAscii( 102 "SecurityClassification", 0x9212, -1, 103 TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD); 104 105 public static final TagInfoAscii EXIF_TAG_IMAGE_HISTORY_EXIF_IFD = new TagInfoAscii( 106 "ImageHistory", 0x9213, -1, 107 TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD); 108 109 public static final TagInfoRationals EXIF_TAG_EXPOSURE_INDEX = new TagInfoRationals( 110 "ExposureIndex", 0x9215, -1, 111 TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN); 112 113 public static final TagInfoBytes EXIF_TAG_TIFF_EPSTANDARD_ID_1 = new TagInfoBytes( 114 "TIFF/EPStandardID", 0x9216, 4, 115 TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN); 116 117 public static final TagInfoShort EXIF_TAG_SENSING_METHOD = new TagInfoShort( 118 "SensingMethod", 0x9217, 119 TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN); 120 public static final int SENSING_METHOD_VALUE_MONOCHROME_AREA = 1; 121 public static final int SENSING_METHOD_VALUE_ONE_CHIP_COLOR_AREA = 2; 122 public static final int SENSING_METHOD_VALUE_TWO_CHIP_COLOR_AREA = 3; 123 public static final int SENSING_METHOD_VALUE_THREE_CHIP_COLOR_AREA = 4; 124 public static final int SENSING_METHOD_VALUE_COLOR_SEQUENTIAL_AREA = 5; 125 public static final int SENSING_METHOD_VALUE_MONOCHROME_LINEAR = 6; 126 public static final int SENSING_METHOD_VALUE_TRILINEAR = 7; 127 public static final int SENSING_METHOD_VALUE_COLOR_SEQUENTIAL_LINEAR = 8; 128 129 public static final List<TagInfo> ALL_TIFF_EP_TAGS = 130 Collections.unmodifiableList(Arrays.asList( 131 EXIF_TAG_CFAREPEAT_PATTERN_DIM, 132 EXIF_TAG_CFAPATTERN_2, 133 EXIF_TAG_BATTERY_LEVEL, 134 EXIF_TAG_INTER_COLOR_PROFILE, 135 EXIF_TAG_INTERLACE, 136 EXIF_TAG_TIME_ZONE_OFFSET, 137 EXIF_TAG_SELF_TIMER_MODE, 138 EXIF_TAG_FLASH_ENERGY, 139 EXIF_TAG_SPATIAL_FREQUENCY_RESPONSE_1, 140 EXIF_TAG_NOISE_1, 141 EXIF_TAG_FOCAL_PLANE_XRESOLUTION, 142 EXIF_TAG_FOCAL_PLANE_YRESOLUTION, 143 EXIF_TAG_FOCAL_PLANE_RESOLUTION_UNIT, 144 EXIF_TAG_IMAGE_NUMBER_EXIF_IFD, 145 EXIF_TAG_SECURITY_CLASSIFICATION_EXIF_IFD, 146 EXIF_TAG_IMAGE_HISTORY_EXIF_IFD, 147 EXIF_TAG_EXPOSURE_INDEX, 148 EXIF_TAG_TIFF_EPSTANDARD_ID_1, 149 EXIF_TAG_SENSING_METHOD)); 150 151 private TiffEpTagConstants() { 152 } 153}