I am trying to edit the bigger image by adding ImageFilter and resizing it to a larger dimension. Then I am pasting the original Image back into the edited one. but it is getting pasted at the top left corner. I want it to be at the center.
My code is –
size3 = (1800,2200) ima3 = Image.open("101602040.jpg") Image.open("101602040.jpg").resize(size3).filter(ImageFilter.GaussianBlur(20)).save("gauss.jpg") box = (0,0,ima3.size,ima3.size) region = ima3.crop(box) #select the complete original image ima4 = Image.open("gauss.jpg") #open the new resized image ima4.paste(region,box) #paste the original into the edited one ima4.show()
What I want is like this –
Source: Stack Overflow