Guest User

Untitled

a guest
Dec 19th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. $ convert bw.jpg -format "%[colorspace]" info:
  2. Gray
  3.  
  4. sudo apt-get install imagemagick
  5.  
  6. for i in /images/folder ; do
  7. if [ "$(convert $i -format "%[colorspace]" info:)" == "Gray" ]; then
  8. mv "$i" /images/folder/bw
  9. fi
  10. done
  11.  
  12. $ convert black-and-white-comics.jpg -colorspace HSL -channel g
  13. > -separate +channel -format "%[fx:mean]" info:
  14. 0.00781798
  15.  
  16. @echo off
  17. setlocal ENABLEDELAYEDEXPANSION
  18. if not exist bw md bw
  19. for %%f in (*.jpg) do (
  20. for /f %%i in ('magick %%f -colorspace HSL -channel g -separate +channel -format "%%[fx:mean]" info:') do set VAR=%%i
  21. if !VAR! LEQ 0.05 move %%f .bw)
Add Comment
Please, Sign In to add comment