更新时间:2022-11-05 20:57:50
尝试一下,
从 .NET Targa图像阅读器下载源代码 [
Try this,
Download the source from .NET Targa Image Reader[^]
Include the TargaImage.dll in bin folder and reference it to the project,
In aspx code,
<asp:Image ID="Image1" ImageUrl="~/Handler.ashx" runat="server" />
在Handler.ashx,
中
using System.Drawing;
In Handler.ashx,
using System.Drawing;
Bitmap tga = Paloma.TargaImage.LoadTargaImage(@"C:/my folder/TargaReaderDemo/Image/img.tga");
Response.ContentType = "image/jpeg";
tga.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
请参阅此CodeProject文章: ^ ].—SA
Please see this CodeProject article: .NET Targa Image Reader[^].—SA