以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 请问如何获取widows本地图片的缩略图? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=158526) |
-- 作者:有点蓝 -- 发布时间:2020/11/23 14:19:00 -- 全局代码 Public Function ThumbnailCallback() As Boolean Return False End Function Public Function GetReducedImage(file As String, Width As Integer, Height As Integer) As Image Try Dim ReducedImage As Image Dim ResourceImage As image = Image.FromFile(file ) Dim callb As Image.GetThumbnailImageAbort = New Image.GetThumbnailImageAbort(AddressOf ThumbnailCallback) ReducedImage = ResourceImage.GetThumbnailImage(Width, Height, callb, IntPtr.Zero) Return ReducedImage Catch e As Exception msgbox(e.Message) Return Nothing End Try End Function 命令窗口 Dim img As image = GetReducedImage("D:\\Pictures\\123.jpg",50,50) Output.Show(img is nothing) |
-- 作者:有点蓝 -- 发布时间:2020/11/23 15:02:00 -- 如果图片很大,没有办法。foxtable不是专业的图像处理软件 |
-- 作者:有点蓝 -- 发布时间:2020/11/23 15:21:00 -- windows一样要处理过,然后生成了专门的缩略图文件。foxtable没有办法读取这个缩略图文件 |