It's only done in php, after rotating original image, background of the image is in black. How to eliminate background?![enter image description here](https://i.stack.imgur.com/XvhkA.png)

below is my code..

```
      $imgNames  = "upload/".$_SESSION["img"];
      $sourcea=imagecreatefromjpeg($imgNames);
      $rotatea=imagerotate($sourcea, 0,0); 
      $uniqids = uniqid();
      $rotImages = "upload/".$uniqids.".jpg";
      $uni=uniqid();
      imagejpeg($rotatea,$rotImages,$q=25);
      echo "Rotated Image: <img src='$rotImages' >";

```