I copied the imagerotate function straight off the php.net manual:
[code]<?php
// File and rotation
$filename = ‘test.jpg’;
$degrees = 180;
// Content type
header(‘Content-type: image/jpeg’);
// Load
$source = imagecreatefromjpeg($filename);
// Rotate
$rotate = imagerotate($source, $degrees, 0);
// Output
imagejpeg($rotate);
?>
[/code]
But I find if it is not the first thing sent to the browser the return is machine code characters. So I tried to save $rotate to a new file name, which I prefer,( since once rotated by the client they should stay rotated) but I can’t save it as a file either. I guess you need to send the header tag, but how do you do that in the middle of the page? I would prefer to write the rotated image to a new file or overwrite the old one.
Any ideas??
-Harry