Skip to content

Instantly share code, notes, and snippets.

@ihaveamac
Created December 12, 2015 03:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ihaveamac/b934b907e4b1d33c542e to your computer and use it in GitHub Desktop.
Save ihaveamac/b934b907e4b1d33c542e to your computer and use it in GitHub Desktop.
Screen.waitVblankStart()
Screen.refresh()
img = Screen.loadImage(System.currentDirectory().."/sample.png")
for x = 0, Screen.getImageWidth(img) - 1 do
for y = 0, Screen.getImageHeight(img) - 1 do
local clr = Screen.getPixel(x, y, img)
Screen.drawPixel(x, y, clr, TOP_SCREEN)
end
end
Screen.debugPrint(5, 5, "Done!", Color.new(255, 255, 255), BOTTOM_SCREEN)
Screen.flip()
System.takeScreenshot(System.currentDirectory().."/finalresult.bmp")
while true do end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment