Use magickprefix
This commit is contained in:
parent
9b3643e82d
commit
59a5f48780
2
db.lua
2
db.lua
@ -259,7 +259,7 @@ local function genobjthumbnail(objid, fname, maxsize)
|
||||
local tempfn = "/tmp/ikibooruthumb" .. b256toreadable(Rand.bytes(16)) .. ".jpg"
|
||||
local destfn = urltophysical("/objd/" .. objhex .. "/.thumb.jpg")
|
||||
|
||||
local ret, killa, exitcode = os.execute("magick convert " .. Escapes.shellescape(srcfn) .. " -background white -strip -interlace Plane -sampling-factor 4:2:0 -flatten -define jpeg:extent=100kb " .. Escapes.shellescape(tempfn))
|
||||
local ret, killa, exitcode = os.execute(BigGlobe.cfg.magickprefix .. "convert " .. Escapes.shellescape(srcfn) .. " -background white -strip -interlace Plane -sampling-factor 4:2:0 -flatten -define jpeg:extent=100kb " .. Escapes.shellescape(tempfn))
|
||||
if not ret or killa ~= "exit" or exitcode ~= 0 then return false end
|
||||
|
||||
if LFS.attributes(tempfn).size > maxsize then
|
||||
|
Loading…
Reference in New Issue
Block a user