Foxtable(狐表)用户栏目专家坐堂 → 文件压缩求助


  共有3698人关注过本帖平板打印复制链接

主题:文件压缩求助

帅哥哟,离线,有人找我吗?
yifan3429
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:九尾狐 帖子:2466 积分:22761 威望:0 精华:0 注册:2011/3/29 17:14:00
文件压缩求助  发帖心情 Post By:2022/3/7 22:16:00 [只看该作者]

 Dim e As RequestEventArgs = args(0)
For Each dr As DataRow In DataTables("图库_木作定制").DataRows
    Dim file As String = dr("原始_文件地址")
    Dim img As image = getImage(file)
    Dim bmp As bitmap
    If img.width > 400 Then
        If 400 * (img.height / img.width) > 600 Then
            bmp = new bitmap(img, 400*(600/(800*(img.height/img.width))), 600)
        Else
            bmp = new bitmap(img, 400, 400 * (img.height / img.width))
        End If
    End If
    bmp.save("D:\data\slt\" & dr("原始_文件夹") & "\" & FileSys.GetName(e.FileName))
这个就是存到新的目录下,代码报错,求助老师
Next

 回到顶部
总数 12 1 2 下一页