本文介绍了如何编码和解码图像文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好, 我正在尝试对图像文件进行编码,该图像文件在编码后将变为黑色,然后通过输入密码(由用户设置)来对其进行解码. 有人可以帮我吗? 谢谢!!!!
Hello, I''m tring to encode an image file that after the encoding the image will be black and decode it by entering a password (that set by the user). Can anyone help me with that? Thanks!!!!
推荐答案简单, 0)使用奇特的算法对图像进行编码((由于我们对图像进行了编码,因此我们无法通过任何软件显示它们). 1)读取您的编码图像. var data = File.ReadAllBytes(< path>")); 2)解码字节数组.使用一些奇特的算法. 3)恢复图像,var img = new Bitmap(new MemoryStream(data));并显示在表单上. Easy, 0) Use fancy algorithm to encode images, (Images won''t we displayed by any software, because they are encoded). 1) Read your encoded image. var data = File.ReadAllBytes("<path>"); 2) Decode byte array. Use some fancy algorithm. 3) Restore image, var img = new Bitmap(new MemoryStream(data)); and display in on the form.
更多推荐
如何编码和解码图像文件
发布评论