Hello,
I am capturing an image into the system.DocumentsDirectory then I am trying to display it by using:
local capturedImage = display.newImageRect( sceneGroup, "mycat.png", system.DocumentsDirectory, 401, 868 ) capturedImage.x, capturedImage.y = display.contentWidth \* 0.25, display.contentHeight \* 0.25
but I get the error:
ERROR: C:\Users\aaa\Documents\Corona Projects\capture\_image\scene1.lua:44: display.newImageRect() bad argument #1: filename or image sheet expected, but got nil 20:01:41.973 ERROR: Runtime error 20:01:41.973 C:\Users\aaa\Documents\Corona Projects\capture\_image\scene1.lua:45: attempt to index local 'capturedImage' (a nil value)
Capturing the image works because I can see the image in the Sandbox Documents folder.
I spent a couple of days trying to figure it out but I couldn’t. Any help is highly appreciated.
I have attached a sample project that shows the problem.
Thanks.