Added automatic creation of image. Also added dimensions.