Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get metadata from a picture?

I am browsing the web but no way to find how to get metadata from a picture.

Does anyone has an idea ?

I can't see anything in the Bitmap/BitmapFactory/BitmapFactory.Options documentation that would give me a hint.

I would like to retrieve standard information such as :

  • name
  • date it was taken
  • dimension
  • size

and maybe more.

Any idea ?

like image 676
Spredzy Avatar asked May 11 '10 12:05

Spredzy


People also ask

Can you see metadata on a JPG?

Just right-click on the photo in question and select “Properties”. Click on the “Details” tab and scroll down—you'll see all kinds of information about the camera used, and the settings the photo was taken with.

Where is the metadata on a photo?

Metadata is stored in two main places: Internally – embedded in the image file, in formats such as JPEG, DNG, PNG, TIFF … Externally – outside the image file in a digital asset management system (DAM) or in a “sidecar” file (such as for XMP data) or an external news exchange format document as specified by the IPTC.


2 Answers

You can get at least the size of the image by setting BitmapFactory.Options.inJustDecodeBounds to true.

If the image is in the MediaStore, you might be able to get more information.

like image 129
hpique Avatar answered Sep 19 '22 05:09

hpique


According to this thread

http://osdir.com/ml/AndroidDevelopers/2009-02/msg00821.html

you have to use ImageManager

like image 25
RoflcoptrException Avatar answered Sep 20 '22 05:09

RoflcoptrException