/////////////////////////////////////////////////////////////////////////////// // add/edit columns here /////////////////////////////////////////////////////////////////////////////// var COLUMNS = [ // col-name groupname tagname col-label justify default callback new Column("LensID", "Composite", "LensID", "Lens ID", "left", "-", GetLens), new Column("CropFactor", "Composite", "ScaleFactor35efl", "Crop Factor", "right", "", null), new Column("HFDistance", "Composite", "HyperfocalDistance", "HF Distance", "right", "", null), new Column("FocusMode", "Panasonic", "FocusMode", "Focus Mode", "left", "", null), new Column("Shutter", "Panasonic", "ShutterType", "Shutter", "left", "", null), new Column("Faces", "XMP-mwg-rs", "RegionName", "Faces", "left", "", null) //picasa face region names ]; /////////////////////////////////////////////////////////////////////////////// // callbacks to calculate own values /////////////////////////////////////////////////////////////////////////////// // GetLens(): return lens-id if missing, by testing for camera model function GetLens(tags, column){ if (column.value!="" && column.value!=column.defaultValue){ //prefilled column value is not empty and not equal to default, so the //exif tag was found. Use that tag value by returning it unchangedly. //Or maybe just beautify it by doing some string operations return column.value. replace("LUMIX","Lumix"). replace("VARIO","Vario"). replace("OLYMPUS M.","Olympus "); } try{ //column value is empty or default, try to return custom values based on //various exif informatiom if (tags["ExifIFD"]["FNumber"]=="0") return "Prime lens (manual)"; if (tags["IFD0"]["Model"]=="FC-S3"){ //we inject a crop factor information for this camera here as well, //to avoid another callback for the cropfactor column tags["Composite"]["ScaleFactor35efl"]="4.9"; return "Kyocera S3, 38-76mm, F2.8-3.5"; } if (tags["IFD0"]["Model"]=="DMC-FX01") return "FX-01 28-102mm F2.8-5.6"; if (tags["IFD0"]["Model"]=="DMC-FZ28") return "FZ-28 27-486mm F2.8-4.4"; if (tags["IFD0"]["Model"]=="DMC-FX77") return "FX-77 24-120mm F2.5-5.9"; if (tags["IFD0"]["Model"]=="DMC-FZ150") return "FZ-150 25-600mm F2.8-5.2"; if (tags["IFD0"]["Model"]=="DMC-FZ200") return "FZ-200 25-600mm F2.8"; } catch(e){} //still here, return the columns default value return column.defaultValue; } /////////////////////////////////////////////////////////////////////////////// // following code is not meant to be edited, but feel free to do so. o) /////////////////////////////////////////////////////////////////////////////// var shell = new ActiveXObject("WScript.Shell"); var fso = new ActiveXObject("Scripting.FileSystemObject"); String.prototype.lTrim = doLTrim; function doLTrim(){return this.replace(/^\s*/,'');} String.prototype.rTrim = doRTrim; function doRTrim(){return this.replace(/\s*$/,'');} String.prototype.trim = doTrim; function doTrim(){return this.lTrim().rTrim();} /////////////////////////////////////////////////////////////////////////////// function OnInit(data) { data.name = "Column.File: ExtendedEXIF"; data.desc = "Columns for extended/custom exif information."; data.copyright = "tbone in o8/2o14"; data.min_version = "11.5.1" data.version = "0.1"; data.default_enable = true; for (var c=0;c