//FFSubmenu=RAW
//FFName=Raw: Umwandlung nach jpg mit "PC" (om)
var fso = new ActiveXObject("Scripting.FileSystemObject");
rawconvert();
function rawconvert() {
// parameters via FF_GetParam() ??
var args =FF_GetParam().split("\r\n");
var argsOut = "";
// no, so we go the FF_GetImageName(i) way
if (args.length == 0 || args == 0) {
imagenum = FF_GetImageCount();
for(var i = 0; i<imagenum ;i++) {
args[i] = FF_GetImageName(i);
}
}
imagenum = args.length;
for ( var i in args) {
path = args[i];
splittedUp = SplitPath(path);
FF_SetProgressText(i, imagenum, splittedUp.file);
// add the original file to the output params
argsOut = argsOut + path + "\r\n";
if(splittedUp.ext.toLowerCase() == ".jpg" || splittedUp.ext.toLowerCase() == ".png") {
continue;
}
if (!FF_LoadRawImage(path, 4)) {
continue;
}
//FF_Gamma16(2.22);
//FF_BrightUpDown16(-246);
// alternativ ...
//FF_Gamma16(1.72);
FF_ColorTemp16(15);
FF_PerfectlyClear16(true, true, 2, true, 95, true, 100, true, 100, true);
//FF_SaveImage16(splittedUp.dir + splittedUp.file + ".tif");
FF_Convert16();
FF_SmartSharp(192, 0);
FF_GeoSharp(512)
//FF_3DSharp(70, 14);
var outName = splittedUp.dir + splittedUp.file + "-fixed.jpg";
FF_SaveImage(outName, 97);
argsOut = argsOut + outName + "\r\n";
// // IPTC info isn't taken from the thm files automatically. SO we do it by hand.
// // for some reason loading iptc from a thm file does not work properly
// // so I copy to a temporary jpg file
// var tmp = splittedUp.dir + splittedUp.file + "-TMPTMPTMPhgfhg.jpg";
// var thmfile = splittedUp.dir + splittedUp.file + ".thm";
// fso.CopyFile(thmfile,tmp);
// if (FF_LoadIPTC(tmp)) {
// FF_SaveIPTC(outName);
// }
// fso.DeleteFile(tmp);
FF_SetProgress(i+1, imagenum)
}
FF_SetParam(argsOut.substr(0, argsOut.length-2));
}
function SplitPath(path)
{
var fso = new ActiveXObject("Scripting.FileSystemObject");
var result = new Object();
result.dir = fso.GetParentFolderName(path) + "\\";
result.file = fso.GetBaseName(path);
result.ext = "." + fso.GetExtensionName(path);
return result;
}
//FFSubmenu=RAW
//FFName=Raw: Umwandlung nach jpg mit "PC" (om)
var fso = new ActiveXObject("Scripting.FileSystemObject");
rawconvert();
function rawconvert() {
// parameters via FF_GetParam() ??
var args =FF_GetParam().split("\r\n");
var argsOut = "";
// no, so we go the FF_GetImageName(i) way
if (args.length == 0 || args == 0) {
imagenum = FF_GetImageCount();
for(var i = 0; i<imagenum ;i++) {
args[i] = FF_GetImageName(i);
}
}
imagenum = args.length;
for ( var i in args) {
path = args[i];
splittedUp = SplitPath(path);
FF_SetProgressText(i, imagenum, splittedUp.file);
// add the original file to the output params
argsOut = argsOut + path + "\r\n";
if(splittedUp.ext.toLowerCase() == ".jpg" || splittedUp.ext.toLowerCase() == ".png") {
continue;
}
if (!FF_LoadRawImage(path, 4)) {
continue;
}
//FF_Gamma16(2.00);
// hier kommt eine leichte Aufhellung, die ich für meine Canon-CR2-Bilder brauche, um die Helligkeit eines Vergleichs-JPG zu erreichen
FF_BrightUpDown16(595);
// Der S-Kontrast16 ist nötig, damit die Kamera-Kontrasteinstellung, die ich auf besonders gering gestellt habe, ein wenig kompensiert wird
FF_SContrast16(0.65);
//FF_AutoContrast16();
// alternativ ...
//FF_Gamma16(1.72);
//FF_ColorTemp16(15);
//FF_PerfectlyClear16(true, true, 2, true, 95, true, 100, true, 100, true);
// hier wird das Bild mit den obigen Korrekturen unter gleichem Namen als 16bit-Tiff gespeichert.
FF_SaveImage16(splittedUp.dir + splittedUp.file + ".tif");
// hier wird das Bild nach 8bit konvertiert
FF_Convert16();
// auf das 8bit-Bild wird Kanten schärfen mit den Volle-Pulle-Werten ausgeführt. Auch hier schärfe ich in der Kamera möglichst überhaupt nicht
FF_SmartSharp(192, 16);
//FF_GeoSharp(512)
//FF_3DSharp(70, 14);
// hier entsteht der neue Dateinamen für das JPG
var outName = splittedUp.dir + splittedUp.file + "-fixed.jpg";
// jetzt wird das JPG gespeichert
FF_SaveImage(outName, 97);
argsOut = argsOut + outName + "\r\n";
// // IPTC info isn't taken from the thm files automatically. SO we do it by hand.
// // for some reason loading iptc from a thm file does not work properly
// // so I copy to a temporary jpg file
// var tmp = splittedUp.dir + splittedUp.file + "-TMPTMPTMPhgfhg.jpg";
// var thmfile = splittedUp.dir + splittedUp.file + ".thm";
// fso.CopyFile(thmfile,tmp);
// if (FF_LoadIPTC(tmp)) {
// FF_SaveIPTC(outName);
// }
// fso.DeleteFile(tmp);
FF_SetProgress(i+1, imagenum)
}
FF_SetParam(argsOut.substr(0, argsOut.length-2));
}
function SplitPath(path)
{
var fso = new ActiveXObject("Scripting.FileSystemObject");
var result = new Object();
result.dir = fso.GetParentFolderName(path) + "\\";
result.file = fso.GetBaseName(path);
result.ext = "." + fso.GetExtensionName(path);
return result;
}
var outName = splittedUp.dir + splittedUp.file + ".jpg";
//FF_SaveImage16(splittedUp.dir + splittedUp.file + ".tif");
FF_ColorTemp16(15);
FF_PerfectlyClear16(true, true, 2, true, 95, true, 100, true, 100, true);
FF_Convert16();
FF_SmartSharp(192, 0);
FF_GeoSharp(512)
//FFSubmenu=RAW
//FFName=Raw: Umwandlung nach tif und jpg mit "Xe847"
//***************************************************
// Namensanhängsel für die zu speichernden Dateien
// Standardeinstellung: "Bild.raw" wird als "Bild-ff.tif" und "Bild-ff.jpg" gespeichert
//***************************************************
// Namenszusatz für die zu speichernde JPG-Datei
var jpgNamenszusatz = "-ff";
// Namenszusatz für die zu speichernde TIFF-Datei
var tifNamenszusatz = "-ff";
var fso = new ActiveXObject("Scripting.FileSystemObject");
// Schleife über alle markierten Bilder
var imagenum = FF_GetImageCount();
for(var i = 0; i<imagenum ;i++) {
var path = FF_GetImageName(i);
var splitPath = SplitPath(path);
// Überspringen, was nicht nach Raw aussieht
if(splitPath.ext.toLowerCase() == ".jpg" ||
splitPath.ext.toLowerCase() == ".bmp" ||
splitPath.ext.toLowerCase() == ".png") {
continue;
}
// Bildname im Fortschrittsbalken anzeigen
FF_SetProgressText(i, imagenum, splitPath.file);
//***************************************************
// Raw-Bild laden und konvertieren.
//
// Der zweite Parameter ist eine Summe von
// 1 = Halbe Größe
// 2 = autom. Weißabgleich
// 4 = Kameraweißabgleich
// 8 = RGGB als 4 Farbe interpretieren
// 16 = Bild nach links drehen
// 32 = Bild nach rechts drehen
// 64 = Rauschunterdrückung
// 128 = Stuckpixelbeseitigung
//
// Bsp: "Automatischer Weißabgleich" + "RGGB als 4 Farbe interpretieren"
// + "Rauschunterdrückung" ->
// FF_LoadRawImage(path, 2 + 8 + 64, 2.0, 4.0, "")
//
// Die Parameter 3 und 4 sind nur bei aktiver Rauschunterdrückung (64) von Bedeutung (domain + range)
// Der letzte Parameter ist nur bei aktiver Stuckpixelbeseitigung (128) von Bedeutung (stuckfile)
//
// Vor V2.84 B42 gab es die Zusatzparameter noch nicht: FF_LoadRawImage(path, 4)
//
// Standardmäßig wird hier nur der Kameraweißabgleich verwendet:
//***************************************************
if (!FF_LoadRawImage(path, 4, 2.0, 4.0, "")) {
continue; // Raw-Konversion ist fehlgeschlagen, gehe zum nächsten Bild
}
//***************************************************
//***************************************************
// Bearbeitungen im 16-Bit-Modus
// standardmäßig wird hier Xe847 aufgerufen
//***** Ende der Raw-Konversion **************************
// Automatische Bildoptimierung mit Xe47
FF_Xe847Enhanced16(100, 100, 100, 100, 100, 0, 0, 0);
// Alternative 1: "Perfectly Clear"
//FF_PerfectlyClear16(true, true, 2, true, 95, true, 100, true, 100, true);
// Alternative 2: Kontrastautomatik
//FF_AutoContrast16();
// Alternative 3: Variante "Kuni"
// hier kommt eine leichte Aufhellung, die ich für meine Canon-CR2-Bilder
// brauche, um die Helligkeit eines Vergleichs-JPG zu erreichen
// FF_BrightUpDown16(595);
// Der S-Kontrast16 ist nötig, damit die Kamera-Kontrasteinstellung,
// die ich auf besonders gering gestellt habe, ein wenig kompensiert wird
// FF_SContrast16(0.65);
//***** Ende der 16-Bit-Bearbeitung************************
// Bild mit den obigen Korrekturen mit Namenszusatz als 16bit-Tiff speichern
FF_SaveImage16(splitPath.dir + splitPath.file + tifNamenszusatz + ".tif");
// Bild nach 8bit konvertieren
FF_Convert16();
//***************************************************
// Bearbeitungen im 8-Bit-Modus
// beispielsweise könnte man hier Schärfen.
//***************************************************
// volle Pulle Kanten schärfen
FF_SmartSharp(192, 16);
// Alternativ: Mittelstarkes 3D-Schärfen
// FF_3DSharp(70, 14);
// Auch 'ne Option: volle Pulle Schärfen durch Verformen
// FF_GeoSharp(512) ;
//***** Ende der 8-Bit-Bearbeitung*************************
// hier entsteht der neue Dateiname für das JPG
var outName = splitPath.dir + splitPath.file + jpgNamenszusatz + ".jpg";
// jetzt wird das JPG gespeichert
FF_SaveImage(outName, 97);
// Fortschritt melden
FF_SetProgress(i+1, imagenum)
}
// Zerteilt einen Bild-Dateinamen in sein Pfadbestandteile
function SplitPath(path) {
var fso = new ActiveXObject("Scripting.FileSystemObject");
var result = new Object();
result.dir = fso.GetParentFolderName(path) + "\\";
result.file = fso.GetBaseName(path);
result.ext = "." + fso.GetExtensionName(path);
return result;
}
// Exif-Daten aus gleichnamigem JPG lesen
if (!FF_LoadExif(splitPath.dir + splitPath.file + ".jpg")) {
continue; // hat nicht funktioniert
}
// Exif-Daten in das resultierende JPG schreiben
FF_SaveExif(outName);