2

How do I obtain the metadata for a png or jpg image? I have a few thousand images that get processed by a perl script. One of the things that I need to be able to get from each image is the metadata for them.

The most important information is the date listed in bold. I would like to have a script I can run that will grab the date info from each of the pictures that I process. It would be ideal if it is in perl, but php would work too. this is running on a Linux system. Any help would be appreciated. Thank you

Here is an example of one of the images: alt text

Here is the metadata for this image:

Sep 30, 2010

849×571 pixels – 825KB

Filename: EA_A02_N_1-4_5mM_Xgal_7d_B.cropped.resized.grey.png

Camera: Canon

Model: Canon EOS DIGITAL REBEL XSi

ISO: 200

Exposure: 1/50 sec

Aperture: 2.8

Focal Length: 60mm

Alos
  • 2,657
  • 5
  • 35
  • 47

3 Answers3

2

In php you can use exif_read_data() function .

Poelinca Dorin
  • 9,577
  • 2
  • 39
  • 43
2

Check out ExifTool

nedk
  • 673
  • 3
  • 8
1

You can use ImageMagick, it's good application that was used in Typo3 to retrieve image's MetaData. when you want to execute it, you can use the exec() or system() functions

NiL
  • 287
  • 4
  • 10