zip_image.sh

This commit is contained in:
Struchkov Mark 2024-09-25 14:31:06 +03:00
parent ca09ce9d97
commit 2c40204d67
No known key found for this signature in database
GPG Key ID: A3F0AC3F0FA52F3C

View File

@ -320,6 +320,7 @@ export -f process_webp
# Обработка PNG файлов
find "$IMAGE_DIR" -type f \
-not -path "$COMP_DIR/*" \
-not -path "$WEBP_DIR/*" \
! -name "*-no-comp.*" \
-iname "*.png" -print0 | \
xargs -0 -P "$THREADS" -I {} bash -c 'process_png "$@"' _ {}
@ -327,6 +328,7 @@ xargs -0 -P "$THREADS" -I {} bash -c 'process_png "$@"' _ {}
# Обработка JPEG файлов
find "$IMAGE_DIR" -type f \
-not -path "$COMP_DIR/*" \
-not -path "$WEBP_DIR/*" \
! -name "*-no-comp.*" \
-iregex '.*\.\(jpg\|jpeg\)' -print0 | \
xargs -0 -P "$THREADS" -I {} bash -c 'process_jpeg "$@"' _ {}