Warning
Compression is not stable. Huge errors in implementation will destroy the output.
pip install git+https://github.com/sarimbinwaseem/rsimageconvertor.git@mainfrom rsimageconvertor.convertor import Convertor
con = Convertor()- For one image
con.convertOne("path/to/image.<heic, dng, etc>")- For entire folder
con.convertAll("path/to/folder")A prompt will ask for PNG or JPEG file format
Simply type png or jpg
con.compressOne("path/to/image.<ext>", size = 2000, form = "same")path: path to image
size: maximum size needed with miniumum resize of picture
form: save as PNG or JPG or any other PIL supported format, if "same" is passed, final image will be in same format as original.