Skip to content

Instantly share code, notes, and snippets.

@koteq
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koteq/2125956da87e501d0a7b to your computer and use it in GitHub Desktop.
Save koteq/2125956da87e501d0a7b to your computer and use it in GitHub Desktop.
Sigma for unsharp calculated by formula [screen ppi]/150 and for screen 1366x768 15.6" (100.45 ppi) it's equal to 0.669
for %%f in (*.png *.jpg) do convert "%%f" ^
-filter Lanczos -resize "1366x768^" ^
-unsharp 0x0.669+0.4+0.008 ^
-gravity center -extent 1366x768 ^
-set filename:f "%%t_%%wx%%h.png" "png:%%[filename:f]"
rem or use this cmdline:
rem for %f in (*.png *.jpg) do convert "%f" -filter Lanczos -resize "1366x768^" -unsharp 0x0.669+0.4+0.008 -gravity center -extent 1366x768 -set filename:f "%t_%wx%h.png" "png:%[filename:f]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment