diff options
author | Hans Hagen <pragma@wxs.nl> | 2020-06-25 12:13:32 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2020-06-25 12:13:32 +0200 |
commit | 2e657baa195eb8a5011a0f08eeb32bd3396ea1bf (patch) | |
tree | 183b7c9ce7a4f897c57743d6bbfe31ab0db42495 /tex/context/base/mkiv/grph-chk.lua | |
parent | 56c53b52bfa815946a62fdb28ee432b5d849b9c9 (diff) | |
download | context-2e657baa195eb8a5011a0f08eeb32bd3396ea1bf.tar.gz |
2020-06-25 10:58:00
Diffstat (limited to 'tex/context/base/mkiv/grph-chk.lua')
-rw-r--r-- | tex/context/base/mkiv/grph-chk.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tex/context/base/mkiv/grph-chk.lua b/tex/context/base/mkiv/grph-chk.lua index ed78b856c..0688f46ef 100644 --- a/tex/context/base/mkiv/grph-chk.lua +++ b/tex/context/base/mkiv/grph-chk.lua @@ -127,9 +127,9 @@ function checkers.pdf(data) return genericchecker(data) end -local function wrappedidentify(identify,filename) +local function wrappedidentify(identify,filename,filetype) local wrapup = function() report_inclusion("fatal error reading %a",filename) end - local _, result = xpcall(identify,wrapup,filename) + local _, result = xpcall(identify,wrapup,filename,filetype) if result then local xsize = result.xsize or 0 local ysize = result.ysize or 0 @@ -166,7 +166,7 @@ function checkers.jpg(data) local inject = lpdf.injectors.jpg local found = false request.scanimage = function(t) - local result = wrappedidentify(identify,t.filename) + local result = wrappedidentify(identify,t.filename,"jpg") found = not result.error return { filename = result.filename, @@ -202,7 +202,7 @@ function checkers.jp2(data) -- idem as jpg local inject = lpdf.injectors.jp2 local found = false request.scanimage = function(t) - local result = wrappedidentify(identify,t.filename) + local result = wrappedidentify(identify,t.filename,"jp2") found = not result.error return { filename = result.filename, @@ -238,7 +238,7 @@ function checkers.png(data) -- same as jpg (for now) local inject = lpdf.injectors.png -- currently pdf specific local found = false request.scanimage = function(t) - local result = wrappedidentify(identify,t.filename) + local result = wrappedidentify(identify,t.filename,"png") found = not result.error return { filename = result.filename, |