def fry(img):
coords = find_chars(img)
img = add_b_emojis(img, coords)
img = add_laughing_emojis(img, 5)
eyecoords = find_eyes(img)
img = add_flares(img, eyecoords)
# bulge at random coordinates
[w, h] = [img.width - 1, img.height - 1]
w *= np.random.random(1)
h *= np.random.random(1)
r = int(((img.width + img.height) / 10) * (np.random.random(1)[0] + 1))
img = bulge(img, np.array([int(w), int(h)]), r, 3, 5, 1.8)
# some finishing touches
# print("Adding some finishing touches... ", end='')
stdout.flush()
img = add_noise(img, 0.2)
img = change_contrast(img, 200)
# print("Done")
return img
# Downloads image from url to RAM, fries it and saves to disk
评论列表
文章目录