将图像分割成不均匀的图像 [英] Split Images Into Uneven Image

查看:131
本文介绍了将图像分割成不均匀的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何使用JavaScript将图片分成多块吗?我需要将该图片加密和解密,以使黑客在获取信息时遇到问题,

有什么方法可以将图像默认分割为不均匀的形状?由于安全原因,就像拼图游戏一样,我在此上做一个项目.例如:一个随机图像,通过代码分成许多部分,并且大小必须是不均匀的,例如较大的正方形和较小的正方形,这样黑客就更难将碎片放回原处.

http://www.google.com.sg/imgres?q=split+image+into+tiles&um=1&hl=zh-CN&sa=N&biw=1680&bih=949&tbm=isch&tbnid=mm-8EYBUItGF-M:&imgrefurl=https://wiki. openmrs.org/display/docs/Google%2BMaps%2BImage%2BViewer%2BModule&docid=s7uskvnQ0eQ2HM&imgurl=https://wiki.openmrs.org/download/attachments/3346707/Googlemaps-heterochromiacat_2.jpg%253Fversion%253D1%2526ification 384&h = 288&ei = BbBeT5SXO6utiQeeqY3cBw&zoom = 1&iact = rc&dur = 238&sig = 118284517343590822152&page = 2&tbnh = 142&tbnw = 189&start = 40&ndsp = 48&ved = 1t:429,r:22,s:40&tx


一个例子,但是正方形大小不同,更大或更小(必须通过编码来做到这一点)吗?

谢谢〜



一个例子,但是正方形大小不同,更大或更小(必须通过编码来做到这一点)吗?

谢谢〜

Hi, anyone knows how to split an image into pieces, using javascript? I need to encrypt and decrypt that picture into pieces so that hacker will have a problem getting the information,

is there any way to split the image by default to uneven shape? like a jig-saw puzzle form, due to security reasons, as I doing a project on that. Example: a random image, split into many parts via code, and the size must be uneven, like bigger square and smaller square, so that it will be harder for hacker to put back the pieces as one.

http://www.google.com.sg/imgres?q=split+image+into+tiles&um=1&hl=en&sa=N&biw=1680&bih=949&tbm=isch&tbnid=mm-8EYBUItGF-M:&imgrefurl=https://wiki.openmrs.org/display/docs/Google%2BMaps%2BImage%2BViewer%2BModule&docid=s7uskvnQ0eQ2HM&imgurl=https://wiki.openmrs.org/download/attachments/3346707/Googlemaps-heterochromiacat_2.jpg%253Fversion%253D1%2526modificationDate%253D1282171110000&w=384&h=288&ei=BbBeT5SXO6utiQeeqY3cBw&zoom=1&iact=rc&dur=238&sig=118284517343590822152&page=2&tbnh=142&tbnw=189&start=40&ndsp=48&ved=1t:429,r:22,s:40&tx=155&ty=94


~
an example, but the squares are of different size, larger/smaller, (have to do this by coding) do you know to do?

thanks~



an example, but the squares are of different size, larger/smaller, (have to do this by coding) do you know to do?

thanks~

推荐答案

坏主意.如果需要真正的安全性,则不能使用JavaScript,因为它完全放在客户端上,因此可以轻松地离线阅读和分析它.之后,您可以根据脚本可用的相同数据来设计和实施自动化的变通解决方案.换句话说,粗略的想法是:查看客户端可以完全使用的脚本,可以为其创建反脚本,并模仿人类操作员破解对机器人的保护".

因此,正确的解决方案应基于服务器端代码.此外,在这种情况下,图形操作更易于实现和调试,因为它是.NET.您可以使用桌面应用程序开发和调试主引擎,该方法更快,更轻松,然后将其移至Web应用程序.

您在服务器端的.NET解决方案仅需要一个图形库即可完成此任务:System.Drawing;请参阅:
http://msdn.microsoft.com/en-us/library/system.drawing.aspx [ ^ ].

—SA
Bad idea. If you need real security, you cannot use JavaScript as it is totally placed on the client side, so it can be easily read and analyzed off-line. After that, one could design and implement an automated work-around solution based on the same data available to your script. In other words, the rough idea is that: looking at your script fully available to the client, one can create an anti-script for it and mimic a human operator to crack your "protection" against a robot.

Therefore, the right solution should be based on server-side code. Besides, in this case, graphic manipulations is way easier to implement and debug, because this is .NET. You can develop and debug the main engine using a desktop application, which is way faster and easier, and then move it to your Web application.

Your .NET solution on the server-side needs only one graphics library to accomplish this task: System.Drawing; please see:
http://msdn.microsoft.com/en-us/library/system.drawing.aspx[^].

—SA


这篇关于将图像分割成不均匀的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆