image can be in shm or heap