From 19db1b17c184cca2073bf395568a4841953d2629 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Thu, 28 Dec 2023 07:18:20 +0100 Subject: Use the ImageMagick v7 utility --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 5dae14e..9138754 100644 --- a/main.go +++ b/main.go @@ -1250,8 +1250,8 @@ func syncIsImage(path string) (bool, error) { } func syncPingImage(path string) (int, int, error) { - out, err := exec.Command("identify", "-limit", "thread", "1", "-ping", - "-format", "%w %h", path+"[0]").Output() + out, err := exec.Command("magick", "identify", "-limit", "thread", "1", + "-ping", "-format", "%w %h", path+"[0]").Output() if err != nil { return 0, 0, err } @@ -2187,7 +2187,7 @@ func makeThumbnail(load bool, pathImage, pathThumb string) ( // // TODO: See if we can optimize resulting WebP animations. // (Do -layers optimize* apply to this format at all?) - cmd := exec.Command("convert", "-limit", "thread", "1", pathImage, + cmd := exec.Command("magick", "-limit", "thread", "1", pathImage, "-coalesce", "-colorspace", "RGB", "-auto-orient", "-strip", "-resize", "256x128>", "-colorspace", "sRGB", "-format", "%w %h", "+write", pathThumb, "-delete", "1--1", "info:") -- cgit v1.2.3-70-g09d2