DEV: replace imagemagick convert commands with magick (#27767)

This commit is contained in:
Kelv
2024-07-08 16:55:59 +08:00
committed by GitHub
parent 28f5550886
commit 17aa831337
4 changed files with 7 additions and 7 deletions

View File

@ -418,7 +418,7 @@ class UploadCreator
MAX_CONVERT_FORMAT_SECONDS = 20
def execute_convert(from, to, opts = {})
command = ["convert", from, "-auto-orient", "-background", "white", "-interlace", "none"]
command = ["magick", from, "-auto-orient", "-background", "white", "-interlace", "none"]
command << "-flatten" unless opts[:flatten] == false
command << "-debug" << "all" if opts[:debug]
command << "-quality" << opts[:quality].to_s if opts[:quality]
@ -526,7 +526,7 @@ class UploadCreator
path = OptimizedImage.prepend_decoder!(path, nil, filename: "image.#{@image_info.type}")
Discourse::Utils.execute_command(
"convert",
"magick",
path,
"-auto-orient",
path,