python convert png to jpg
from PIL import Image
img = Image.open('image.png')
rgb_img = img.convert('RGB')
rgb_img.save('image.jpg')
python convert png to jpg
from PIL import Image
img = Image.open('image.png')
rgb_img = img.convert('RGB')
rgb_img.save('image.jpg')
python image to video
import cv2
import numpy as np
# choose codec according to format needed
fourcc = cv2.VideoWriter_fourcc(*'mp4v')
video = cv2.VideoWriter('video.avi', fourcc, 1, (width, height))
for j in range(0,5):
img = cv2.imread(str(i) + '.png')
video.write(img)
cv2.destroyAllWindows()
video.release()
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us