Python Programming Tutorial – 44 – Combine Images Together

[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –


Posted

in

by

Tags:

Comments

8 responses to “Python Programming Tutorial – 44 – Combine Images Together”

  1. Wolfy Wolf Avatar

    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 work

    from 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

  2. XxXblackemotion25xXx Avatar

    Is there a possibility on codes that you can paste image on center without giving its coordinate? my second image was random size.

  3. Sam Omidi Avatar

    You can even pass the area like area = (200, 200), no need the last two parameters. So no need calculation 🙂

  4. ninad virkar Avatar

    I am getting error saying no such file found(the file which is to be placed). It is in the same directory

  5. Jake De Necochea Avatar

    Is there a way to make the foreground transparent without photoshopping the image itself?
    In your case, making 'girl' semi transparent?

  6. Anuja Ranwalage Avatar

    daymn bucky ! now I can watermark my photos using my own code ! thanx man.

  7. jimmy johnsson Avatar

    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.

  8. ENJI84 Avatar

    Hey Buckey!
    Great videos. I was wondering, why would you use python as an image editor and not just Photoshop?

Leave a Reply

Your email address will not be published. Required fields are marked *