This commit is contained in:
2019-11-06 10:59:15 -08:00
parent ae18fbe5d2
commit c0a66072b7

View File

@@ -1228,7 +1228,7 @@ if (ask("Create spreads? (Y/n)") != "n") {
}
copy($lfile,$tmpleft); copy($rfile,$tmpright);
exec("exiftool -overwrite_original -n -Orientation=".$left[2]." ".$tmpleft."; exiftool -overwrite_original -n -Orientation=".$right[2]." ".$tmpright."; ");
exec("montage -label '%f' -font Helvetica -pointsize 20 -background '#000000' -fill 'white' -define jpeg:size=1000x1000 -geometry 1000x1000+2+2 -auto-orient ".$tmpleft." ".$tmpright." /tmp/contact_sheet_".$key.".jpg");
exec("montage -label '%f' -font Helvetica -pointsize 20 -background '#000000' -fill 'white' -define jpeg:size=1000x1000 -geometry 1000x1000+2+2 -auto-orient ".$tmpleft." ".$tmpright." ".$tmpdir."contact_sheet_".$key.".jpg");
$sheets[] = $tmpdir."contact_sheet_".$key.".jpg";
echo ".";
}
@@ -1419,7 +1419,7 @@ foreach ($tnfiles as $file) {
$done[$file][$nfile] = 1;
if ($file != $nfile && $diff < $walk && isset($done[$nfile][$file])) {
echo ".";
$distance = shell_exec("compare -metric phash ".$file." ".$nfile." /tmp/diffimage 2>&1");
$distance = shell_exec("compare -metric phash ".$file." ".$nfile." ".$tmpdir."diffimage 2>&1");
if ($distance < $threshold) {
$match[] = array($file, $nfile, $distance);
}