fix
This commit is contained in:
+9
-6
@@ -21,13 +21,9 @@ if len == 0 then
|
|||||||
ngx.log(ngx.ERR, "No images to combine!")
|
ngx.log(ngx.ERR, "No images to combine!")
|
||||||
return ;
|
return ;
|
||||||
end
|
end
|
||||||
|
|
||||||
local origin = {}
|
local origin = {}
|
||||||
for i = 1, len do
|
|
||||||
ngx.log(ngx.INFO, "COMBINE FILE ->", data[i])
|
|
||||||
local cmd = convert .. " -resize 1280x " .. data[i] .. " " .. data[i] .. ".png"
|
|
||||||
ngx.log(ngx.INFO, 'CMD RESIZE -> ', cmd)
|
|
||||||
origin[i] = file_dir .. "/" .. data[i] .. ".png "
|
|
||||||
end
|
|
||||||
-- 从 nginx 变量取
|
-- 从 nginx 变量取
|
||||||
local convert = ngx.var.convert
|
local convert = ngx.var.convert
|
||||||
|
|
||||||
@@ -37,6 +33,13 @@ if not convert then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
for i = 1, len do
|
||||||
|
ngx.log(ngx.INFO, "COMBINE FILE -> ", data[i])
|
||||||
|
local cmd = convert .. " -resize 1280x " .. data[i] .. " " .. data[i] .. ".png"
|
||||||
|
ngx.log(ngx.INFO, 'CMD RESIZE -> ', cmd)
|
||||||
|
origin[i] = file_dir .. "/" .. data[i] .. ".png "
|
||||||
|
end
|
||||||
|
|
||||||
local cmd = convert .. " -append " .. table.concat(origin, " ") .. " " .. combined
|
local cmd = convert .. " -append " .. table.concat(origin, " ") .. " " .. combined
|
||||||
ngx.log(ngx.INFO, 'CMD APPEND -> ', cmd)
|
ngx.log(ngx.INFO, 'CMD APPEND -> ', cmd)
|
||||||
io.popen(cmd)
|
io.popen(cmd)
|
||||||
|
|||||||
Reference in New Issue
Block a user