Changeset 8132 in josm for trunk/src/com/drew/metadata/exif/ExifThumbnailDirectory.java
- Timestamp:
- 2015-03-10T01:17:39+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/com/drew/metadata/exif/ExifThumbnailDirectory.java
r6127 r8132 1 1 /* 2 * Copyright 2002-201 2Drew Noakes2 * Copyright 2002-2015 Drew Noakes 3 3 * 4 4 * Licensed under the Apache License, Version 2.0 (the "License"); … … 16 16 * More information about this project is available at: 17 17 * 18 * http ://drewnoakes.com/code/exif/19 * http ://code.google.com/p/metadata-extractor/18 * https://drewnoakes.com/code/exif/ 19 * https://github.com/drewnoakes/metadata-extractor 20 20 */ 21 21 … … 34 34 * One of several Exif directories. Otherwise known as IFD1, this directory holds information about an embedded thumbnail image. 35 35 * 36 * @author Drew Noakes http ://drewnoakes.com36 * @author Drew Noakes https://drewnoakes.com 37 37 */ 38 38 public class ExifThumbnailDirectory extends Directory … … 57 57 * 7 = JPEG 58 58 * 8 = Adobe Deflate 59 * 9 = JBIG B& W59 * 9 = JBIG B&W 60 60 * 10 = JBIG Color 61 61 * 32766 = Next … … 98 98 public static final int TAG_PHOTOMETRIC_INTERPRETATION = 0x0106; 99 99 100 /** The position in the file of raster data. */ 100 /** 101 * The position in the file of raster data. 102 */ 101 103 public static final int TAG_STRIP_OFFSETS = 0x0111; 102 104 public static final int TAG_ORIENTATION = 0x0112; 103 /** Each pixel is composed of this many samples. */ 105 /** 106 * Each pixel is composed of this many samples. 107 */ 104 108 public static final int TAG_SAMPLES_PER_PIXEL = 0x0115; 105 /** The raster is codified by a single block of data holding this many rows. */ 109 /** 110 * The raster is codified by a single block of data holding this many rows. 111 */ 106 112 public static final int TAG_ROWS_PER_STRIP = 0x116; 107 /** The size of the raster data in bytes. */ 113 /** 114 * The size of the raster data in bytes. 115 */ 108 116 public static final int TAG_STRIP_BYTE_COUNTS = 0x0117; 109 117 /** … … 117 125 public static final int TAG_PLANAR_CONFIGURATION = 0x011C; 118 126 public static final int TAG_RESOLUTION_UNIT = 0x0128; 119 /** The offset to thumbnail image bytes. */ 127 /** 128 * The offset to thumbnail image bytes. 129 */ 120 130 public static final int TAG_THUMBNAIL_OFFSET = 0x0201; 121 /** The size of the thumbnail image data in bytes. */ 131 /** 132 * The size of the thumbnail image data in bytes. 133 */ 122 134 public static final int TAG_THUMBNAIL_LENGTH = 0x0202; 123 135 public static final int TAG_YCBCR_COEFFICIENTS = 0x0211; … … 129 141 protected static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>(); 130 142 131 static 132 { 143 static { 133 144 _tagNameMap.put(TAG_THUMBNAIL_IMAGE_WIDTH, "Thumbnail Image Width"); 134 145 _tagNameMap.put(TAG_THUMBNAIL_IMAGE_HEIGHT, "Thumbnail Image Height"); … … 161 172 } 162 173 174 @Override 163 175 @NotNull 164 176 public String getName() … … 167 179 } 168 180 181 @Override 169 182 @NotNull 170 183 protected HashMap<Integer, String> getTagNameMap() … … 193 206 byte[] data = _thumbnailData; 194 207 195 if (data ==null)208 if (data == null) 196 209 throw new MetadataException("No thumbnail data exists."); 197 210 … … 201 214 stream.write(data); 202 215 } finally { 203 if (stream !=null)216 if (stream != null) 204 217 stream.close(); 205 218 }
Note:
See TracChangeset
for help on using the changeset viewer.