mirror of
https://github.com/NotXia/unibo-ai-notes.git
synced 2025-12-15 19:12:22 +01:00
Add image compression
This commit is contained in:
12
utils/compress_pdfs.sh
Normal file
12
utils/compress_pdfs.sh
Normal file
@ -0,0 +1,12 @@
|
||||
cd $1
|
||||
|
||||
for f in *.pdf; do
|
||||
echo "Rewriting $f"
|
||||
name="${f%.*}"
|
||||
magick \
|
||||
-density 200 \
|
||||
$name.pdf \
|
||||
-quality 50 \
|
||||
-flatten \
|
||||
$name.jpg
|
||||
done
|
||||
11
utils/compress_pngs.sh
Normal file
11
utils/compress_pngs.sh
Normal file
@ -0,0 +1,11 @@
|
||||
cd $1
|
||||
|
||||
for f in *.png; do
|
||||
echo "Rewriting $f"
|
||||
name="${f%.*}"
|
||||
magick \
|
||||
$name.png \
|
||||
-quality 50 \
|
||||
-flatten \
|
||||
$name.jpg
|
||||
done
|
||||
Reference in New Issue
Block a user