且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从SQL表ASP.NET检索图像,C#

更新时间:2023-02-14 10:33:52

请参见以下线程:

如何使用asp.net(c#)的护照大小 [
See the following thread:

How to store and retrieve image in sql server with asp.net (c#) for passport size[^]


查看这些链接,您可能会有所了解
http://www.dotnetcurry.com/ShowArticle.aspx?ID=129 [ ^ ]
http://www.aspsnippets.com/Articles/SQL Server的显示图像-使用ASP.Net.aspx的数据库 [
See these link you may get some idea
http://www.dotnetcurry.com/ShowArticle.aspx?ID=129[^]
http://www.aspsnippets.com/Articles/Display-Images-from-SQL-Server-Database-using-ASP.Net.aspx[^]


使用以下代码.....

昏暗bPictureInByte()为字节= DataSet.Tables(0).Rows(0).Item(0)
昏暗的mStream作为新System.IO.MemoryStream(bPictureInByte)
昏暗_bmpDrawing作为新Drawing.Bitmap(mStream)
_bmpDrawing.Save(Application.StartupPath +"\ Temp \ FullScaleDrawing.jpg"
use the following code.....

Dim bPictureInByte() As Byte = DataSet.Tables(0).Rows(0).Item(0)
Dim mStream As New System.IO.MemoryStream(bPictureInByte)
Dim _bmpDrawing As New Drawing.Bitmap(mStream)
_bmpDrawing.Save(Application.StartupPath + "\Temp\FullScaleDrawing.jpg"