EXIF Nikon Model Barf on Scanned Photos
pashdown
Joined: 2007-02-22
Posts: 8 |
Posted: Fri, 2012-12-28 18:43 |
When displaying Nikon Coolscan images, there is an unsightly error warning that looks like this: "Notice: Undefined index: Model in /path/to/gallery2/modules/exif/lib/exifer/makers/nikon.inc on line 211" This is due to the fact that Coolscan EXIF has no "Model" information in it. I fixed it with this patch. Unfortunately, I don't know if it stops all Nikon Model information from being displayed, because I didn't test against any other Nikon photos. *** nikon.inc.old 2012-12-28 11:35:34.602777369 -0700 --- nikon.inc 2012-12-28 11:36:25.750782592 -0700 *************** *** 208,214 **** if($result['Endien']=="Intel") $intel=1; else $intel=0; ! $model = $result['IFD0']['Model']; //these 6 models start with "Nikon". Other models dont. if($model=="E700\0" || $model=="E800\0" || $model=="E900\0" || $model=="E900S\0" || $model=="E910\0" || $model=="E950\0") { --- 208,216 ---- if($result['Endien']=="Intel") $intel=1; else $intel=0; ! if (isset($result['IFD0']['Model'])) ! $model = $result['IFD0']['Model']; ! else $model=0; //these 6 models start with "Nikon". Other models dont. if($model=="E700\0" || $model=="E800\0" || $model=="E900\0" || $model=="E900S\0" || $model=="E910\0" || $model=="E950\0") { |
|
Posts: 8339
Seems to me there was another similar patch somewhere in these forums
Or better yet I think it was an updated exif package.
-s
________________________________
All New jQuery Minislideshow for G2/G3
Posts: 8
Let me know if there is a better way. The "exif" program on Ubuntu 12.04.1 shows no Model on Nikon Coolscan images.
Posts: 1642
While it is better not to have PHP notice warnings and the developer should ideally take care of preventing them, the real issue here is that a production server should not be configured to display such and you should change your php.ini file so that you have
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
for normal day to day use. This will show all errors, except for notices and coding standards warnings which are non-critical.--
dakanji.com