我想在两台显示器上截取 linux 桌面的屏幕截图。
根据搜索,我编写了一个简单的代码来截图:
require "display"
local image = display.captureScreen()
display.save( image, { filename="image.png", isFullResolution=true } )
但它不起作用并给出此错误:
/home/a/torch/install/bin/luajit: screenshot.lua:2: attempt to index global 'display' (a nil value)
堆栈回溯:screenshot.lua:2: in main chunk [C]: in function 'dofile' ...a/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main块 [C]:在 0x00405d50
有任何想法吗?