get("#346") -- getcrop -- works on global "img" function standardcrop(img) local x1, y1, x2, y2 = getcrop(img) -- return cropped image return { width = x2-x1, height = y2-y1, getInt = function(x, y) return img.getInt(x+x1, y+y1) end } end