From 2e657baa195eb8a5011a0f08eeb32bd3396ea1bf Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Thu, 25 Jun 2020 12:13:32 +0200 Subject: 2020-06-25 10:58:00 --- tex/context/base/mkiv/grph-chk.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tex/context/base/mkiv/grph-chk.lua') 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, -- cgit v1.2.3