def create_canvas(width, height, bgcolor=u'#ffffff'):
 img = QImage(width, height, QImage.Format_RGB32)
 img.fill(QColor(bgcolor))
 return img

def create_canvas ( width , height , bgcolor = u'#ffffff' ) : img = QImage ( width , height , QImage . Format_RGB32 ) img . fill ( QColor ( bgcolor ) ) return img
create a blank canvas of the specified size and color .