Warning: session_start(): open(/var/lib/php/sessions/sess_3gn886gnnijdl5lg27c0f39m5m, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
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, "|")