本帖最后由 pcl_test 于 2015-7-25 11:56 编辑
- <!-- :
- @echo off
- md ".\处理结果\" 2>nul
- dir /b *.jpg|mshta "%~f0"
- ping -n 2 0 >nul&exit /b
- -->
-
- <script language=vbs>
- Dim Img,IP,file
- Set fso = CreateObject("Scripting.FileSystemObject")
- Set StdIn = fso.GetStandardStream(0)
- Do While StdIn.AtEndOfStream<>true
- Set Img = CreateObject("WIA.ImageFile")
- Set IP = CreateObject("WIA.ImageProcess")
- file = StdIn.ReadLine
- Img.LoadFile file
- If Img.Height>305 Then
- IP.Filters.Add IP.FilterInfos("Crop").FilterID
- IP.Filters(1).Properties("Top") = 100
- IP.Filters(1).Properties("Bottom") = 200
- Set Img = IP.Apply(Img)
- Img.SaveFile ".\处理结果\"&file
- End If
- Loop
- Msgbox "完成!"
- </script>
- <script>close()</script>
复制代码
|