.NET 创建动态缩略图

.NET 创建动态缩略图,第1张

概述.NET 创建动态缩略图

下面是内存溢出 jb51.cc 通过网络收集整理的代码片段。

内存溢出小编现在分享给大家,也给大家做个参考。

    Function CreateJPEGthumbnail(ByVal inSourcefile As String,ByVal inDestinationfile As String,ByVal ThumbWIDth As Integer,ByVal ThumbHeight As Integer) As Boolean             Dim imagefile As System.Drawing.Image        Dim outputFstream As New fileStream(inSourcefile,fileMode.Open,fileAccess.Read)         'Exposes a System.IO.Stream around a file,supporting both synchronous and asynchronous read and write operations.        Dim ImageAbortCallBack As System.Drawing.Image.GetthumbnailImageAbort         'This method returns true if it decIDes that the System.Drawing.Image.GetthumbnailImage method should prematurely stop execution; otherwise,it returns false.        imagefile = System.Drawing.Image.FromStream(outputFstream)        ImageAbortCallBack = New System.Drawing.Image.GetthumbnailImageAbort(AddressOf ImageAbortDummyCallback)        imagefile = imagefile.GetthumbnailImage(ThumbWIDth,ThumbHeight,ImageAbortCallBack,IntPtr.Zero)         'IntPtr = A platform-specific type that is used to represent a pointer or a handle.        imagefile.Save(inDestinationfile,System.Drawing.Imaging.ImageFormat.Jpeg)        outputFstream.Close()        outputFstream = nothing        imagefile = nothing    End Function

以上是内存溢出(jb51.cc)为你收集整理的全部代码内容,希望文章能够帮你解决所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

总结

以上是内存溢出为你收集整理的.NET 创建动态缩略图全部内容,希望文章能够帮你解决.NET 创建动态缩略图所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1275281.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-08
下一篇 2022-06-08

发表评论

登录后才能评论

评论列表(0条)

保存