diff options
author | ubq323 <ubq323@ubq323.website> | 2022-08-04 22:28:49 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2022-08-04 22:28:49 +0100 |
commit | 0005960474d5b92afaecd3da95b4774e30421e2e (patch) | |
tree | 98b496a21c7d1931ce39b6b9a8c205510fa37873 /img | |
parent | 4b37c7c8cacad50fa71bbdbc88789f235fa3d836 (diff) |
img
Diffstat (limited to 'img')
-rw-r--r-- | img/load_pnm.lua | 3 |
1 files changed, 3 insertions, 0 deletions
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 |