PDA

View Full Version : Screen Capture



JNJC
May 22nd, 2006, 01:31
Hi Folks,

Is it possible to do a screen capture directly to a variable without first writing to the memory card? At the moment I do somehting along the lines of the following:

screen:save("tmp.png")
local ScreenBackground = Image.load("tmp.png")


Is it possible to do something like:

ScreenBackground = screen:save()

Thanks,
JC

drEDN4wt
May 22nd, 2006, 23:26
I take it that you mean in lua.

try
ScreenBackground = screen

JNJC
May 23rd, 2006, 00:32
Thanks for the reply,

Yes in Lua. I have tried this and I get the following error when I try and use the variable:

error: luaWidgets.lua:277: bad argument #2 to `blit' (Image expected, got table)

Is the actual image contained somewhere in the table ? Any ideas how I would access it ?