图像通过File_put_contents保存自定义高度和宽度

How to put content in png image with height and width i mean i am using php function file_put_contents.I need when this file save than this Png image height and width should be 200px.Check down my code what i have done.

PHP

<?php
     $fname = "orderimages/firstName[".$_POST['getfirstname']."]";
     $finalfilef =$fname."/front_side.png";
     if((isset($_POST['frontval'])) && (isset($_POST['getfirstname']))){
     if(!is_dir($fname)){
         mkdir($fname, 0777 ,true);
      }
         $filteredDataf=substr($_POST['frontval'], strpos($_POST['frontval'], ",")+1);
         //Decode the string
         $unencodedDataf=base64_decode($filteredDataf);
         file_put_contents($finalfilef, $unencodedDataf);
     }

      else {}
?>