How to create jigsaw puzzle from an image using javascript(拼图引擎)

本文介绍了如何使用JavaScript从图片创建拼图,包括SVG和Canvas的使用,自动生成拼图块的算法,以及后续步骤。提供了Google搜索源代码资源。

How to create jigsaw puzzle from an image using javascript



here are several pieces to this puzzle. :)

The first piece is SVG and its Canvas. That's what you'll need to draw, because otherwise you can't make a curved piece out of a picture. Only rectangles are possible with standard HTML/CSS.

The second piece is an algorithm for generating jigsaw pieces from the picture. Google should help you with that if you can't figure one out by yourself (though it doesn't seem very complicated).

The rest should be straightforward.

Added: A quick Google search gave just such a jigsaw engine in the first result. Check out the source of that.



See also:


http://howto.nicubunu.ro/gimp_jigsaw_puzzle/

http://stackoverflow.com/questions/2755389/how-to-create-jigsaw-image-puzzle-using-c

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值