php thump crop

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
objet
Forum Newbie
Posts: 2
Joined: Sat Feb 26, 2011 5:24 am

php thump crop

Post by objet »

Hi I want to build a script in php that take from user an image and split(crop) the image to 8 or 12 parts equal in the size for puzzel. my problem is how to crope the image to some number 8? I have a link for libery name phpthumb the adress is : http://phpthumb.gxdlabs.com/ In the libery there is a folder examples/crop_basic.php the file crop_basic.php do the missuen but only for one part is crop I dont know how to crop more then one Can you help me please thx
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: php thump crop

Post by McInfo »

Are you building a jigsaw puzzle that users interact with by dragging pieces around in their browser windows? If so, you could serve the whole image (no cropping) and use it as the background of many puzzle-piece-sized elements. Use the background-position CSS property to shift the background of each element to the correct offset. There is still the minor mathematical burden of determining the offsets, but that is unavoidable. If you need help with the math, please describe the parameters of your problem in more detail.
litebearer
Forum Contributor
Posts: 194
Joined: Sat Mar 27, 2004 5:54 am

Re: php thump crop

Post by litebearer »

might take a look here also...
http://www.nstoia.com/sat/crop/
objet
Forum Newbie
Posts: 2
Joined: Sat Feb 26, 2011 5:24 am

Re: php thump crop

Post by objet »

Thx
I found my nessery on website: http://www.nstoia.com/sat/crop/,
Thx again
Post Reply