调整图像大小的简单方法
2016-08-23
1 0 0
暂无评分
其他
如何获取积分?
翻译 maninwest@Codeforge 作者: Md. Marufuzzaman @ Codeproject
在web/Windows 应用程序中添加图像/签名很常用。这里介绍如何调整图像大小并保持图像质量。
使用代码
我写了个函数来调整大小 (即 “ImageResize”)。这个函数有 4 个参数:
- strImageSrcPath: 包含源文件路径的字符串
- strImageDesPath: 包含目标文件路径的字符串
- intWidth: 新图像宽度的整型值
- intHeight : 新图像高度整型值
Public Function ImageResize(ByVal strImageSrcPath As String _ , ByVal strImageDesPath As String _ , Optional ByVal intWidth As Integer = 0 _ , Optional ByVal intHeight As Integer = 0) As String If System.IO.File.Exists(strImageSrcPath) = False Then Exit Function
vb
相关源码推荐
学生管理系统
0
0
暂无评分
VB写的 FTP上传下载
0
0
暂无评分
qq批量登录
0
0
暂无评分
示例MSNPopup
0
0
暂无评分
密码管理软件
0
0
暂无评分
暂无评论