Index: include/import.php
===================================================================
--- include/import.php (revision 1554)
+++ include/import.php (working copy)
@@ -1015,7 +1015,23 @@
if (!is_executable($sys_ufraw))
return FALSE;
- // XXX $camera_input_profile..
+ $options = "";
+
+ if ($camera_input_profile != FALSE && $camera_input_profile != "") {
+ $temporary_config_file = tempnam($tmp_volume_path, "po");
+ $output_file=fopen($temporary_config_file,"w");
+ fwrite($output_file,"\n");
+ fwrite($output_file,"\n");
+ fwrite($output_file,"Profile\n");
+ fwrite($output_file," ".$camera_input_profile."\n");
+ fwrite($output_file,"\n");
+ fwrite($output_file,"\n");
+ fwrite($output_file,"\n");
+ fwrite($output_file,"\n");
+ fclose($output_file);
+ $options = $options . " --conf=$temporary_config_file";
+ }
+
$curve = "camera"; // curve == linear/camera/filename
$exposure = "auto"; // exposure compensation
@@ -1036,7 +1052,7 @@
print "
".sprintf($strings['import']['decoding_raw_using'], 'ufraw')." ... ";
}
- $options = " --exposure=$exposure --gamma=$gamma --linearity=$linearity --interpolation=ahd $curve";
+ $options = $options . " --exposure=$exposure --gamma=$gamma --linearity=$linearity --interpolation=ahd $curve";
switch ($po_options['raw_white_balance']) {
case "automatic":
$options = $options . " --wb=auto";
@@ -1067,6 +1083,8 @@
print "".$strings['generic']['failed'].".";
print "$cmdline
";
}
+ unlink($temporary_config_file);
+
return FALSE;
}
@@ -1077,6 +1095,8 @@
print $strings['generic']['done'].".";
flush();
}
+
+ unlink($temporary_config_file);
return $temporary_file_name;
}