如何将原始数据存储在图像文件中?
我的文件中有一些原始数据,我想将其存储在图像文件中(bmp、jpg、png,甚至 gif (eegad))。我希望这是一个双向过程:我需要能够稍后可靠地将图像文件转换回来并获得与原始文件相同的文件。
我不是寻找隐写术的操作方法;图像文件可能是一个像素宽,数百万像素高,看起来像垃圾。那很好。
我研究了 Imagemagick 实用程序 convert
,但对大量选项和简洁的手册页感到害怕。我猜我可以用它来从“原始”黑色通道转换为 png,但必须指定一堆其他东西。有什么提示吗?我更喜欢在 Imagemagick 中工作或使用 Linux 实用程序。
如果你想知道的话,我的要求并没有什么黑帽子或斗篷和匕首的成分。我只是想自动将一些重要数据备份到照片共享网站。
I have some raw data in a file that I would like to store in an image file (bmp, jpg, png, or even gif (eegad)). I would like this to be a two way process: I need to be able to reliably convert the image file back later and get a file that is identical to the original file.
I am not looking for a how-to on steganography; the image file will probably be one pixel wide and millions of pixels high and look like garbage. That is fine.
I looked into the Imagemagick utility convert
, but am intimidated by the large number of options and terse man page. I am guessing I could just use this to convert from a 'raw' black channel to png, but would have to specify a bunch of other stuff. Any hints? I would prefer to work within Imagemagick or using Linux utilities.
If you are wondering, there's nothing black hat or cloak and dagger about my request. I simply want to automatically backup some important data to a photo-sharing site.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您愿意的话,我会深入研究 ImageMagick。
特定的图像格式支持不同程度地存储文本数据,ImageMagick 支持您提到的所有格式。我会选择一个可以让你存储你需要的东西的。
I'd plow into ImageMagick if that's what you'd prefer anyway.
Specific image formats support storing text data to different degrees, and ImageMagick supports all of the formats you mentioned. I'd choose the one that lets you store what you need.