I'm looking for a PHP script that will replicate the functionality of photoshop etc image slicing tool. The script should do the following
1) take an image as an argument, along with a series of boxes (width,height,x,y co-ordinates) and convert slice the image based on the box dimensions supplied. The rest of the image should also be sliced in the most efficent way possible
2) the output of the script should be a series of sliced images which are then placed into a HTML table with the coresponding tr td etc cells and which looks exactly the same as the original image, but sliced alon the dimensions of each of the boxes
3) the script must be able to take unlimited amount of box dimensions in the form of an array.
4) an example call would be
$slicer->sliceImage("test.jpg",array("slice1"=>array(x=>5,y=>5,w=>45,h=>10),"slice2"=>array(x=>70,y=>95,w=>20,h=>30));
IMPORTANT:
Please remember, the script must not just slice the box dimensions, but must effieciently slice the remainder of the image so that a complete replica of the image can be created in a HTML table. Please see photoshop/GIMP etc slice tool for an example of the required output