Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

pil python

# usng pil to open image
from PIL import Image
image = Image.open(r"filepath")
image.show()
Comment

python pil

from PIL import Image

img = Image.open("./my_image.png")
Comment

python PIL

from pil import Image

def newImg():
    img = Image.new('RGB', (100, 100))
    img.putpixel((30, 60), (155, 155, 55))
    img.save(r'C:UserslenovoDesktopsqr.png')

    return img

newImg()
Comment

PREVIOUS NEXT
Code Example
Python :: run python file in interactive mode 
Python :: raise python 
Python :: rotate array python 
Python :: python read zipfile 
Python :: flask db migrate 
Python :: bot ping discord.py 
Python :: django template tags capitalize 
Python :: python get computer name 
Python :: python add to list with index 
Python :: Django - include app urls 
Python :: pandas drop rows with value in list 
Python :: execute command in python script 
Python :: __gt__ 
Python :: read excel file spyder 
Python :: get working directory in python 
Python :: remove all rows without a value pandas 
Python :: encrypt string python 
Python :: Converting utc time string to datetime object python 
Python :: install python packages from inside within python program 
Python :: python class name 
Python :: simple trivia question python 
Python :: export pythonpath linux 
Python :: how to print a string by reverse way in python 
Python :: os.listdir in python 
Python :: python beautifulsoup get content of tag 
Python :: how to use sum with range python 
Python :: declare numpy zeros matrix python 
Python :: Get last “column” after .str.split() operation on column in pandas DataFrame 
Python :: python import beautifulsoup 
Python :: how to translate to string to different alphabet python 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =