remove magick variable, use convert for all platform

This commit is contained in:
moicen
2021-12-30 00:46:59 +08:00
committed by 阿男
parent 327586a667
commit 4fa3dd0760
+1 -5
View File
@@ -20,19 +20,15 @@ for i = 1, len do
origin[i] = file_dir .. "/" .. data[i] .. " "
end
-- 从 nginx 变量取
local magick = ngx.var.magick
local convert = ngx.var.convert
if not magick then
if not convert then
ngx.status = 500
ngx.log(ngx.ERR, "ImageMagick NOT FOUND.")
return
end
magick = ""
end
local cmd = magick .. " " .. convert .. " -append " .. table.concat(origin, " ") .. " " .. combined
local cmd = convert .. " -append " .. table.concat(origin, " ") .. " " .. combined
ngx.log(ngx.INFO, 'CMD -> ', cmd)
local result, _, code = os.execute(cmd)
if result and code == 0 then