added optional parameter to create empty images with bgcolor