event.target

Type DisplayObject
Event completion
Revision Current Public Release (2017.3068)
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