code: protected function expandConversionMapping(array $mapping)
      {
          $ret = [];
          $matches = [];
          foreach ($mapping as $m) {
              if (preg_match('/^(.*)\s*=>\s*(.*)/', $m, $matches)) {
                  $ret[trim($matches[1])] = trim($matches[2]);
              }
          }
          return $ret;
      }
docs: Expands the image type conversion mapping.
  
  @param array $mapping Array of lines similar to "bmp => jpg", "tif => jpg"
  @return array Key/Value pairs of mapping: array('bmp' => 'jpg', 'tif' => 'jpg')