Hi again highend, I messed up big time on my last post. When I deleted out some old comments on each if and else line, I also unintentionally deleted out the "input" line code (you were probably wondering where the "$a" came from). The following is what I should have posted. I like what you sent, but at the same time, I do want to have the flexibility of adjusting the crop vertically. I actually find myself adjusting the crop from simply centered quite a bit.
Code: Select all
"IrfanView Photo Crop to 16x9|D:\Graphics\Icons\k321-icon-218.ico";
$d = property(dimensions, <curitem>);
$g_IrfanPath="d:\graphics\irfanView\i_view32.exe";
if ($d == "4320 x 3240") {
$a = input("Crop offset y value from 0,0","Enter number from 1 to 810 (405 centers crop vetically)." ,405, "m",,300,250);
run """$g_IrfanPath"" ""<curitem>"" /aspectratio /jpgq=100 /resample /crop=(0,$a,4320,2430) /convert=<curpath>\<curbase>_16x9.<curext>", , 2,0;
end
}
elseif ($d == "3888 x 2592") {
$a = input("Crop offset y value from 0,0","Enter number from 1 to 405 (203 centers crop)." ,203, "m",,300,250);
run """$g_IrfanPath"" ""<curitem>"" /aspectratio /jpgq=100 /resample /crop=(0,$a,3888,2187) /convert=<curpath>\<curbase>_16x9.<curext>", , 2,0;
end
}
elseif ($d == 3240 x 4320) {
$a = input("Crop offset y value from 0,0","Enter number from 1 to 2498 (1248 centers crop)." ,1248, "m",,300,250);
run """$g_IrfanPath"" ""<curitem>"" /aspectratio /jpgq=100 /resample /crop=(0,$a,3240,1822) /convert=<curpath>\<curbase>_16x9.<curext>", , 2,0;
end
}
elseif ($d == 2592 x 3888) {
$a = input("Crop offset "y" value from 0,0","Enter number from 1 to 2430 (1215 is centered)." ,1215, "m",,300,250);
run """$g_IrfanPath"" ""<curitem>"" /aspectratio /jpgq=100 /resample /crop=(0,$a,2592,1458) /convert=<curpath>\<curbase>_16x9.<curext>", , 2,0;
end
}
elseif ($d == 2432 x 4320) {
$a = input("Crop offset "y" value from 0,0","Enter number from 1 to 2952 (1476 centers crop)." ,1476, "m",,300,250);
run """$g_IrfanPath"" ""<curitem>"" /aspectratio /jpgq=100 /resample /crop=(0,$a,2432,1368) /convert=<curpath>\<curbase>_16x9.<curext>", , 2,0;
end
}
Else {
end
}
"-"
"IrfanView Photo Crop to 8x5|D:\Graphics\Icons\k321-icon-219.ico";
$g_IrfanPath="d:\graphics\irfanView\i_view32.exe";
$d = property(dimensions, <curitem>);
if ($d == "4320 x 3240") {
$a = input("Crop offset y value from 0,0","Enter number from 1 to 540 (270 centers crop vertically)." ,270, "m",,300,250);
run """$g_IrfanPath"" ""<curitem>"" /aspectratio /jpgq=100 /resample /crop=(0,$a,4320,2700) /convert=<curpath>\<curbase>_8x5.<curext>", , 2,0;
end
}
elseif ($d == "3888 x 2592") {
$a = input("Crop offset y value from 0,0",Enter number from 1 to 162 (81 centers crop vertically)." ,81, "m",,300,250);
run """$g_IrfanPath"" ""<curitem>"" /aspectratio /jpgq=100 /resample /crop=(0,$a,3888,2430) /convert=<curpath>\<curbase>_8x5.<curext>", , 2,0;
end
}
bla, bla, bla...converting the same size photos to an 8x5 (1920x1200) vs 16x9 (1920x1080)...
Hopefully, I can work in your ideas and code with the input flexibility.