I have a problem saving and then displaying a captured picture. It works on my Simulator and iPhone, but not on the iPad - even though the picture captured by the camera is shown on the screen. (so it should not be a problem with the build.settings)
It may be a question for support, but I try to get advice here first…
I am capturing a picture and saving it to the system.DocumentsDirectory with the following code:
-- Capture the screen and save it to file. local photo = event.target local saveOption = { filename=theUniqueIDForPicture..".jpg", baseDir=system.DocumentsDirectory, captureOffscreenArea=true, backgroundColor={0,0,0,0} } display.save( photo, saveOption )
(I had tried earlier without the captureOffScreenArea = true, and then I only got part of the picture)
I then store the name of the picture in the database and retrieve it later with the following code:
local baseDir = system.DocumentsDirectory local pictureSavedAs = row.pathOfPicture local image = display.newImage(thePicturesDisplayed, pictureSavedAs, baseDir )
This code works fine on the Simulator and on my iPhone 6 (iOS 11.0.3), but on the iPad the saved picture is only shown as a black square.
The picture that was captured from the camera. (local photo = event.target) can and is shown on the screen.
The code that I am using is mostly from the Sample Code/Media/Camera and I am using Corona Version 2017.3157
I am attaching the code that I am using if you would like to try it on your devices.