source: josm/trunk/src/com/drew/metadata/exif/ExifThumbnailDirectory.java@ 13061

Last change on this file since 13061 was 13061, checked in by Don-vip, 7 years ago

fix #15505 - update to metadata-extractor 2.10.1

  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 2.2 KB
Line 
1/*
2 * Copyright 2002-2017 Drew Noakes
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * More information about this project is available at:
17 *
18 * https://drewnoakes.com/code/exif/
19 * https://github.com/drewnoakes/metadata-extractor
20 */
21
22package com.drew.metadata.exif;
23
24import com.drew.lang.annotations.NotNull;
25
26import java.util.HashMap;
27
28/**
29 * One of several Exif directories. Otherwise known as IFD1, this directory holds information about an embedded thumbnail image.
30 *
31 * @author Drew Noakes https://drewnoakes.com
32 */
33@SuppressWarnings("WeakerAccess")
34public class ExifThumbnailDirectory extends ExifDirectoryBase
35{
36 /**
37 * The offset to thumbnail image bytes.
38 */
39 public static final int TAG_THUMBNAIL_OFFSET = 0x0201;
40 /**
41 * The size of the thumbnail image data in bytes.
42 */
43 public static final int TAG_THUMBNAIL_LENGTH = 0x0202;
44
45 /**
46 * @deprecated use {@link com.drew.metadata.exif.ExifDirectoryBase#TAG_COMPRESSION} instead.
47 */
48 @Deprecated
49 public static final int TAG_THUMBNAIL_COMPRESSION = 0x0103;
50
51 @NotNull
52 protected static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>();
53
54 static
55 {
56 addExifTagNames(_tagNameMap);
57
58 _tagNameMap.put(TAG_THUMBNAIL_OFFSET, "Thumbnail Offset");
59 _tagNameMap.put(TAG_THUMBNAIL_LENGTH, "Thumbnail Length");
60 }
61
62 public ExifThumbnailDirectory()
63 {
64 this.setDescriptor(new ExifThumbnailDescriptor(this));
65 }
66
67 @Override
68 @NotNull
69 public String getName()
70 {
71 return "Exif Thumbnail";
72 }
73
74 @Override
75 @NotNull
76 protected HashMap<Integer, String> getTagNameMap()
77 {
78 return _tagNameMap;
79 }
80}
Note: See TracBrowser for help on using the repository browser.