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
I need an answer ASAP. So I have increased the points
Try to replace
$ris_x=$tot_y-($i_y+1);
$ris_y=$i_x;
with
$ris_x=$tot_y;
$ris_y=$i_x;
$ris_x=$tot_y-($i_y+1);
$ris_y=$i_x;
with
$ris_x=$tot_y;
$ris_y=$i_x;
ASKER
Nope didn't work - sorry!
sorry, with
with
$ris_x=$i_y;
$ris_y=$i_x;
with
$ris_x=$i_y;
$ris_y=$i_x;
ASKER
Nope didn't work - sorry!
ASKER
ignore the last comment
sorry, with
with
$ris_x=$i_y;
$ris_y=$i_x;
with
$ris_x=$i_y;
$ris_y=$i_x;
sorry, I've post duplicate message as you :)
ASKER
Almost there although it seems to rotate 90 then mirror that. Not rotate -90.
Points increased for trying!
Points increased for trying!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Well Done!!!! It had me stuck!!
Thanks everso much!
I really appreciate that - you saved me hours!!!
Thanks everso much!
I really appreciate that - you saved me hours!!!
Thanks!
Could you close duplicate question?
https://www.experts-exchange.com/questions/20319032/Rotate-Image-Help-Please.html
Could you close duplicate question?
https://www.experts-exchange.com/questions/20319032/Rotate-Image-Help-Please.html
ASKER