Nottingham
asked on
Rotate Image - Help Please!
This works great! But I need it to do a -90 degree as well.
<?
$img_sorgente="ruotami.jpg ";
$size = GetImageSize($img_sorgente );
$tot_x = $size[0];
$tot_y = $size[1];
$img_risulta = ImageCreate ($tot_y,$tot_x)
$img_sorgente=ImageCreateF romJpeg($i mg_sorgent e);
for($i_x=0;$i_x<$tot_x;$i_ x++){
for($i_y=0;$i_y<$tot_y;$i_ y++){
$ris_x=$tot_y-($i_y+1);
$ris_y=$i_x;
imagecopy($img_risulta, $img_sorgente,
$ris_x,$ris_y,$i_x,$i_y,1, 1);
} // Y
} // X
Imagejpeg($img_risulta);
?>
<?
$img_sorgente="ruotami.jpg
$size = GetImageSize($img_sorgente
$tot_x = $size[0];
$tot_y = $size[1];
$img_risulta = ImageCreate ($tot_y,$tot_x)
$img_sorgente=ImageCreateF
for($i_x=0;$i_x<$tot_x;$i_
for($i_y=0;$i_y<$tot_y;$i_
$ris_x=$tot_y-($i_y+1);
$ris_y=$i_x;
imagecopy($img_risulta, $img_sorgente,
$ris_x,$ris_y,$i_x,$i_y,1,
} // Y
} // X
Imagejpeg($img_risulta);
?>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Did you ask the question twice?
Did this work?
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept: rquadling
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Sam Barnum
EE Cleanup Volunteer
I will leave a recommendation in the Cleanup topic area that this question is:
Accept: rquadling
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Sam Barnum
EE Cleanup Volunteer