View Full Version : Strange EXIF values displaying
flashpunk
11-21-2004, 04:41 PM
Hey,
After finally figuring out why my exif wasn't working on the site, ive encountered a new problem.
The Exif is showing up, but sometimes i'm getting strange values that look like this:
Exposure: 2500000/100000000
Aperture: f/3.5
Focal: 1900000/100000
Has anyone else gotten these strange values?
The only thing I can think of is that it is because of some small levels and contrast adjustment in Photoshop.
Any help?
flashpunk
11-21-2004, 04:42 PM
Heres a link to an example of this problem, The exif values are on the right side at the bottom of the page:
http://www.flashpunk.ca/mikeppost/index.php?showimage=11
Connie
11-21-2004, 05:25 PM
Sorry,
whenever I try to surf to your URL, this URL is not available, no connection possible
:roll:
flashpunk
11-21-2004, 07:18 PM
That is really strange, its working for me.
blinking8s
11-21-2004, 07:28 PM
works here...but you will have to change the variables for the exif output information in the php...i posted a similar thread when i encountered the problem, just search around my post here and details are there
Connie
11-21-2004, 07:39 PM
have a look at:
http://www.photografitti.de/version3/images/doku/flashpunk.jpg
the screenshot shows it, I'm not behind a firewall...
bye, Connie
flashpunk
11-21-2004, 09:59 PM
Hey, thanks blinking8s for the insight..
Do those documents mean that you never figured out how to actually implement the information from those documents?
blinking8s
11-22-2004, 07:27 AM
well pixelpunk pointed me to what needed to be changed in pixelpost...but the documents posted are just information and ref with other reader scripts...Ill post anything else I have on it later though, might be a day or two...
this is one reason why adobe is pushing digital film vs all these different camera companies making their own RAW file formats...its annoying for the users
flashpunk
11-22-2004, 02:29 PM
thanks blinking8s. I see that youre using a Canon 20D, so maybe the coding that you use on your site will work with my camera?
I'd appreciate it if you could share the information.. I know nothing about php coding, I looked at some of the file, found where the Exif stuff is, but after that I get lost between all the $s and the { and the } asdognaougnwaogn.
yeah.
blinking8s
11-22-2004, 05:15 PM
haha...gimme a day or two, swamped with school and some client work now. We'll get you sorted out though
Anonymous
11-30-2004, 03:06 PM
I forced an evaluation of the statement... in index.php:
$exposure = ($exif['ExposureTime'])/1;
if ($exposure == 1) { $exposure = $exif['ExposureTime']; } // less than 1s
//...
$focal = pullout($exif['FocalLength'])/1;
flashpunk
11-30-2004, 06:14 PM
Hey George, that didn't seem to work for me.
maybe i'm putting it in the wrong spot int he index file?
like i said, i'm pretty clueless when it comes to php.
Anonymous
12-01-2004, 01:00 AM
Basically around line 650 you'll see the exif stuff. You'll see lines that say,
[code]
$exposure = $exif['ExposureTime'];
$focal = pullout($exif['FocalLength']);
[code]
Replace those with the code I pasted in a previous message. If you display other EXIF values that aren't fully evaluated then do the same trick. I added in ISO for my hacked up dark template.[/code]
flashpunk
12-01-2004, 07:27 PM
Thanks george,
i see it takes away the 50/1 and just changes it to 50..
this however doesn't fix my strange EXIF values.
Anonymous
12-01-2004, 07:46 PM
That's the actual data in the EXIF header of your image. You might want to look at using exifer for PHP if you want fully evaluated more detailed information.
I noticed on your blog you're using a Rebel. I have a 10D and don't seem to be seeing these weird EXIF values. I've got about 70 images on my blog (http://www.elitedudz.com/~george) all with correct EXIF info.
Hi all I have just solved the EXIF Exposure time problem :D
vim up the file index.php and add this::
...
...
$exif = $all_exif['EXIF'];
$exposure = $exif['ExposureTime'];
list($expo_a,$expo_b) = split('/',$exposure);
$exposure = substr($expo_a/$expo_b,0,6)."s (1/". (integer)($expo_b/$expo_a).")";
// if ($exposure == 1) { $exposure = $exif['ExposureTime']; } // less than 1s
...
...
This gives of the values in Sec and Fractions and it looks really nice
check it out in my photoblog http://photoblog.x123.info
CU NexT Time...
flashpunk
12-03-2004, 02:09 PM
I tried this out, and mine is showing this:
Exposure: 0.01sĀ* (1/100)
could be the font i'm using.
check it out on my site if you want: http://foto.flashpunk.ca
Hi flashpunk
Check out your code, i think you may have put some extra chars(Space) or some thing.
Exposure: 0.01sĀ (1/100)
And by the way remove this ;)
// if ($exposure == 1) { $exposure = $exif['ExposureTime']; } // less than 1s
Anonymous
12-03-2004, 06:00 PM
ESN, does your code work for exposures longer than or equal to 1 second?
Anonymous
12-03-2004, 07:13 PM
I switched over to exifer.php. You can download it freely from the internet. Put it in a subdirectory called exifer of your Pixelpost installation. This gets rid of the hacks for calculating the proper exposure and aperture... at least for my Canon 10D. It also adds a lens lookup functionality and handles both primes and zooms. Not sure about other lenses like manual focus or even the lensbaby.. will check this weekend.
Around line 43 you'll see some lines that say "require". Append the following line:
require_once("exifer/exif.php");
Around line 306 is the EXIF stuff. Replace the line starting with "$all_exif = exif_read" all the way down to, but NOT including, the line starting with "if($exposure != "")" with this:
$exif = read_exif_data_raw($curr_image,1);
$exposure = $exif['SubIFD']['ExposureTime'];
$aperture = $exif['SubIFD']['ApertureValue'];
$capture_date = $exif['SubIFD']['DateTimeOriginal'];
$flash = $exif['SubIFD']['Flash'];
if ($flash != null && strpos($flash, "No Flash") === false) {
$flash = $lang_flash_fired;
} else {
$flash = $lang_flash_not_fired;
}
$focal = $exif['SubIFD']['FocalLength'];
$info_camera_manu = $exif['IFD0']['Make'];
$info_camera_model = $exif['IFD0']['Model'];
$iso = $exif['SubIFD']['ISOSpeedRatings'];
$wide = $exif['SubIFD']['MakerNote']['Settings 1']['ShortFocalLength'];
$long = $exif['SubIFD']['MakerNote']['Settings 1']['LongFocalLength'];
foreach($lenses as $l) {
if ($wide == $long) {
if (strpos($l, " $wide"."mm") !== false) {
$lens = $l;
break;
}
}
else if (strpos($l, "$wide-$long"."mm") !== false) {
$lens = $l;
break;
}
}
I fish out the ISO speed rating so you may want to add this after the line which reads "$tpl = ereg_replace("<EXIF_LENS>",$lens,$tpl);" with this:
$tpl = ereg_replace("<EXIF_ISO>",$iso,$tpl);
In your languages/language-english.php file add the following:
$lenses = array(
"Canon EF 50mm f/1.8 II",
"Sigma 17-35mm f/2.8-4 EX DG HSM",
"Sigma 24-135mm f/2.8-4.5 ASP IF",
"Canon EF 80-200mm f/4.5-5.6 II",
"Sigma 24mm f/1.8 EX ASP DG DF Macro"
);
Of course, change the lenses to match your own set. You can see it all in action at http://www.elitedudz.com/~george.
Go easy on the code.. it's my first attempt at PHP.. but I code for a living so it's all good :)
pixelpunk
12-03-2004, 07:59 PM
My Nikon D70 don't look like it's giving out ISO rating, tested it last night but nothing. Oh well. I should probably add it to the main script even though I can't taste it myself :D
// punk
Anonymous
12-03-2004, 08:30 PM
Apparently the D70 puts its ISO speed rating in a special field. If you google around you can find information on it. Maybe a patch to exifer would do the trick since it has backends for different model cameras.
flashpunk
12-04-2004, 04:19 AM
George, I installed your hack with no problems at all thanks.
flashpunk
12-04-2004, 05:40 AM
I cant seem to be able to get the ISO Exif info to show.I'm using a Digital Rebel. Strange, the D10 and the Drebel are basically the same camera.
Anonymous
12-04-2004, 05:03 PM
You need to say <EXIF_ISO> in your template somewhere.
flashpunk
12-04-2004, 06:48 PM
just put it in on my site under the focal legnth, but no dice..
check it out for yourself
foto.flashpunk.ca
all its displaying is "d"
Anonymous
12-05-2004, 06:12 AM
You'll need to append $lang_iso = "ISO" into your lang-english.php. Forgot to mention that.
I'm not sure why it's showing a 'd'. Could you email your index.php to me at george at elitedudz.com? I downloaded one of your images and the EXIF appears really similar to mine.
flashpunk
12-05-2004, 05:02 PM
Sure thing..
I tried adding that string to my language file, but no such luck, it removed the d showing up there now, its just blank.
i'll email you my index file asap.
flashpunk
12-05-2004, 06:42 PM
FINALLY! Thanks to George, Ive got it working perfectly.
Not to mention, we got the ISO to show up on the page with the Exif info.
I did have to edit it slightly to take out some ,'s and extra info that I didn't want, also, i had to modify the comment popup string to work correctly..
Thank you so much George!
usafdcc
01-18-2005, 10:16 PM
I think that this is going to be a tuff one. I followed the direction above, added require once to index, replace text, added info to language file, but still nothing. Yes I do have exifer installed at exifer/exif.php. If I were to call for flash info with <EXIF_FLASH> or using any other call it will not show info. Any suggestions?
Anonymous
02-02-2005, 09:14 PM
damn, I must install that exifier...
now I know how I'll spend my weekend! :lol:
thanks to all posters :)
Anonymous
02-03-2005, 08:34 AM
I think that this is going to be a tuff one. I followed the direction above, added require once to index, replace text, added info to language file, but still nothing. Yes I do have exifer installed at exifer/exif.php.
damn,
I did that today, exactly as described in this thread, but I still can't see Exif datas. My images does have exifs!
http://steff.altervista.org/fotoblog/
any hint? :)
usafdcc
02-03-2005, 12:02 PM
is exif enabled on your server?
Anonymous
02-03-2005, 12:33 PM
nope.
I used the exifer script because Exif is not enabled on my server.
usafdcc
02-03-2005, 01:15 PM
Try this. I draged this from another post
Provided you followed the steps exactly as I posted and given that your host doesn't have exif enabled then simply remove:
Code:
if(extension_loaded(exif)) {
And it's following closing brace. Or just change it to say:
Code:
if(true) {
Hopefully that's correct PHP
usafdcc wrote:
Greetings to all,
Specifically for those whos host will not enable/flag exif on a php compile. I do
Anonymous
02-03-2005, 02:12 PM
thank you!!! :D I didn't notice that post.
it works, HALF but it works, at least partially!
now I have to figure out WHY it won't display ISO and aperture time :roll:
Anonymous
02-03-2005, 03:06 PM
Not to mention, we got the ISO to show up on the page with the Exif info.
I did have to edit it slightly to take out some ,'s and extra info that I didn't want, also, i had to modify the comment popup string to work correctly..
I have a "d" on my photoblog as well... what did you remove? :)
http://steff.altervista.org/fotoblog/
Anonymous
02-04-2005, 03:00 PM
I uploaded a shot of my previous camera, Canon A60, and I can see the aperture value, whether the 300D/Rebel ones won't.
Why?!?!
http://steff.altervista.org/
Anonymous
02-20-2005, 08:57 AM
ESN, does your code work for exposures longer than or equal to 1 second?
George, I've made it happy with greater then one second.
if (substr($expo_a/$expo_b,0,6) > 1) {
$exposure = substr($expo_a/$expo_b,0,6)." seconds ";
} else {
$exposure = substr($expo_a/$expo_b,0,6)." seconds (1/". (integer)($expo_b/$expo_a).")";
}
Less then 1 (http://photo.wi.id.au/index.php?showimage=72)
Greater then 1 (http://photo.wi.id.au/index.php?showimage=68)
I am using this in combination with the new exifer.php script. I like the way this presents the time better.
Anonymous
02-20-2005, 09:16 AM
$wide = $exif['SubIFD']['MakerNote']['Settings 1']['ShortFocalLength'];
$long = $exif['SubIFD']['MakerNote']['Settings 1']['LongFocalLength'];
Just looking through the code, and looking through the exif.php and looking @ the EXIF data I have in WinXP. I can't figure out why these lines are in there? My D70 doesn't appear to br writing this data to the file at all, does anyone with a D70 get the lens info in their EXIF data?
Cheers,
--Wade M
danimal
02-23-2005, 03:03 AM
I have, in the "exifer1_4" folder I downloaded, four files and one folder. One of the files is a jpeg image. Do I place all of those on my server and at what level? The same level as "index.php" resides in my pixelpost installation? In a folder at that level? Do I pick out specific files form this set and leave others? I'm at a loss.
In addition I opened all of the php files inside of the "exifer1_4" folder I downloaded and, using the find command in Dreamweaver, could not find the word "require" that george says should be "around line 43" at:
http://www.pixelpost.org/forum/viewtopic.php?t=176&postdays=0&postorder=asc&start =15
I am not even sure what file he is referring to.
Any ideas?
Anonymous
02-24-2005, 07:51 AM
Danimal,
Where ever you place the files, take note of them. I placed them in a sub dir. It's safer and cleaner this way
The require around line 43 is in the index.php for pixelpost, not for exifer.
You need all the files, but only "require once ../sub-folder/exifer.php" as it loads the other files.
--Wade M
marlyse
03-09-2005, 01:19 AM
I noticed on your blog you're using a Rebel. I have a 10D and don't seem to be seeing these weird EXIF values. I've got about 70 images on my blog (http://www.elitedudz.com/~george) all with correct EXIF info.
Is that a digital rebel or a 35mm?
Question I'm asking is that I'm using the digital Rebel and am not getting the lens data out of it. It's in the Exif data, I double-checked.
Photoshop CS does kill all Exif data for me (on the Mac) - somebody said it wouldn't as long as 'normally' saved. Oddly enough I have to go via ImageReady to RETAIN the Exif data. It's a pain.
steff
03-09-2005, 09:41 AM
Question I'm asking is that I'm using the digital Rebel and am not getting the lens data out of it. It's in the Exif data, I double-checked.
Photoshop CS does kill all Exif data for me (on the Mac) - somebody said it wouldn't as long as 'normally' saved. Oddly enough I have to go via ImageReady to RETAIN the Exif data. It's a pain.
I have a Digital Rebel too, and lens data doesn't work for me too.
anyway, all other exif datas works :)
photoshop CS for windows retains all exifs... sorry! :P
Anonymous
03-09-2005, 01:24 PM
[quote=marlyse]photoshop CS for windows retains all exifs... sorry! :P
Yuk! Now PS does even a better job with windows than their roots! :D
More testing revealed more frustration: the moment I upload the image via the web browser, all EXIF data is gone (even when I do not use a resize addon). If I upload via FTP, it remains. I am beginning to think that displaying the EXIF data isn't THAT important for me, if I need to know if, I can look on the original.
Connie
03-09-2005, 01:28 PM
Mr. Guest,
which webbrowser do you use? Is it Microsoft Internet Explorer?
One more reason not to call this a "web browser"
I am sure OPERA and / or FIREFOX won't do that
:roll:
marlyse
05-04-2005, 05:41 AM
Mr. Guest,
which webbrowser do you use? Is it Microsoft Internet Explorer?
hehe, the mr. guest was me. no, I am on a Mac and using either Safari or OmniWeb, haven't used IE in about 2 years :)
Please don't tell me to switch to FireFox. It's okay, but I like Safari better (still). It must have been something with PP, because version 1.4 and 1.4.1 do retain Exif data. Interesting. Just now I have the weird 1.8230492309 number problem (which I didn't have before). Will need to clean up the Exif data, a line which was there before now just returns blank. No biggie, just haven't gotten around to doing it. But YAY, I finally upgraded too.
raminia
05-04-2005, 06:13 AM
[quote=Connie]Mr. Guest,
Please don't tell me to switch to FireFox. It's okay, but I like Safari better (still). It must have been something with PP, because version 1.4 and 1.4.1 do retain Exif data. Interesting. Just now I have the weird 1.8230492309 number problem (which I didn't have before). Will need to clean up the Exif data, a line which was there before now just returns blank. No biggie, just haven't gotten around to doing it. But YAY, I finally upgraded too.
what is the 1.8230492309 issue?! v1.4 has some changes in displaying exposure time though. Does it have a bug?
marlyse
05-04-2005, 02:18 PM
what is the 1.8230492309 issue?! v1.4 has some changes in displaying exposure time though. Does it have a bug?
hi raminia -
well, having the number displayed as 1.82304.... is not very helpful (in my viewpoint). it used to display as '1/15 sec' which is much more what I am used to see. Also the f-stop would e.g. be f5.6 - now it's something like f5.5000000000000046326.
it's not a BUG, it's how it's now displayed. I know there used to be threads about this and questions how to change the code to get numbers displayed with only 1 floating point (for the f-stop) but especially also for the exposure to have it again displayed with 'parts of a whole' (sorry, don't know english word for that.
marlyse
05-04-2005, 03:09 PM
I need to modify my statement:
it does not seem to be PP changing the appearance of the numbers, it's the software which I use now to prepare the images which cause the change.
I used to go the route: raw - photoshop CS - image ready - upload to web. The result would be like: http://www.marlyse.com/myview/index.php?popup=comment&showimage=197
Now I go the following route: raw - shoebox - upload to web. The result looks like this: http://www.marlyse.com/myview/index.php?popup=comment&showimage=212
Next to making the aperture appear with 13 numbers behind the floating point, it also does not relay the focal lenghtt. Maybe I'll just have to go back doing it the old way :)
raminia
05-04-2005, 03:10 PM
I think this is an issue with your camera with Exifer 1.5. email me one of your photos or provide a link to you photoblog. I'll test it here on my local server.
marlyse
05-04-2005, 03:20 PM
I think this is an issue with your camera with Exifer 1.5. email me one of your photos or provide a link to you photoblog. I'll test it here on my local server.
Ramina, see my last posting, there are 2 links but I think I've found the answer to the mystery.
raminia
05-04-2005, 04:19 PM
yeah I see. but I checked it with ExifReader software and the Aperture was ok in both cases. I also checked the code. The problem is from deep inside Exifer 1.5. Please report the bug to the Exifer writer
http://www.offsky.com/software/exif/index.php
marlyse
05-04-2005, 04:34 PM
[...]Please report the bug to the Exifer writer
http://www.offsky.com/software/exif/index.php.
DONE.
:D
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.