I'm having some problems with imagerotate() - e.g. it won't work.

I've tried many different ways to get it to work, but I have yet to see it
do anything at all. I'm using PHP 4.3.1 on XP. I know that GD is working
properly because I can do other image-manipulation with it without error.
Plus, I installed PHP manually, not with the Windows installer (which I've
had problems getting GD to work properly on in the past).

I've added the last attempt at getting the code to work. Note that the
imagecopy() works fine and the new image displayed always ends up being an
exact copy of the destination image.

Any help would be greatly appreciated!


  if (($degrees == "90") || ($degrees == "180") || ($degrees == "270")){
    foreach($image_check as $temp_file){

      $src_img = imagecreatefromjpeg("$inbox_dir\\$temp_file");
      $new_img = imagecreatetruecolor(imagesx($src_img),imagesy($src_img));


imagecopy($new_img,$src_img,0,0,0,0,imagesx($new_img),imagesy($new_img));

      if (function_exists(imagerotate)){
      if(imagerotate($new_img, $degrees, 0)){
        print "Image Rotated Successfully<br>";
      } else {
        print "Error Rotating Image<br>";
      }
      }
      imagejpeg($new_img, "$inbox_dir\\new_image_path.jpg");

      imagedestroy($src_img);
      imagedestroy($new_img);

*code left off that's not important - though there's no syntax/compile
errors



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to