PDA

View Full Version : whack exif


blinking8s
10-20-2004, 05:28 AM
my exif data is far from correct, im assuming its my camera and i read up that pixelpunk hasnt fooled around with exif much...be good to be able to enter the data via cms as a fallback...next version next version but the whole php exif thing rocks and id like to get it workin

just wondering what i might need to look at to take a look at all this myself, never delt with exif and havent had a chance to look through the script...

thanks, blinks

pixelpunk
10-20-2004, 06:49 AM
Make a new php file, call it exif-info.php or whatever you like.

<?php

$all_exif = exif_read_data(test.jpg,0,true);

print_r($all_exif);

?>

That file will take the test.jpg image and spit out all, I mean all information that's available for a pickup.

Try to see what variables that's in there.
What camera do you use?
What information does it get wrong?

// punK

blinking8s
10-20-2004, 09:17 AM
thats a cool trick there...im new to the whole exif and php thing...i dont quite know how to apply it to the image though

i have a canon 20d...and everything is wrong on the image i tested...shutter speed and apature were pretty far off, it told me the flash fired and it didnt, and the focal length didnt display at all

im assuming each camera has a different profile, i believe the 20d uses an updated exif but im not sure...

pixelpunk
10-20-2004, 09:34 AM
From what I know it's rather chaotic with vendors more or less choosing their own field names to write exif info.

A quick search for canon exif doesn't make me happy :(
But I know someone here had a Canon 300D and it worked out alright.

I have very limited knowledge, I'm not sure how I should move on further. Best way would be to find a class that reads the exif info and incorporate that into the script.

// punK

blinking8s
10-20-2004, 09:38 AM
ill work on it for a while tomorrow and im sure ill figure it out, i have a better understanding now, maybe a future advancement would be to have profiles for different camera ranges...

my exif research from today didnt have a lot of info on canon, much less my model...so im sure it will be trial and error, but info ont he correct classes for different company/model ranges is out there...

thanks

pix
10-20-2004, 04:16 PM
pixelpunk, thanks for good program.

have you checked below site out?

http://exif.org/

they have a lot of info. about EXIF.

blinking8s
10-20-2004, 05:41 PM
<?php
echo "test1.jpg:<br />\n";
$exif = exif_read_data('test.JPG', 'IFD0');
echo $exif===false ? "No header data found.<br />\n" : "Image contains headers<br />\n";

$exif = exif_read_data('test.JPG', 0, true);
echo "test2.jpg:<br />\n";
foreach ($exif as $key => $section) {
foreach ($section as $name => $val) {
echo "$key.$name: $val<br />\n";
}
}
?>
works good too :)

pixelpunk
10-20-2004, 06:46 PM
pixelpunk, thanks for good program.

have you checked below site out?

http://exif.org/

they have a lot of info. about EXIF.

Thanks for the link, I'll check that out later and perhaps get any wiser :)

// punk

blinking8s
10-20-2004, 08:45 PM
http://www.burren.cx/david/canon.html was helpful to me