Merger: png + gif + gif +png



  • Target: Two animated gif, one png with a transparent background and background png should be combined.

    I'm trying to put this on Python through PIL. While I was able to add a fountain to one gif, it feels like I smashed the gif in the ear through the specimen, merged every foam with the background, merged all the frimees into one gif. But that's the way to put two gif one on the other.

    Is there any good way to do this? I'm considering any ways and languages (not necessarily Python), but it's definitely coded.



  • Python Pillow can do that. For example:

    from PIL import Image
    

    im1 = Image.open('fon.jpg')
    im2 = Image.open('guido-van-rossum.jpg')

    im1.paste(im2)
    im1.save('fon_pillow_paste.jpg', quality=95)

    im1.close()
    im2.close()

    The default image shall be placed in the upper left of the background picture.

    If you want to know more about this topic, I recommend reading these articles: https://python-scripts.com/pillow-paste ♪ https://fixmypc.ru/post/vstavka-teksta-i-izobrazheniia-v-kartinku-s-python-pillow-pil/ and https://defpython.ru/prostoe_nalozhenie_izobrazhenii_v_Python ♪ Personally, I love the first article.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2