Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' Nioi Pier Giuliano
- ' http://piergiu.wordpress.com/
- ' purpose of this script:
- ' resizes images with irfanview and saves them in the script folder
- '----------------------DO NOT modify this----------------------------
- set objShell = wscript.createObject("wscript.shell")
- set objFSO = CreateObject("Scripting.FileSystemObject")
- DIM pt1,pt2,pt3,all,width,height,installationPath
- '--------------------------------------------------------------------
- '-----------------PLEASE DO modify this at your needs----------------
- width = 800
- height = 600
- installationPath = "C:\Program Files\IrfanView\"
- '--------------------------------------------------------------------
- '----------------------DO NOT modify this----------------------------
- pt1 = "CMD /C " & """" & installationPath & "i_view32.exe" & """"
- pt2 = " /resize=(" & width & "," & height & ") /convert="
- '----------- USE the following pt2 instead of the previous pt2 to keep aspect ratio of the image ------------
- '-- pt2 = " /resample=(" & width & "," & height & ") /aspectratio /convert="
- scriptFolder = objFSO.GetParentFolderName(Wscript.ScriptFullName)
- For Each a In WScript.Arguments
- set objFile = objFSO.GetFile(a)
- pt3= scriptFolder & "\" & objFSO.GetBaseName(objFile) & "_rid." & objFSO.GetExtensionName(objFile)
- all= pt1 & " " & a & pt2 & pt3
- iReturn = objShell.Run(all, , True)
- 'WScript.Echo all
- Next
- '--------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement