OpenCVを使用して簡易に画像圧縮形式を変換するスクリプトです。
- opencv-python 4.5.2.52(or later)
- tqdm 4.48.2 (or later)
python source_dir target_dir --mode=0
source_dir:変換元画像が格納されているディレクトリ
target_dir:変換後の画像を保存するディレクトリ
--mode:変換モード(0:JPG→PNG(デフォルト) 1:PNG→JPG)
高橋かずひと(https://twitter.com/KzhtTkhs)
convert_image_compression is under Apache 2 license.