Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: mod_img.bat
- :: Install dependencies: https://imagemagick.org/script/download.php#windows
- :: During install chack "Install legacy uitilities (eg convert)"
- :: Usage: mod_img.bat inputfile outputfile
- @echo off
- SET strength=30
- SET /a blocksize=%RANDOM% %% 20 + 30
- SET /a angle=%RANDOM% %% 90
- SET /a scale=100/%blocksize%
- SET /a str=100-%strength%
- magick %1 -format %%wx%%h info: > tmp.txt
- SET /p size=<tmp.txt
- del tmp.txt
- echo Strength %strength%, Blocksize: %blocksize%, Angle: %angle%, Scale: %scale%
- magick convert "%1" -scale %scale%%% +noise Poisson -scale %size% -distort SRT %angle% "%1" -compose Blend -define compose:args=%str% -composite "%2"
- ::Stand alone command for reference
- :: convert input.jpg -scale 5% +noise Poisson -scale 2000% input.jpg -compose Blend -define compose:args=85 -composite output.jpg
Add Comment
Please, Sign In to add comment