Add optional parameter for configuration

I use parameters for configuration of image size. Thanks for merge.