Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python convert png to jpg

from PIL import Image

img = Image.open('image.png')
rgb_img = img.convert('RGB')
rgb_img.save('image.jpg')
Comment

convert multiple jpg files to png using python

from PIL import Image
import glob

counter = 0
for image in glob.glob("./*.jpg"):
    counter = counter + 1
    img = Image.open(image)
    img.save(str(counter)+'new_image.png','png')
Comment

PREVIOUS NEXT
Code Example
Python :: check gpu in tensorflow 
Python :: python format 2 digits 
Python :: python check if is pandas dataframe 
Python :: python get user home directory 
Python :: how to open an external file in python 
Python :: plot specific columns pandas 
Python :: flask boiler plate 
Python :: opencv draw two images side by side 
Python :: run celery on windows 
Python :: how to plot kmeans graph 
Python :: pandas to csv without header 
Python :: python time using timeit module 
Python :: remove r and n from string python 
Python :: discord.py unmute 
Python :: complex phase python 
Python :: dns request scapy 
Python :: python random randint except a number 
Python :: how to save query data into dataframe pscopg2 
Python :: tkfiledialog python 3 example 
Python :: python how to access clipboard 
Python :: show jpg in jupyter notebook 
Python :: how to print a random part of a list in python 
Python :: python blender select object by name 
Python :: print two digits after decimal python 
Python :: Cool codes for Python 
Python :: django docs case when 
Python :: python create nested directory 
Python :: opencv grayscale to rgb 
Python :: python pandas apply to one column 
Python :: how to install flask 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =