Well.. my problem is in this code :
$width1 = (imagesx($im) * $prop1);
$height1 = (imagesy($im) * $prop1) * $prop1;
$width2 = (imagesx($im) * $prop2) / $i;
$height2 = (imagesy($im) * $prop2) / $i;
$width3 = (imagesx($im) * $prop3);
$height3 = (imagesy($im) * $prop3) / $i;
$bwimage= imagecreatetruecolor(249, 146);
The $x1, $y1, etc. variables also comes from the JS page.. Where the user can move and re-size a div, proportionally to (900, 250) etc. And that's where the pictures left and top should start out from.. and that works.. kinda..
The $i variable is just some stupid variable I made for the JS page... it tells how big the picture's width is towards 900px, in percent.. ($i = 900 / picWidth)
I would really appreciate any help I could get on this!