- 'Windows Image Acquisition Automation Library v2.0 Tool
- 'http://www.microsoft.com/download/en/details.aspx?id=18287
-
- 'Author: Demon
- 'Date: 2011/12/3
- 'Website: http://demon.tw
-
- Const PicturePath = "C:\Picture"
-
- Set Img = CreateObject("WIA.ImageFile")
- Set IP = CreateObject("WIA.ImageProcess")
- Set fso = CreateObject("scripting.filesystemobject")
-
- For Each file In fso.GetFolder(PicturePath).Files
- name = file.Name
- file.Name = file.Name & ".bak"
- Img.LoadFile file.Path
- IP.Filters.Add IP.FilterInfos("RotateFlip").FilterID
- IP.Filters(1).Properties("RotationAngle") = 270
- Set Img = IP.Apply(Img)
- Img.SaveFile file.ParentFolder.Path & "\" & name
- Next
复制代码
|