Until quite recently, the only way to create a control and add it to a layout was
img = app.CreateImage( "/Sys/Img/Droid1.png" )
lay.AddChild( img )
Those two lines can now be replaced by the single line
img = app.AddImage( lay, "/Sys/Img/Droid1.png" )
The latter is significantly more efficient than the older method and we recommend using it in most cases for new apps.
The main time that CreateImage is useful is if for some reason you are creating the image when the layout is not ready to receive the image
This does not just apply to images but to all visible controls