/* *   * modify an image to flip the specified degree
  *
  * @ param string  $filename file name (including the file path)
  * @ param  Float $degrees rotation degree
  * @ return Boolean
  */
    Function  Flip ($filename, $SRC, $degrees=90)
  {
 //read picture
  $data=http://www.script-home.com//article/@getimagesize ($filename);
  If ($data=http://www.script-home.com//article/=false) return false.
 //read old image
  The switch ($data [2]) {
    Case 1:
      $src_f=imagecreatefromgif ($filename); Break;
    Case 2:
      $src_f=imagecreatefromjpeg ($filename); Break;
    Case 3:
      $src_f=imagecreatefrompng ($filename); Break;
  }
  If ($src_f==""); return false
  $rotate=@ imagerotate ($src_f, $degrees, 0).
  If (! Imagejpeg ($rotate, $SRC, 100)) return false.
  @ imagedestroy ($rotate);
  Return true;
  }
 

you might be interested in the article:

  • PHP image upload code
  • 6 ways to PHP upload pictures rename instance
  • PHP generate Gif image authentication code


This concludes the body part