View Full Version : a help with EXIF data
Anonymous
02-08-2005, 08:44 AM
please, can anyone give me a hint how to fully enable Exif?
I added the exifer script to pixelpost, but it doesn't display all values...
I make a quick installation of pictorialis :oops: which has got exifer, and it works... but i DONT want to use pictorialis, it's HUGE and complicated, i do like pixelpost! :)
so why pictorrialis exif works and pixelpost won't? I followed all instruction found in this forum.
I guess index.php code has to be modified slighty to remove some commas and so on
Anonymous
02-08-2005, 08:51 AM
forgot the address: http://steff.altervista.org/
Anonymous
02-14-2005, 12:05 PM
bump
Anonymous
02-14-2005, 01:58 PM
I too get really weird EXIF data.
Running v 1.3....
"
Camera Model: NIKON D70
Exposure: 300/10 / Aperture: f/8.0 / Focal: 1300/10 mm / Flash: Fired
"
300/10, why not just 30 secounds, and a focal length of 130 instead of 1300/10.
Is this my exif reader or pixel post? (It's been bugging me for AGES!)
Thanks,
Wade
http://photo.wi.id.au
Connie
02-14-2005, 02:36 PM
I remember that I read somewhere that this NIKON camera gives some strange values, well EXIF is not a real standard for all producers...
raminia
02-14-2005, 03:31 PM
please, can anyone give me a hint how to fully enable Exif?
I added the exifer script to pixelpost, but it doesn't display all values...
I make a quick installation of pictorialis :oops: which has got exifer, and it works... but i DONT want to use pictorialis, it's HUGE and complicated, i do like pixelpost! :)
so why pictorrialis exif works and pixelpost won't? I followed all instruction found in this forum.
I guess index.php code has to be modified slighty to remove some commas and so on
did you see this one?
http://www.pixelpost.org/forum/viewtopic.php?t=323&highlight=
with this last correction there should be no problem with Exifer
Anonymous
02-15-2005, 10:56 AM
thanks raminia! :) it was the ONLY thread I didn't read in this forum, I think!
now I have ISO values, but sometimes I get weird numbers, such as
Exposure: 1/60 sec / / Focal: 50 mm / ISO: 4278190180 / Flash: Not Fired
sadly, sometimes F number aren't displayed. I can't understand why.
(exif datas of the same photo are displayed correctly with Pictorialis)
raminia
02-15-2005, 11:13 AM
may be it's a camera problem with exif standard. email me one of you photos. [myDomainName] @ raminia.com
Ramin
raminia
02-15-2005, 11:27 AM
maybe Aperture and isosetting in you camera is save by other names. such as
aperture: "aperture" = "Aperture Value" = "FNumber"
ISO: "Canon Makernote.Iso" = "ISOSetting" = "ISO"
edit your index.php at about line 319 in the "// EXIF STUFF" section.
For Aperture:
try replacing
$aperture = $exif['SubIFD']['ApertureValue'];
with
$aperture = $exif['SubIFD']['FNumber'];
This is more likely to be ok. if not try
$aperture = $exif['SubIFD']['Aperture Value'];
or maybe this
$aperture = $exif['SubIFD']['Aperture Value'];
-------------------------------------------
For ISO setting:
and this one
$iso = $exif['SubIFD']['ISOSpeedRatings'];
with this
$iso = $exif['SubIFD']['Canon Makernote.Iso'];
raminia
02-15-2005, 11:34 AM
oops!
I tested one of your photos from your photoblog and all seems ok on my localhost!
check if your exifer version is out dated!
maybe you have forgotten something....
I'll post here my EXIF section of index.php here
// EXIF STUFF
//if(extension_loaded(exif)) {
if(true) {
$curr_image = "images/$image_name";
$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;
}
}
if($exposure != "") { $exposure = "$lang_exposure $exposure"; }
if($aperture != "") { $aperture = "$lang_aperture $aperture"; }
if($capture_date != "") { $capture_date = "$lang_capture_date $capture_date"; }
if($focal != "") { $focal = "$lang_focal $focal"; }
if($info_camera_manu != "") { $info_camera_manu = "$lang_camera_maker $info_camera_manu"; }
if($info_camera_model != "") { $info_camera_model = "$lang_camera_model $info_camera_model"; }
// ramin added
if($iso != "") { $iso = "$lang_iso $iso"; }
$tpl = ereg_replace("<EXIF_EXPOSURE_TIME>",$exposure,$tpl);
$tpl = ereg_replace("<EXIF_APERTURE>",$aperture,$tpl);
$tpl = ereg_replace("<EXIF_CAPTURE_DATE>",$capture_date,$tpl);
$tpl = ereg_replace("<EXIF_FLASH>",$flash,$tpl);
$tpl = ereg_replace("<EXIF_FOCAL_LENGTH>",$focal,$tpl);
$tpl = ereg_replace("<EXIF_CAMERA_MAKE>",$info_camera_manu,$tpl);
$tpl = ereg_replace("<EXIF_CAMERA_MODEL>",$info_camera_model,$tpl);
$tpl = ereg_replace("<EXIF_LENS>",$lens,$tpl);
$tpl = ereg_replace("<EXIF_ISO>",$iso,$tpl);
}
raminia
02-15-2005, 11:47 AM
one of your cameras does not provide ISO value (cannon a75 I think)
300D's ISO is ok here. just a problem with aperture. This could be solved easility by using
"FNumber" instead of "ApertureValue" in the index.php as I mentioned in the previous posts.
good luck,
Ramin
Anonymous
02-15-2005, 03:31 PM
dear, DEAR Ramin,
I just changed to "FNumber" and now it WORKS! :D
thank you a lot!
(my remaining exif php code was the same as yours)
the ISO value works, the strange high numbers had been introduced by the software I used to resize the image (micr*soft off*ce picture magager, doh!) so it was a mistake of mine who didn't use something better, grin!
cheers :)
Anonymous
02-15-2005, 03:33 PM
BTW, the "Lens" tag doesn't work.
I specified my lenses in the language file
$lenses = array(
"Canon 50mm f/1.8 II",
"Sigma 18-125mm f/3.5-5.6 DC",
"Canon 28-105mm f/3.5-4.5 USM"
);
but it's not working... anyway that's enough for today, I'll think about this issue tomorrow :)
thanks again
raminia
02-15-2005, 03:52 PM
BTW, the "Lens" tag doesn't work.
I specified my lenses in the language file
$lenses = array(
"Canon 50mm f/1.8 II",
"Sigma 18-125mm f/3.5-5.6 DC",
"Canon 28-105mm f/3.5-4.5 USM"
);
but it's not working... anyway that's enough for today, I'll think about this issue tomorrow :)
thanks again
mine doen't work either. I have a fuji finepix s5500 with a fixed lense and don't use this feature though.
the problem is somewhere here
$wide = $exif['SubIFD']['MakerNote']['Settings 1']['ShortFocalLength'];
$long = $exif['SubIFD']['MakerNote']['Settings 1']['LongFocalLength'];in index.php
maybe again some irony names
Anonymous
02-18-2005, 03:55 AM
Thanks gang!
I'll be doing this on the weekend!
--djway
Anonymous
02-20-2005, 09:21 AM
Ok, after going to the exif.php as posted in this thread, as well as using the time modifications specified there I'm pretty happy.
I'm getting nothing from $lens. I've put $wide and $long on screen and I'm not getting any values, I don't think a D70 sets them somehow.
Raminia/Connie, thanks for your help.
--Wade M
Hi,
I also found problem with flash detection in pixelpost.
Solution should be found here:
http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif/flash.html
And here is my PHP code for root pixelpost script (index.php):
if($flash % 2 == 0) {
$flash = "$lang_flash_not_fired";
} else {
$flash = "$lang_flash_fired";
}
Have fun :)
300/10, why not just 30 secounds, and a focal length of 130 instead of 1300/10.That is not a problem with Pixelpost, exifixer or even the built in exif functions in PHP. You will get the same values no matter which you use. The problem is that some cameras store some of the information, usually just shutter speed though in that form. I think it is part of the standard. One of my cameras even stores focal length that way :shock:
I have hacked my install to reduce all fractions to their lowest form (because I get shutter speeds like 30/60) for fractions and display shutter speeds of 1 sec or larger as a whole fraction (2.5 sec, not 25/10). Unfortunately, I use the PEAR Math_Fraction library to do this which most people won't be able to install, so look for a hack in the near future to handle this. Maybe I will get it added directly to the exifixer library ;)
Hack with me:
if($exposure != "")
{
$exposure = split("/",$exposure);
if(count($exposure) == 2) $exposure = round($exposure[0]/$exposure[1],2);
$exposure = "$lang_exposure $exposure s";
}
Display Exposure always correctly, if needed with 2 places after comma precision.
if($focal != "")
{
$focal = split("/",$focal);
if(count($focal) == 2) $focal = round($focal[0]/$focal[1],2);
$focal = "$lang_focal $focal";
}
Display Focal always correctly, if needed with 2 places after comma precision.
That works, but I still like seeing my shutter speed in the form 1/500 for amounts less than 1 because that is how I think about it ;)
At morning or evening I'll try do it in your way. It's possible to not use any outside (of strict PHP) functions.
At morning or evening I'll try do it in your way. It's possible to not use any outside (of strict PHP) functions.Thanks for the offer, but I have already done it, but like I said, I used PEAR. I will convert it to straight PHP soon and post a hack, or if you prefer ;)
.. or if you prefer ;)
if($exposure != "")
{
$exposure2 = split("/",$exposure);
if(count($exposure2) == 2)
{
$exposure = round($exposure2[0]/$exposure2[1],2);
if($exposure < 1) $exposure = '1/'.round($exposure2[1]/$exposure2[0],0);
}
$exposure = "$lang_exposure $exposure s";
}
It should work fine. Till now I didn't find any mistake value returned by script.
PS Here you've got my example of returning this EXIF values: http://geos.wzzone.com/index.php?showimage=19
BTW In EXIF topic it looks nice:
http://pel.sourceforge.net/
Hello
i have an D70 Nikon, and i dont get all the exif tags...
could someone help me please
What i get :
NIKON D70 - Exposition: 1/2 sec - Ouverture: f 8 - Focale: 60 mm - Flash: Pas enclenche
Could someone help me to get iso, exposure and all others exif stuff please
thanks
ced
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.