Alrighty, this works when i try to rotate the image to the right once from it's original position, if i go one more the image is cutoff. It has never worked when rotationg to the left. anyone have any ideas at all?
Thanks in advance!
if ($define[0]=="rotate") {
if ($define[1]=="right") {
$angle = -90;
} else if ($define[1]=="left") {
$angle = 90;
}
$src_img = ImageCreateFromJPEG($path . $current["id"] . "_" . $current["title"] . "/temp/" . $define[2]);
$original_x = imagesx($src_img);
$original_y = imagesy($src_img);
$new_x = $original_y;
$new_y = $original_x;
$src_img = ImageRotate($src_img,$angle,0);
$dst_img = imagecreatetruecolor($new_y,$new_x);
imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $new_x, $new_y, $original_x, $original_y);
imagejpeg($src_img, $path . $current["id"] . "_" . $current["title"] . "/temp/" . $define[2]);
Header("Location: $PHP_SELF?start=$start");
}