Inside my WebKitGTK+ widget, I want to transparently replace some of the images of an HTML page with different image data I hold in memory.

According to the documentation at http://webkitgtk.org/reference/webkitgtk/stable/webkitgtk-webkitwebview.html#WebKitWebView-resource-request-starting, I've hooked into this signal, which allows the request URI to be changed, but what I really want is to leave it unchanged but generate my own response.

I've tried filling out the WebKitWebResource parameter, and filling out the SoupMessage response from the WebKitNetworkRequest to no avail. Anyone know how to do this?

有帮助吗?

解决方案

figured out one way to do it: replacing the request URL with "data:image/jpeg;base64,[inline data]".

Will do for me.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top