forked from MarseyWorld/MarseyWorld
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
parent
8719c057ee
commit
6b5a71c62e
|
@ -15,6 +15,10 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
- redis
|
||||||
- postgres
|
- postgres
|
||||||
|
cap_add:
|
||||||
|
- SYS_ADMIN
|
||||||
|
devices:
|
||||||
|
- /dev/fuse
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
container_name: "redis"
|
container_name: "redis"
|
||||||
|
|
|
@ -140,7 +140,9 @@ def process_image(filename:str, v, resize=0, trim=False, uploader_id:Optional[in
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with Image.open(filename) as i:
|
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:
|
if trim and len(list(Iterator(i))) == 1:
|
||||||
params.append("-trim")
|
params.append("-trim")
|
||||||
if resize and i.width > resize:
|
if resize and i.width > resize:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
apt -y update
|
apt -y update
|
||||||
apt -y upgrade
|
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
|
git config --global credential.helper store
|
||||||
cd /rDrama
|
cd /rDrama
|
||||||
|
|
Loading…
Reference in New Issue