@CoronaLabs
I’d like to tell display.capture() not to return a display object since I’m only interested in saving an image to the photo library.
As it is now, I’m forced to use the following statements to save a full resolution image to the photo library of the device:
local img = display.capture(fullsizeImage, {saveToPhotoLibrary=true, isFullResolution=true}); img:removeSelf(); img = nil;
The problem with the above statements is that display.capture() returns a display object which will never be used, and it also doubles the memory requirements for no usable reason.
In an image editing app this becomes an issue when large full resolution images are loaded. An option to discard the return object would mean that even larger images could be edited and saved without running into memory issues.
It would be great if there was an extra option that could be given in the options table telling display.capture() not to create the return display object.
I’d like to do something like this:
display.capture(fullsizeImage, {saveToPhotoLibrary=true, isFullResolution=true, discardReturnObject=true});