get("#388") -- rect functions get("#348") -- rgb functions get("#356") -- num2hex get("#380") -- imageHash get("#428") -- findContents problem = findContents() if problem then return problem end fw, fh = 8, 17 -- font width/height tw = math.floor((contents_x2-contents_x1)/fw+0.5) th = math.floor((contents_y2-contents_y1)/fh+0.5) print("Terminal size: "..tw.."*"..th) tbl = {} for y = 0, th-1 do for x = 0, tw-1 do -- +1 is one pixel smaller to allow strict comparison by hash xx, yy = contents_x1+x*fw+1, contents_y1+y*fh cropped = {width=fw-1, height=fh, getInt = function(x, y) return img.getInt(xx+x, yy+y) end} hash = hashImage(cropped) --print(hash) table.insert(tbl, xx..", "..yy..", "..xx+cropped.width..", "..yy+fh.." -> "..hash) end end return "Characters with hashes: "..table.concat(tbl, "|")