[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –
Python Programming Tutorial – 44 – Combine Images Together
by
Tags:
Comments
8 responses to “Python Programming Tutorial – 44 – Combine Images Together”
-
if someone has problems cuz of coordinates,like i did,but just really wants to see results on their computer like i did,
you can do it like i did
# superwatermelon.py in workfrom PIL import Image # if you didn't install it cuz you don't pycharm,just go to cmd.exe and write python – m pip install Pillow
img = Image.open('images1.jpg') # open first image
img2 = Image.open('images.jpg') # open second image
area = (25, 25 ,151,151) #just some random coordinates…
img2 = img2.crop(area) # now my image size was identical to first image so i decided to crop it.img.paste(img2,area) # so now i just paste it with same coordinates ,since this and crop coordinates are same. it fits perfectly
# other way to do it,witchout crop,just use smaller second image and don't put any coordinates.img.paste(img2)
img.show() # so lets see the result -
Is there a possibility on codes that you can paste image on center without giving its coordinate? my second image was random size.
-
You can even pass the area like area = (200, 200), no need the last two parameters. So no need calculation 🙂
-
I am getting error saying no such file found(the file which is to be placed). It is in the same directory
-
Is there a way to make the foreground transparent without photoshopping the image itself?
In your case, making 'girl' semi transparent? -
daymn bucky ! now I can watermark my photos using my own code ! thanx man.
-
Hey Bucky.
I don't really get where you get the 300 in: area = (100, 100, 300, 300)
I have try to make some change int the AREA but then I will only get error. -
Hey Buckey!
Great videos. I was wondering, why would you use python as an image editor and not just Photoshop?
Leave a Reply