summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2023-12-28 07:18:20 +0100
committerPřemysl Eric Janouch <p@janouch.name>2023-12-28 10:13:28 +0100
commit19db1b17c184cca2073bf395568a4841953d2629 (patch)
treee7a50244dc27bfc9a2f271229fd9583729f070dc
parent5b08043210b6d55681e3d98ee112ed2be36dbb17 (diff)
downloadgallery-19db1b17c184cca2073bf395568a4841953d2629.tar.gz
gallery-19db1b17c184cca2073bf395568a4841953d2629.tar.xz
gallery-19db1b17c184cca2073bf395568a4841953d2629.zip
Use the ImageMagick v7 utility
-rw-r--r--main.go6
1 files 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:")