images paste in python -
can tell me how use img.paste in python,
i can if once this
from pil import image img = image.open("images.tiff") sub_image = img.crop(box=(0,0,250,250)).rotate(180) sub_image2 = img.crop(box=(100,0,350,250)).rotate(180) final_image = img.paste(sub_image, box=(0,0,250,250)) img.save("images2.tiff")
but iam try
from pil import image img = image.open("images.tiff") sub_image = img.crop(box=(0,0,250,250)).rotate(180) sub_image2 = img.crop(box=(100,0,350,250)).rotate(180) final_image = img.paste(sub_image, box=(0,0,250,250)) final_image = img.paste(sub_image2, box=(100,0,350,250)) img.save("images2.tiff")
that code error in line 6
or
from pil import image img = image.open("images.tiff") sub_image = img.crop(box=(0,0,250,250)).rotate(180) sub_image2 = img.crop(box=(100,0,350,250)).rotate(180) final_image = img.paste(sub_image, box=(0,0,250,250)), img.paste(sub_image2, box=(100,0,350,250)) img.save("images2.tiff")
that code error on line 5
can tell me how 1 code 2x or more paste image in python 3.4
sorry iam still newbie
Comments
Post a Comment