Problem with images height and width

Hi,

  I have a problem with display.loadRemoteImage, i can’t get the width and height in a global variable. I need a variable with those proprietes to align them in app.

For example:

local width, height local function thumbnailsListener( event ) hei = event.target.height; wei = event.target.width; event.target.height = display.contentWidth\*0.45 event.target.width = display.contentWidth event.target.x = display.contentWidth/2 -- HERE IS MY PROBLEM, i can't get this values outside the function... height = event.target.height width = event.target.width article:insert(event.target) event.target:toBack() if ( event.isError ) then print ( "Network error - download failed" ) else event.target.alpha = 0 transition.to( event.target, { alpha = 1.0 } ) end end for q,value in pairs(table.result) do -- and here in for loop i will put the images by their heights to build a list end

Sorry for my bad english.

Thanks !