Dim dlg As New FolderBrowserDialog If dlg.ShowDialog = DialogResult.Ok Then For Each f As String In FileSys.GetFiles(dlg.SelectedPath) Dim ifo As new FileInfo(f) Dim name As String = ifo.name.Replace(ifo.Extension, "") Dim file As String = dlg.SelectedPath & "\" & ifo.Name Dim img As image = getImage(file) Dim bmp = new bitmap(img, 110, 140) bmp.save ("d:\照片1\" & ifo.Name) bmp.Dispose Next End If
|