def gen_image(self, size, color):
    if (color == 'transparent'):
        color = None
    img = Image.new('RGBA', size, color)
    return img
def gen_image(self, size, color):
    if (color == 'transparent'):
        color = None
    img = Image.new('RGBA', size, color)
    return img