Create a Jigsaw Puzzle

Create a mind blowing jigsaw puzzle using jQuery and PHP

Almost everyone, at one point during childhood, has played jigsaw puzzles. Today Rakhitha Nimesh is going to show you how to create a jigsaw puzzle using jQuery and PHP. Lets start creating puzzles. First thing you have to do is choose an image for the puzzle. Only jpg images can be used in this example. He is going to use the 1stwebdesigner header image for the puzzle. Once you choose the image it has to be split into smaller images to create the puzzle components.

 

There are a lot of online tools available for splitting images. But Rakhitha Nimesh is going to use his own php code to split the image. The purpose of this tutorial is to make the puzzle. So he is not going to explain the whole PHP code for splitting images. He’ll just explain the necessary configurations. First you have to provide the name of your image in the $image_file variable. He has used puzzle.jpg as the name and it should be on the same path as the file which contains the above php code.

Comments

Be the first to write a comment

You must me logged in to write a comment.