Jump to content

[SOLVED] EXIF data: what are all the different fields and how to echo?


Guest kilbad

Recommended Posts

Guest kilbad
Here are my questions: I have a picture on a webpage, and I want to echo one of its EXIF data fields below it (i.e. Title, Subject, Author, or maybe Comments, etc.).  How would I go about echoing a single EXIF data field for an image?  Also, what are all the different avalible EXIF data fields that a JPG can have?

Thank you all so much in advance!

Brendan
Use the [url=http://www.php.net/exif_read_data]exif_read_data()[/url] function to extract the data.

Experiment first to see how this function returns the data:
[code]<?php
$exif_data = exif_read_data('picture.jpg');
echo '<pre>' . print_r($exif_data,true) . '</pre>';
?>[/code]

Ken
Guest kilbad
That function works perfectly to display the EXIF data! Thanks

Now, how do I echo/print just a single EXIF field (like title for example)?


[you can see the output of that function at [url=http://kilbad.com/DEVELOPMENT/test.php]http://kilbad.com/DEVELOPMENT/test.php[/url]]

Thanks again for all the help!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.