From 0005960474d5b92afaecd3da95b4774e30421e2e Mon Sep 17 00:00:00 2001 From: ubq323 Date: Thu, 4 Aug 2022 22:28:49 +0100 Subject: img --- img/load_pnm.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'img') diff --git a/img/load_pnm.lua b/img/load_pnm.lua index 0c89662..86d2a67 100644 --- a/img/load_pnm.lua +++ b/img/load_pnm.lua @@ -78,8 +78,11 @@ local function parse(imgf) local has_depth = not(typech == 1 or typech == 4) local width,height,cur = imgf:match("%s*(%d+)%s*(%d+)%s*()",3) + width,height = tonumber(width),tonumber(height) assert(width,"couldn't find image dimensions") + + -- by 'depth' i mean 'maximum value' local depth = 1 if has_depth then -- cgit v1.2.3