如何使用 ColdFusion 将 BASE64 编码的 HTML 转换为 GIF?
我从 WebService 接收到 BASE64 编码的字符串。该字符串代表一个 HTML 页面,我可以使用内置的 ColdFusion 函数来转换和显示它。但是,我需要 HTML 页面的 GIF 表示,我想知道是否有任何方法可以使用 ColdFusion 来做到这一点。
注意:我正在处理的网站是 ColdFusion 8。
更新:事实证明,供应商给了我不正确的说明(与他们的文档不同)。我不需要输出他们发送的文档的 GIF,所以现在这不是问题。然而,由于这个问题已经收到了 6 票赞成,我将把它保留为开放状态,因为我很好奇有一天是否会有 - 或将会有 - 答案。
I am receiving a BASE64 encoded string from a WebService. The string represents an HTML page, and I can use built-in ColdFusion functions to convert and display it. However, I need a GIF representation of the HTML page, and I'm wondering if there's any way to do this using ColdFusion.
NOTE: The website I'm working on is ColdFusion 8.
UPDATE: As it turns out, the vendor gave me incorrect instructions (different from their documentation). I don't need to output a GIF of the document they are sending, so this is a non-issue now. However, seeing as the question has received 6 upvotes already, I'm going to leave the it open, as I'm curious if there is - or will be - an answer someday.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以将 html 保存到文件系统,并使用此技术创建 网址缩略图
You could save the html to the file system, and use this technique for creating URL Thumbnails
由于 CFIMAGE 的 writeToBrowser 不允许您输出 GIF(您无疑已经发现了),因此您必须获取图像并将其作为 gif 保存到文件系统,然后编写指向该图像的 HTML IMG 标记GIF 文件。
Since CFIMAGE's writeToBrowser doesn't allow you to output a GIF (as you've no doubt found out), you'd have to take the image and save it to the filesystem as a gif, then write an HTML IMG tag pointing to that GIF file.
您无法编写 gif,但可以采用 base64 并将其作为 png 写入浏览器。
You can't write a gif but you can take the base64 and write it to the browser as a png.