JHEAD

phgrove

Joined: 2002-10-10
Posts: 101
Posted: Thu, 2002-10-10 08:56

I am not sur eif this is the right area for this question, but if i use jhead to extract the EXIF information form an image, what information does it extract? Can i select it to only extract the comment?

Peter

 
vallimar

Joined: 2002-08-15
Posts: 487
Posted: Thu, 2002-10-10 21:48

You'd need to modify the code for that. Take a look at photo_properties.php.
Thats where it displays the information.

 
phgrove

Joined: 2002-10-10
Posts: 101
Posted: Fri, 2002-10-11 12:32

Thanks for the information.

Peter :smile:

 
abricko

Joined: 2002-09-26
Posts: 7
Posted: Mon, 2002-10-14 04:47

Any help on doing this?

Quote:
You'd need to modify the code for that. Take a look at photo_properties.php.
Thats where it displays the information.

 
phgrove

Joined: 2002-10-10
Posts: 101
Posted: Wed, 2002-10-16 12:19

Thanks for the information. What i was going to do is imbed in the JPEG header comment area, the picture comments/notes. Then when i upload the picture i would get the save_photos.php script to take the comment from the EXIF comment feild, thus making sure my comments on the pictures i have taken always are with the photo's. If you look at me web site you will see why i need to do it. http://www.petergrove.co.uk/travel !! :smile:

I will try and alter the save_photos.php script tonight to take the EXIF comment field as the default for the photo caption. If i have any problems i will post a message, hopefully i wont! Thanks for the help.

Peter

 
phgrove

Joined: 2002-10-10
Posts: 101
Posted: Fri, 2002-11-01 07:24

Right i have tried altering the save_photo.php file so that it can take the caption for the picture from the comment EXIF field, however it doesn't seem to work. I get the following error message:-

Processing status...
- Adding 49-34.jpg ERROR: requested index [c:/windows/tempgalD.tmp] out of bounds [65]
Fatal error: Call to a member function on a non-object in d:datagalleryclassesAlbum.php on line 957

I have changed lines 323 in save_photo.php to

msg("- Adding $name");
if ($setCaption) {
$caption = $originalFilename;
} else {
$myExif = $gallery->album->getExif($file);
if ($myExif) {
// following line commented out because we were losing
// comments from the Exif array. This is probably due
// to differences in versions of jhead.
// array_pop($myExif); // get rid of empty element at endarray_shift($myExif);
// get rid of file name at beginning
while (list($key, $value) = each ($myExif)) {
if ($key == "Comment") {
$caption = $value;
}
}
} else {
$caption = "";
}
}

Any idea's on what is wrong with the code, or can i just not do this at all!!

Peter