ecco la funzione per trovare il quadrato esattamente al centro... elementarissima =D
Grazie lo stesso ;DCodice PHP:
//cerco di posizionare un quadrato 150x150 nel'esatto centro dell'immagine
$formato_foto_prima = getimagesize($url_foto_prima);
$coord_x_foto_prima = ($formato_foto_prima[0] - 150)/2;
$coord_y_foto_prima = ($formato_foto_prima[1] - 150)/2;
$formato_foto_dopo = getimagesize($url_foto_dopo);
$coord_x_foto_dopo = ($formato_foto_dopo[0] - 150)/2;
$coord_y_foto_dopo = ($formato_foto_dopo[1] - 150)/2;