将(文本文件)转换为任何格式的图像(png)C++
有人可以给我提供一份 C++ 代码吗,用于将文本文件转换为任何格式的图像,我知道图像没有任何意义,但我这样做是出于安全原因,
有人可以给我提供一份 C++ 代码吗? ,如果没有C++,那么JAVA就可以工作
我在网上查了很多,并没有发现什么
我知道每个人都会说单独做你的工作,但我真的没有时间 拜托,这很严重 如果有人要
提前做的话我什至愿意付钱
can some one please provide me with a C++ code, for transforming a text file to any format of images, I know the image will have no meaning, but I am doing this thing for security reasons
can some one please provide me with a C++ code, if there is no C++ , then JAVA will work
I really checked alot on the net, and found really nothing
I know every one will say do ur job alone, but I am really out of time
please this is serious
I am even willing to pay if some one is goin to do it
thanx in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不知道您想要什么转换,但您可以将文本文件中的文本视为无符号字符数组,并将此数据作为 RGB 数组存储到 BMP 或其他无损压缩图像格式中。对于加载和保存图像,有很多库(OpenIL/DevIL 非常简单且有用)。
这样,图像没有任何意义,但仍然是有效图像,与仅更改文件扩展名不同。
编辑:你的运气我现在很无聊。以下内容可以使用 OpenIL 进行工作:
编辑:添加了测试程序的完整源代码。在我的 Windows 系统上使用此代码作为输入和 PNG 格式对其进行了测试,它可以工作。
I do not know, what you want the transformation to be, but you can just treat the text from the text file as an array of unsigned chars and store this data as an RGB array into a BMP or another lossless compressed image format. For loading and saving images there are a plenty of libraries (OpenIL/DevIL is quite simple and useful).
This way the image has no meaning but is still a valid image, in contrast to just changing the file extension.
EDIT: Your luck I'm currently bored. The following could work using OpenIL:
EDIT: Added complete sourcecode of test program. Tested it on my Windows system with this code as input and the PNG format and it works.
只需将文件扩展名更改为
.png
或任何您想要的。操作系统不知道文件中的内容及其含义;仅打开时使用什么程序。如果您需要安全性,我建议您阅读一些有关加密的内容。
Just change the file extension to
.png
or whatever you want. Operating systems have no notion of what's in a file and what it means; only what program to use when opening it.If you need security, I recommend reading up a bit on encryption.