title: PHP - Unzip and convert images from .jpg to .bmp
body: <p>I've a code that unzip files that I upload to my server, it works without any problem.</p>
  
  <p>But now I want to add another function. I want to convert all images that are in .zip file (.zip file only contains images) from .jpg format to .bmp.</p>
  
  <pre><code>&lt;?php
  $file = $target_path1;
  
  $path = $target_path2;
  
  $zip = new ZipArchive;
  $res = $zip-&gt;open($file);
  if ($res === TRUE) {
  
    $zip-&gt;extractTo($path);
    $zip-&gt;close();
    unlink($target_path1);    
  } 
  
  ?&gt;
  </code></pre>
  
  <p>There is some easy way to do it? If there is not, at least could I get name of extracted images?</p>
  
  <p>Thanks.</p>