使用 GTK 显示来自 URL 的图像[REPEAT]
我有一件事有问题。我搜索了有关使用 cairo 或 gtk 从 url 显示图像的信息,但没有找到任何内容。 如果这是不可能的,也许我可以使用其他结构来分解图像 库,然后加载它。
有什么想法可以做吗?
I have a problem with one thing. I searched about show an image from an url with cairo or gtk, but I didn't find anything.
If this is not possible, maybe I could decompose an image in a structure using other
library, and then load it.
Any idea for do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
GTK+ 不实现 HTTP 协议客户端,而从 URL 获取实际图像位需要该客户端。
您可能想考虑使用专用库来完成该任务,例如 libcurl。
GTK+ does not implement a HTTP protocol client, which would be needed in order to get the actual image bits from a URL.
You might want to look into using a dedicated library for that task, such as libcurl.