PDA

View Full Version : Nikon D50 ISO fix


kev_is_soaked
04-05-2006, 09:27 AM
Just thought I would post a fix to display Nikon D50 (possibly D70) ISO Exif data properly when saved as Jpeg straight from Nikon Capture.

My workflow is shoot, Nikon Capture, post. I've used Photoshop, Bibble and some others to see how I faired... but nothing comes close to the adjustment precision of Nikon Capture... at least for me anyways. (I'm a Photoshop lover to boot!!!)

Anyways, I did not want to add another step in the workflow like most suggest (using ExifUtils etc), so I played with it until I got it.

I downloaded the "Extra Exif" add-on from the main site and had no luck. <EXIF_COMPAT_ISO> would return nothing while <EXIF_NIKON_ISO> returns a nice huge number that sure as hell wasn't an ISO :) I did notice that dividing this number by 65536 provided the proper ISO value :) That was it.

So... in a nutshell... if your ISO isn't showing perform the following steps.

- Download and install the Extra Exif 1.1 Add-in
- Open the Extra_Exif.php and look for the line:
$nikoniso = pullout($exif_result['SubIFD']['MakerNote']['ISOSetting']);

- Change it to:
$nikoniso = pullout($exif_result['SubIFD']['MakerNote']['ISOSetting']) / 65536;

- Now use the <EXIF_COMPAT_ISO> tag to display the proper ISO.

Kev C
http://www.silicon-north.com/gallery

raminia
04-05-2006, 09:49 AM
Thank you... I'm sure you've made many NIKON users happy with this. Please send the the complete modified PHP file here for reference. You may upload the modified addon to pixelpost.org/v1 as well .

kev_is_soaked
04-05-2006, 10:08 AM
Well, didn't see any way of attaching the file, so here goes posting it :)

Extra Exif Add-on 1.1b *unofficial
extra_exif.php

<?php

/*

************************************************** **************
Extra EXIF Info Addon version 1.1b for Pixelpost 1.4
Extra modification done April 5th. 2006 by Kev@silicon-north.com
************************************************** **************
Modification done to enable proper representation of the Nikon
D50 and D70s images when saved directly from Nikon Capture as Jpeg.
If this is your workflow, this is your mod.

Notes:
<EXIF_COMPAT_ISO> is the proper tag to get it to work.
************************************************** **************
Changed:
$nikoniso = pullout($exif_result['SubIFD']['MakerNote']['ISOSetting']);
To:
$nikoniso = pullout($exif_result['SubIFD']['MakerNote']['ISOSetting']) / 65536;
************************************************** **************
Special Thanks to Rob Prouse for providing a code base for
solving this wonderful three day mystery!!!
************************************************** **************




Pixelpost version 1.4
Extra EXIF Info Addon version 1.1

Copyright (c) 2005 Rob Prouse <http://www.shiftedexposure.com>
License: http://www.gnu.org/copyleft/gpl.html

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

*/
$addon_name = "Extra EXIF Information for (PP v1.4+ only)";
$addon_description = "Adds extra EXIF tags that you can use in your templates. Please note that not
all tags are available for all cameras. The extra tags are <b>&lt;EXIF_ORIENTATION&gt; &lt;EXIF_MAX_APERATURE&gt;
&lt;EXIF_EXPOSURE_PROGRAM&gt; &lt;EXIF_BRIGHTNESS_VALUE&gt; &lt;EXIF_EXPOSURE_BIAS&gt; &lt;EXIF_METERING_MODE&gt; &lt;EXIF_COLOR_SPACE&gt;
&lt;EXIF_IMAGE_WIDTH&gt; &lt;EXIF_IMAGE_HEIGHT&gt; &lt;EXIF_EQUIV_FOCAL_LENGTH&gt; &lt;EXIF_CAPTURE_DATE_FORMATTED&gt;
&lt;LANG_CAPTURE_DATE_FORMATTED&gt; &lt;EXIF_COMPAT_ISO&gt; &lt;LANG_COMAT_ISO&gt;</b>

<p>These tags give you the following information:
<br /><br /><b>&bull; Orientation</b> - For cameras that support, horizontal or vertical
<br /><b>&bull; Max Aperature</b> - Of the lens you are using
<br /><b>&bull; Exposure Program</b> - Stuff like manual, aperature priority, etc
Brightness value</b> - The EV as indicated by the meter
<br /><b>&bull; Exposure Bias</b> - Number of stops +/- that you set
<br /><b>&bull; Metering Mode</b> - spot, honeycomb, stuff like that
<br /><b>&bull; Equiv focal length</b> - Very few cameras support, minolta does. This is the 35mm equiv focal length. For example, because of the
digital sensor size, 100mm on my lens on my digital SLR is the same as 150mm on a film SLR. Nice for those of us that still think in
film terms
<br /><b>&bull; Color Space</b> - The RGB color space of the photo
<br /><b>&bull; Capture Date Formated</b> - Formats the capture date in the format specified in the admin options.
<br /><b>&bull; Compatible ISO</b> - Gives the ISO for more cameras including the Nikon D70
";
$addon_version = "1.1";

if( isset( $exif_result ) ) {
// Uncomment the following line to see all available EXIF Values
//echo "<div align='left'><pre>"; print_r($exif_result); echo"</pre></div>";

// New EXIF Values
$orientation = $exif_result['SubIFD']['Orientation'];
$maxAperature = $exif_result['SubIFD']['MaxAperatureValue'];
$exposureProgram = $exif_result['SubIFD']['ExposureProgram'];
$brightnessValue = $exif_result['SubIFD']['BrightnessValue'];
$exposureBias = $exif_result['SubIFD']['ExposureBiasValue'];
$meteringMode = $exif_result['SubIFD']['MeteringMode'];
$colorspace = $exif_result['SubIFD']['ColorSpace'];
$exifimagewidth = $exif_result['SubIFD']['ExifImageWidth'];
$exifimageheight = $exif_result['SubIFD']['ExifImageHeight'];
$equivFocalLength = $exif_result['SubIFD']['unknown:a405'];
if( $equivFocalLength != "" ) $equivFocalLength .= " mm";
$iso = pullout($exif_result['SubIFD']['ISOSpeedRatings']);
$nikoniso = pullout($exif_result['SubIFD']['MakerNote']['ISOSetting']) / 65536;
if( !isset( $iso ) || $iso == "" ) $iso = $nikoniso;

// Thanks to cnate
$capture_date = $exif_result['SubIFD']['DateTimeOriginal'];
$xdate = explode(':', str_replace(" ",":",$capture_date));
$capture_date = date($cfgrow['dateformat'], mktime($xdate[3],$xdate[4],$xdate[5],$xdate[1],$xdate[2],$xdate[0]));

$tpl = ereg_replace("<EXIF_CAPTURE_DATE_FORMATTED>",$capture_date,$tpl);

if($capture_date != "")
{
$capture_date = "$lang_capture_date $capture_date";
$tpl = str_replace("<LANG_CAPTURE_DATE_FORMATTED>",$capture_date,$tpl);
}



$tpl = str_replace("<EXIF_ORIENTATION>",$orientation,$tpl);
$tpl = str_replace("<EXIF_MAX_APERATURE>",$maxAperature,$tpl);
$tpl = str_replace("<EXIF_EXPOSURE_PROGRAM>",$exposureProgram,$tpl);
$tpl = str_replace("<EXIF_BRIGHTNESS_VALUE>",$brightnessValue,$tpl);
$tpl = str_replace("<EXIF_EXPOSURE_BIAS>",$exposureBias,$tpl);
$tpl = str_replace("<EXIF_METERING_MODE>",$meteringMode,$tpl);
$tpl = str_replace("<EXIF_COLOR_SPACE>",$colorspace,$tpl);
$tpl = str_replace("<EXIF_IMAGE_WIDTH>",$exifimagewidth,$tpl);
$tpl = str_replace("<EXIF_IMAGE_HEIGHT>",$exifimageheight,$tpl);
$tpl = str_replace("<EXIF_EQUIV_FOCAL_LENGTH>",$equivFocalLength,$tpl);
$tpl = str_replace("<EXIF_NIKON_ISO>",$nikoniso,$tpl);

$tpl = str_replace("<EXIF_COMPAT_ISO>",$iso,$tpl);
if($iso != "") {
$iso = "$lang_iso $iso";
$tpl = str_replace("<LANG_COMPAT_ISO>",$iso,$tpl);
}
}
?>

Joe[y]
04-05-2006, 10:59 AM
that number is the brain child of a GENIUS. this pissed me off for so long and i couldn't understand how to get the actual ISO out of that garbled number. thanks

raminia
04-05-2006, 11:11 AM
use [php tag instead of [quote for posting php scripts

kev_is_soaked
04-05-2006, 07:10 PM
Sorry Ramina, new to this :) Never used PHP before either, I'm a VB/ASP (Microsoft) guru :(

Joey, magic number... yah :) I actually gave up when I saw that it was giving me that huge number at first, then later, as I was checking a bunch of ISO2 markers in Ifranview I jotted them all down for several pics and divided by the pics actual ISO, they all came out at 65536 :)

While checking every photo on the site for the proper ISO reading, I came across one with an ISO of 650. I know my D50 never lets me shoot in anything but 200/400/800/1600, so I figured the 'fix' was gimped. I rechecked in Nikon Capture though and that photo actually DID capture at an ISO of 650 :) I was so happy to see that! It was in Portrait mode at the time so my guess is that some of the auto-modes in the D50 are capable of using in-between ISO's.... now if only I can hack the firmware to allow manual steps like that :)

Anyways I've done some extensive testing and it seems to be working 100% :)

Joe[y]
04-05-2006, 07:47 PM
now if only I can hack the firmware to allow manual steps like that :)

if you work that out be sure to tell me! that'd be great. hehe.

digitalfrog
10-05-2006, 03:02 PM
This does not seem to work for me for some reason. I use a Nikon D2X.

The value returned is very high, and doing a manual division by 65536 in a calculator returns the right value. I'm using the modified file from apr 5th..

really confusing....

has anyone got this working with a D2X (even though I don't think it's related)

Cheers

Ralph

blinking8s
10-07-2006, 08:49 AM
nikon has a tendency to let each camera carry different values and such in its exif info, so code for one model usually wouldnt work with another. This was a huge issue back in the earlier pixelpost days, but as new bodies come out code updates fall short till new users push their needs, not just with things like exifer and pixelpost, but many applications

guiz
10-07-2006, 05:53 PM
I have a Nikon D70s and in photoshop I don't see the ISO exif data on the file info, the field is blank
Guido

blinking8s
10-07-2006, 06:05 PM
I have a Nikon D70s and in photoshop I don't see the ISO exif data on the file info, the field is blank
Guido

you can u pdate the camera raw file for photoshop. its possible you dont see the iso data because your raw plugin is outdated, or you are using a old version of photoshop

http://www.adobe.com/products/photoshop/cameraraw.html