Is there a way to rotate an image vertically in php file?
<img width=“213” height=“109” src=“/wp-content/uploads/parc10/shadow201A.JPG”></td>
thank you
Is there a way to rotate an image vertically in php file?
<img width=“213” height=“109” src=“/wp-content/uploads/parc10/shadow201A.JPG”></td>
thank you
Where in this code PHP file is supposed to be?
this 2 photos needs to be rotated vertically 90degree
http://www.joehopeinc.com/wp-content/uploads/parc10/parc10_files/102.php
better to rotate it before upload.
as for your question, these is no images in the php script. There is just links to these images.
yes i have links but control the image width and height with html.i was wondering how i could do that within the code.
Html does not have ability to rotate images.
what are my options?
I guess it’s wordpress.
They have a powerful media library applet. You can rotate picture using it’s controls.
thank you for your help yes that will do it.
You can try something like this:
<img width="213" height="109" src="rotate.php?filename=shadow201A.JPG">
And in rotate.php
$fileName = $_GET['filename'];
$angle = 90.0;
$bgColour = 0xFFFFFF; // red
$original = imagecreatefromjpeg($fileName);
$rotated = imagerotate($original, $angle, $bgColour);
header('Content-type: image/jpeg');
imagejpeg($rotated);
?>
HTH
You can do this with CSS too, although it doesn’t work in Opera (apparently):
/* for firefox, safari, chrome, etc. */
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
/* for ie */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
yes that works great,thanks.
i think i will tell my client to rotate with his editor before i add them on his page.it’s a lot of work for me and no money in it