diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2023-12-28 07:18:20 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2023-12-28 10:13:28 +0100 |
commit | 19db1b17c184cca2073bf395568a4841953d2629 (patch) | |
tree | e7a50244dc27bfc9a2f271229fd9583729f070dc | |
parent | 5b08043210b6d55681e3d98ee112ed2be36dbb17 (diff) | |
download | gallery-19db1b17c184cca2073bf395568a4841953d2629.tar.gz gallery-19db1b17c184cca2073bf395568a4841953d2629.tar.xz gallery-19db1b17c184cca2073bf395568a4841953d2629.zip |
Use the ImageMagick v7 utility
-rw-r--r-- | main.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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:") |