add logic to handle image magick in linux
This commit is contained in:
@@ -15,11 +15,15 @@ for i = 1, len do
|
||||
end
|
||||
-- 从 nginx 变量取
|
||||
local magick = ngx.var.magick
|
||||
local convert = ngx.var.convert
|
||||
|
||||
if not magick then
|
||||
ngx.status = 500
|
||||
ngx.say("image magick not found.")
|
||||
return
|
||||
if not convert then
|
||||
ngx.status = 500
|
||||
ngx.say("image magick not found.")
|
||||
return
|
||||
end
|
||||
magick = ""
|
||||
end
|
||||
|
||||
local result, _, code = os.execute(magick .. " convert -append " .. table.concat(origin, " ") .. " " .. combined)
|
||||
|
||||
Reference in New Issue
Block a user