将文本嵌入PNG [英] Embed text into PNG
问题描述
我正在寻找一种工具,让我可以在PNG文件中嵌入json格式的信息。
I'm looking for a tool that'd let me embed json-formatted information inside a PNG -file.
到目前为止它已经非常安静了。我是否必须自己编写?
This far it's been quite quiet. Do I have to write it myself?
我对使用javascript做这件事特别感兴趣。我从画布中提取 toDataURL
-method。
I'd be especially interested of doing it with javascript. Into an image I extract from a canvas with toDataURL
-method.
推荐答案
如果您想嵌入文本,您可能需要查看此内容,其中来自 PNG 规范。这似乎有点复杂。
If you want to embed text you may want to look at this in particular, which comes from the PNG specification. It seems a little on the complicated side.
简单隐写方法看起来更简单。
The "easy" steganographic method looks a little more simple.
实际上更适合您的目的是创建一个包含图像数据和JSON数据 - 然后只需将对象传递到您需要的任何地方。
What may actually be better suited for your purpose is to create a javascript object that contains the image data and the JSON data - then just pass that object around wherever you need it.
这篇关于将文本嵌入PNG的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!