使用Awesomium保存图像 [英] Saving Image Using Awesomium

查看:163
本文介绍了使用Awesomium保存图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Awesomium .NET 1.7.0.5并尝试从页面检索图像元素并将其保存到内存/磁盘中。在早期版本中,这可以通过调用webView.Render()来实现。但是我注意到他们在最近的版本中删除了它。有没有解决方法?

I'm using Awesomium .NET 1.7.0.5 and am trying to retrieve an image element from page and save it into memory/disk. In the earlier versions, this can be achieved by calling webView.Render(). However I noticed they have removed this in the recent releases. Is there any workaround for this?

注意:我不想重新下载图像,因此检索图像URL然后再次下载不是一种选择。

Note: I do not want to redownload the image, so retrieving the image URL then download it again is not an option.

推荐答案

您可以使用以下内容:

((BitmapSurface) view.Surface).SaveToPNG("c:\\temp\\Page.png");

最佳

这篇关于使用Awesomium保存图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆