add scripts

Signed-off-by: Martin Matous <m@matous.dev>
This commit is contained in:
Martin Matous 2022-03-28 00:46:25 +02:00
parent c6c66648ea
commit 5a4419bb4e
Signed by: mmatous
GPG key ID: 8BED4CD352953224
12 changed files with 802 additions and 1 deletions

27
invoke-magic.bat Executable file
View file

@ -0,0 +1,27 @@
@echo off
IF NOT EXIST ./\conv mkdir conv
FOR %%f in (./workdir/*.jpg) DO (
magick convert "./workdir/%%f" ^
-resize 1500 -quality 85 ^
logo.png -gravity SouthEast -geometry +0+50 ^
-composite "./conv/%%f"
)
IF NOT EXIST ./\thm mkdir thm
magick mogrify -path ./thm -thumbnail 250 -quality 85 ./workdir/*
:: Requires ImageMagick installed, modified PATH (gets done during install)
:: resize - [NUM]: width, height get computed; [xNUM]: height, width gets computed;
:: [NUM1xNUM] is max(NUM1,NUM2) that's aspect preserving
:: quality - compression, not consistent between various SW
:: gravity - where to put news element
:: geometry - offset from borders, X,Y
:: composite - compose in order of "background, foreground"
:: path - output, original gets replaced if omitted
:: thumbnail - optimalized resize + compression + strip
:: "*" means "gobble whatever you get your hands on"
:: strip - discard metadata
::