Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to make images in python

#Here is an example of creating a flag:
from PIL import Image

def flag(c,w=100,h=100):
	c1,c2,c3 = c.split()
	img = Image.new("RGB", (w*3,h), c1)
	lay1 = Image.new("RGB", (w,h), c2)
	lay2 = Image.new("RGB", (w,h), c3)
	img.paste(lay1,(w,0))
	img.paste(lay2,(w*2,0))
	img.show()

flag("gold blue pink",200,350)
Comment

PREVIOUS NEXT
Code Example
Python :: look through dict 
Python :: parquet to dataframe 
Python :: await async function from non async python 
Python :: rotate image by specific angle opencv 
Python :: python process memory usage 
Python :: map object to array python 
Python :: pandas concatenate 
Python :: python day of the week 
Python :: how to create a label in tkinter 
Python :: google smtp 
Python :: how to use sum with range python 
Python :: find how many of each columns value pd 
Python :: iterate over list and select 2 values together python 
Python :: python remove new line 
Python :: Get last “column” after .str.split() operation on column in pandas DataFrame 
Python :: Getting the Current Working Directory in Python 
Python :: merge and join dataframes with pandas in python 
Python :: what is join use for in python 
Python :: case statement in pandas 
Python :: getting multiple selected value django 
Python :: replace character in column 
Python :: pyinstaller command 
Python :: register model in admin django 
Python :: Insert missing data in pandas 
Python :: changing axis labels matplotlib 
Python :: pandas read column in date format 
Python :: shutil copyfile python 
Python :: pygame caption 
Python :: networkx path between two nodes 
Python :: if else in dictionary comprehension python 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =