Hi, i was wonder to know if there is a way to know when an image is totally loaded.
I have this code in main.lua
local widget = require( "widget" ) local function onSystemEvent( event ) if event.type == "applicationStart" then initial = os.clock() local myImage = display.newImage( "image.jpg" ,500,500) final = os.clock() time = final - initial; native.showAlert( " tiempo " , time ) end end Runtime:addEventListener( "system", onSystemEvent )
I want to measure how much time takes to load an image… but the output of my code are like 0,003 seg so I guess what it isnt the really time.