anchor.diff:  call:dopause & exit /b
   
   :checkparams
  -if "%~1" equ "" exit /b
  +set "ispng=%png%" & set "isjpeg=%jpeg%" & set "isgif=%gif%"
  +:checkparams1
  +if "%~1" equ "" (
  +	if /i "%ispng%" equ "yes" call:png
  +	if /i "%isjpeg%" equ "yes" call:jpeg
  +	if /i "%isgif%" equ "yes" call:gif
  +	set "ispng=" & set "isjpeg=" & set "isgif="
  +	exit /b
  +)
   set "p=%~1"
   if exist "%p:~1%" (
   	if /i "%p:~,1%" equ "f" call:checkfile "%p:~1%"
   	if /i "%p:~,1%" equ "d" call:checkdir "%p:~1%"
   )
   shift
  -goto:checkparams
  +goto:checkparams1
   
   :checkfile
  -if "%jpeg%" neq "0" (
  -	if /i "%~x1" equ ".jpg"  call:checkfiletype jpeg "%~1"
  -	if /i "%~x1" equ ".jpe"  call:checkfiletype jpeg "%~1"
  -	if /i "%~x1" equ ".jpeg" call:checkfiletype jpeg "%~1"
  -)
  -if "%png%" neq "0" if /i "%~x1" equ ".png" call:checkfiletype png "%~1"
  -if "%gif%" neq "0" if /i "%~x1" equ ".gif" call:checkfiletype gif "%~1"
  +if "%ispng%" neq "0" if /i "%~x1" equ ".png" if not defined ispng set "ispng=yes"
  +if "%isjpeg%" neq "0" (
  +	if /i "%~x1" equ ".jpg"  if not defined isjpeg set "isjpeg=yes"
  +	if /i "%~x1" equ ".jpe"  if not defined isjpeg set "isjpeg=yes"
  +	if /i "%~x1" equ ".jpeg" if not defined isjpeg set "isjpeg=yes"
  +)
  +if "%isgif%" neq "0" if /i "%~x1" equ ".gif" if not defined isgif set "isgif=yes"
   exit /b
   	
  -::%1 - jpeg | png | gif
  -::%2 - full path to the file
  -:checkfiletype
  -if not defined %~1 call:%~1
  -exit /b
  -
   :checkdir
  -if not defined jpeg call:checkmask %1 ""*.jpg" "*.jpe?"" && call:jpeg
  -if not defined png  call:checkmask %1 "*.png" && call:png
  -if not defined gif  call:checkmask %1 "*.gif" && call:gif
  +if "%ispng%" neq "0"  if not defined ispng  call:checkmask %1 "*.png" && set "ispng=yes"
  +if "%isjpeg%" neq "0" if not defined isjpeg call:checkmask %1 ""*.jpg" "*.jpe?"" && set "isjpeg=yes"
  +if "%isgif%" neq "0"  if not defined isgif  call:checkmask %1 "*.gif" && set "isgif=yes"
   exit /b
   
   :checkmask
  
positive.code: :errormsg
  title [Error] %name% %version%
  if exist "%tmppath%" 1>nul 2>&1 rd /s /q "%tmppath%"
  if "%~1" neq "" 1>&2 echo.%~1
  call:dopause
  exit /b
  
  
negative.code: :endsetcounters
  if %TotalNumPNG% equ 0 if %TotalNumJPG% equ 0 if %TotalNumGIF% equ 0 (
  	call:clearscreen
  	call:errormsg "No images found. Please check input and try again."
  	exit /b
  )
  for /l %%a in (1,1,%thread%) do (
  