From 957a5716ad8feb4c704c5a2d9fb9b8dc02b911f7 Mon Sep 17 00:00:00 2001 From: Each Chen Date: Thu, 29 Aug 2024 21:29:43 +0800 Subject: [PATCH] HEIC to JPG --- .github/workflows/list-img.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/list-img.yml b/.github/workflows/list-img.yml index da0cba5..72cd4aa 100644 --- a/.github/workflows/list-img.yml +++ b/.github/workflows/list-img.yml @@ -1,5 +1,3 @@ -# @format - name: List Images in JSON on: push: @@ -18,9 +16,14 @@ jobs: with: node-version: "20.10.0" - name: 安裝套件 - run: sudo apt-get install -y webp + run: | + sudo apt-get install -y webp + sudo apt-get install -y libheif-examples - name: Install ImageMagick run: sudo apt-get install -y imagemagick + - name: 轉檔成 JPG (處理 HEIC) + run: | + find img -type f -name '*.heic' -exec sh -c 'heif-convert "$1" "${1%.*}.jpg"' _ {} \; - name: 轉檔成 WebP run: | find img -type d -exec mkdir -p converted/{} \;