![]() ![]() Rendre l'arrière-fond d'une image transparent avec pythonĬode python based on Pillow module from PIL import Image img = Image.open('open_science_logo.png') img = img.convert("RGBA") datas = img.getdata() newData = for item in datas: if item = 255 and item = 255 and item = 255: newData.append((255, 255, 255, 0)) else: if item > 150: newData.append((0, 0, 0, 255)) else: newData.append(item) print(item) img.putdata(newData) img.save("open_science_logo_transparent. An example of how to make background image transparent using python (image used here open-science-logo.png). To convert EPS to PNG on Mac or Windows with transparent background, there are multiple solutions, you may prefer a piece of robust image converter software or online free service.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |