get("#479") -- getcrop2
function docrop2(img)
  local x1, y1, x2, y2 = getcrop2(img)
  return {
    width = x2-x1,
    height = y2-y1,
    getInt = function(x, y)
      return img.getInt(x+x1, y+y1)
    end
  }
endtest run test run with input download show line numbers
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #495 | 
| Snippet name: | docrop2 (based on getcrop2) | 
| Eternal ID of this version: | #495/1 | 
| Text MD5: | 6e5ff6193e22eb6f8d417a7815cea023 | 
| Author: | stefan | 
| Category: | image recognition | 
| Type: | Lua code | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2015-03-08 20:39:05 | 
| Source code size: | 226 bytes / 12 lines | 
| Pitched / IR pitched: | No / Yes | 
| Views / Downloads: | 933 / 211 | 
| Referenced in: | [show references] |