Jump to content

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


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!
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.