Last active
January 26, 2018 06:17
-
-
Save salihkaragoz/28ed2ba7c6264924308ee78033389c31 to your computer and use it in GitHub Desktop.
Convert PNGs to JPGs under a folder with opencv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Written by MSK | |
import glob | |
import cv2 | |
pngs = glob('./*.png') | |
for png in pngs: | |
img = cv2.imread(png) | |
cv2.imwrite(png[:-3] + 'jpg', img) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment