Click here to Skip to main content
14,937,574 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?

I am currently doing a project , whereby, I have to do captcha, where instead of words, we have to encrypt the image into uneven proportion, so that the user can decrypt it back to the original image.

Works like a captcha just that its picture form instead, are you able to help me please?
Posted
Updated 14-Mar-12 14:17pm
v2
Comments
   
What's the purpose of it? If it something like CAPTCHA?
--SA
Joel Tan Wei Shan 15-Mar-12 2:51am
   
I am not pretty sure yet, have to ask my project teacher soon, he told me that I have to make use of windows.net graphics( windows presentation foundation ) and bitmap/render, not too sure how to do it, as I could not find any sample program for me to reference on

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900