added Image support to Layer and ResourceManager