From 7ab42df9562e6a8fe4238a06bed6979362766fe7 Mon Sep 17 00:00:00 2001 From: Brandur Date: Wed, 6 Nov 2019 20:58:58 -0800 Subject: [PATCH] Move to Imagemagick Imagemagick supports HEVC and doesn't seem to have many downsides versus Graphicsmagick these days, so convert over. Now that the build is running on GitHub Actions, this should be possible now. --- .github/workflows/ci.yml | 4 +++- build.go | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 891d72a0c..36ada2569 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: - name: Install tooling from Apt # Postgres runs in a container, but we also need the client-side # tooling. - run: sudo apt-get install awscli imagemagick graphicsmagick postgresql + run: sudo apt-get install awscli imagemagick postgresql - uses: actions/checkout@v1 with: @@ -56,6 +56,8 @@ jobs: echo "GITHUB_WORKSPACE=${GITHUB_WORKSPACE}" echo "GOPATH=${GOPATH}" echo "GOROOT=${GOROOT}" + echo "" + convert --version - name: Clean run: make clean diff --git a/build.go b/build.go index e519b52a4..5063f1bf5 100644 --- a/build.go +++ b/build.go @@ -2197,7 +2197,10 @@ func renderTwitter(c *modulir.Context, db *sql.DB) (bool, error) { func resizeImage(c *modulir.Context, source, target string, width int) error { cmd := exec.Command( - "gm", + // Better to use the less-generic `convert` leader, but need + // Imagemagick 7.0 for this. Wait a little longer, and then upgrade. + // + // "magick", "convert", source, "-auto-orient",