0
A
回答
0
不,在ASP.NET
Panel控件中没有DrawToBitmap
方法。不用说,你不能在你的ASP.NET项目中引用Windows窗体程序集来实现这一点。
你得到的最好的照片是将所有这些图像合并成一个。下面是一个示例C#代码...
public static System.Drawing.Bitmap Combine(string[] files)
{
//read all images into memory
List<System.Drawing.Bitmap> images = new List<System.Drawing.Bitmap>();
System.Drawing.Bitmap finalImage = null;
try
{
int width = 0;
int height = 0;
foreach (string image in files)
{
//create a Bitmap from the file and add it to the list
System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(image);
//update the size of the final bitmap
width += bitmap.Width;
height = bitmap.Height > height ? bitmap.Height : height;
images.Add(bitmap);
}
//create a bitmap to hold the combined image
finalImage = new System.Drawing.Bitmap(width, height);
return finalImage;
}
catch(Exception ex)
{
if (finalImage != null)
finalImage.Dispose();
throw ex;
}
finally
{
//clean up memory
foreach (System.Drawing.Bitmap image in images)
{
image.Dispose();
}
}
}
0
你可以上呈现使用WebBrowser控件的方法WebBrowser.DrawToBitmap位图的结果。
见与返回的网页的位图表示的例子此链接:
http://pietschsoft.com/post/2008/07/c-generate-webpage-thumbmail-screenshot-image
+0
这是否适用于不同的Web浏览器? – MMakati
相关问题
- 1. 将面板保存为图像
- 2. 将JPanel另存为图像
- 3. 将图形另存为图像?
- 4. 拖放图像从一个面板到另一个asp.net + jquery的
- 5. JavaScript将元素另存为图像或Extjs 4.x另存为图像
- 6. 面板内的ASP.NET图像控制
- 7. 在小面板中的大图像(图像在面板外面)
- 8. 如何将面板中的图形(如矩形,圆形)保存为图像?
- 9. 如何将图像“打印”到ASP.NET更新面板页面?
- 10. GWT以编程方式将面板保存为图像
- 11. 如何将面板保存为摆动图像?
- 12. 将WPF UserControl另存为矢量图像
- 13. 将GoogleGraph另存为矢量图像
- 14. 将画布另存为图像
- 15. 将画布另存为图像Internet Explorer
- 16. JIT Spacetree将标签另存为图像
- 17. 将页面内容另存为图像文件
- 18. 如何将我的Graphics.Drawline绘图在面板上转换为保存的图像?
- 19. Pygame - 将表面作为图像存储
- 20. 将另一幅图像放在另一幅图像的前面
- 21. 如何将图像从一个面板拖动到另一个面板
- 22. 将页面另存为XML
- 23. 在面板上绘图,另存为位图
- 24. 如何将int自动转换为DataGrid中的图像面板?
- 25. 如何将背景图像设置为Bada 2.0中的面板
- 26. 如何将我的表单中的面板保存为图片?
- 27. 将画布保存为ASP.net中的服务器的图像
- 28. 将图像存储在sql server中 - ASP.NET
- 29. 如何在Java中保存绘图面板中的图像?
- 30. 将图保存为rCharts中的图像
但如果我有不同的possitions因为我创建一个拖放图像。 – MMakati
您可以随时收集图像名称和位置,然后将其发送到服务器进行处理 – Leo