use imagemagick 7.1.0-52 instead of 6.9.11-60 (seems to have fixed the issues of images doubling in size) + don't recompress images that are already webp -- WARNING I HAVE NO IDEA WHAT IM DOING

master
Aevann1 2022-11-19 21:53:49 +02:00
parent 8719c057ee
commit 6b5a71c62e
4 changed files with 8 additions and 2 deletions

View File

@ -15,6 +15,10 @@ services:
depends_on:
- redis
- postgres
cap_add:
- SYS_ADMIN
devices:
- /dev/fuse
redis:
container_name: "redis"

View File

@ -140,7 +140,9 @@ def process_image(filename:str, v, resize=0, trim=False, uploader_id:Optional[in
try:
with Image.open(filename) as i:
params = ["convert", "-coalesce", filename, "-quality", "88", "-define", "webp:method=5", "-strip", "-auto-orient"]
params = ["./magick", filename, "-strip", "-auto-orient"]
if i.format.lower() != 'webp':
params.extend(["-coalesce", "-quality", "88", "-define", "webp:method=5"])
if trim and len(list(Iterator(i))) == 1:
params.append("-trim")
if resize and i.width > resize:

BIN
magick 100644

Binary file not shown.

View File

@ -1,6 +1,6 @@
apt -y update
apt -y upgrade
apt -y install git redis-server python3-pip ffmpeg imagemagick tmux nginx snapd ufw gpg-agent htop nano
apt -y install git redis-server python3-pip ffmpeg tmux nginx snapd ufw gpg-agent htop nano
git config --global credential.helper store
cd /rDrama