event.target

Type DisplayObject
Event completion
Revision Release 2022.3683
Keywords completion, target

Overview

The display image object generated after a user completes a camera session.

Example

local function onComplete( event )
    local photo = event.target
    print( "photo w,h = " .. photo.width .. "," .. photo.height )
end

if media.hasSource( media.PhotoLibrary ) then
    media.selectPhoto( { mediaSource=media.PhotoLibrary, listener=onComplete } )
else
    native.showAlert( "Corona", "This device does not have a photo library.", { "OK" } )
end