anchor.diff:  for %%f in (%PROTOINNAME%) do (
     set OUTNAME=%%~nf_pano.jpg
     set INNAME=%%f
  +  echo "Processing file: %INNAME%"
     call :PROCESSPANORAMA !INNAME! !OUTNAME!
   )
   
  
positive.code:     set JPGQUALITY=%1
      echo "JPEG quality set to: !JPGQUALITY!"
    )
  ) else (
    if %PARAMCOUNT% EQU 0 set PROTOINNAME=%_TMP%
    if %PARAMCOUNT% EQU 1 set OUTNAME=%_TMP%
  
negative.code:   clean_up
  }
  
  print_help() {
    echo "Small script to stitch raw panorama files."
    echo "Raw meaning two fisheye images side by side."
    echo -e "Script originally writen for Samsung Gear 360.\n"
    echo -e "Usage:\n$0 [-q|--quality QUALITY] infile [outputfile] [hugintemplate]\n"
    echo "Where infile is a panorama file from camera, it can"
    echo "be a wildcard (ex. *.JPG)."
    echo "output parameter and hugintemplate are optional, defaults will"
    echo -e "be assumed if they are not given\n"
    echo "-q|--quality will set the JPEG quality to QUALITY"
    echo "-h|--help    prints help"
  }
  
  # https://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash
  while [[ $# -gt 0 ]]
  do
  key="$1"
  
  echo Key: $key
  
  case $key in
      -q|--quality)
        JPGQUALITY="$2"
        shift # past argument
        ;;
      -h|--help)
        print_help
        exit 0
        ;;
      *)
        # unknown option
  