Image class library update

Replace extended exceptions by SPL exceptions