hanzhi713 / image-collage-maker

A photo mosaic (pixel collage) maker. Use all your friends' profile pictures to approximate your profile picture! 如何用 Python 制作一个炫酷的微信好友图
MIT License
157 stars 13 forks source link

Collage with transparency #16

Closed Aleclock closed 2 years ago

Aleclock commented 2 years ago

Hi, I'm trying to create a collage with a destination image that contains a transparent area (I have a .png file), but when I load it the transparent area is converted into black area (or white). Is it possible to handle a transparent area where no tiles are added?

Original (with transparency) After uploading

hanzhi713 commented 2 years ago

Yes, it's possible, but I need to modify my code to support this. I'll do it when I have time. It will probably take a few days.

Aleclock commented 2 years ago

It would be great, thanks!

hanzhi713 commented 2 years ago

Basic implementation is complete. The code is on the transparent branch (https://github.com/hanzhi713/image-collage-maker/tree/transparent). Just add --transparent for your cli command or tick the transparent masking checkbox on the GUI to use this function.

Let me know if it works or not. I'll do more testing and update the readme and examples tomorrow.

Demo: result

hanzhi713 commented 2 years ago

I'll just assume your issue is solved. Please reopen it if you find any problems.