Added image creation factory to fix #82