Using IrfanView on multiple images
Posted: 17 Aug 2021 01:56
Hi everyone, I have a script containing pieces of code that use IrfanView to work with image files. The problem is they only work for one file no matter how may are selected and I can't, for the life of me, figure out how to loop them for multiple files. Any help would be greatly appreciated. TIA :grin:
Code: Select all
"Convert To PNG"
run """C:\PortableApps\IrfanView\i_view32.exe"" <curitem> /resample /convert=""<curpath>\<curbase>.png"" /killmesoftly",,1;
"Convert To JPG"
run """C:\PortableApps\IrfanView\i_view32.exe"" <curitem> /resample /convert=""<curpath>\<curbase>.jpg"" /killmesoftly",,1;
"Convert To {input}"
$format = input("Enter Format to be converted to.",,,s);
run """C:\PortableApps\IrfanView\i_view32.exe"" <curitem> /resample /convert=""<curpath>\<curbase>.$format"" /killmesoftly",,1;
"Resize - maintain aspect ratio"
$w = input("Enter new Width","Leave as 0 if new Height is to be entered.",0,s);
$h = input("Enter new Height","Leave as 0 if new Width has already been entered.",0,s);
run """C:\PortableApps\IrfanView\i_view32.exe"" <curitem> /resize=($w,$h) /resample /aspectratio /convert <curitem> /killmesoftly",,1;
"Resize - ignore aspect ratio"
$w = input("New Width",,,s);
$h = input("New Height",,,s);
run """C:\PortableApps\IrfanView\i_view32.exe"" <curitem> /resize=($w,$h) /resample /convert <curitem> /killmesoftly",,1;
"Create multipage PDF from input files"
copytext get("SelectedItemsNames", ",");
run """C:\PortableApps\IrfanView\i_view32.exe"" /multipdf=(<curpath>\test.pdf,<clipboard>)";
"Slideshow"
$imagesfolder = inputfolder("C:\ABBA\ABBA Pics\_Wallpaper\Wallpaper 1366x768", "Select folder for slideshow");
run """C:\PortableApps\IrfanView\i_view32.exe"" /slideshow=""$imagesfolder""" /closeslideshow,,1;
"Get image info"
$txt = "<curpath>\<curbase>info.txt";
run """C:\PortableApps\IrfanView\i_view32.exe""<curitem> /info=$txt /killmesoftly",,1;
open "$txt";