@@ -0,0 +1,562 @@
+# Usage: python examples/save_jpeg_using_pil.py src.CR2 dest.jpg%0A# Requires PIL (pip install pillow)%0Aimport sys%0Afrom PIL import Image%0Afrom rawkit.raw import Raw%0A%0A%0Asrc = sys.argv%5B1%5D%0Adest = sys.argv%5B2%5D%0A%0A%0Awith Raw(filename=src) as raw:%0A    rgb_buffer = raw.to_buffer()%0A%0A    # Convert the buffer from %5Br, g, b, r...%5D to %5B(r, g, b), (r, g, b)...%5D%0A    rgb_tuples = %5B%0A        tuple(rgb_buffer%5Bi:i+3%5D) for i in range(0, len(rgb_buffer), 3)%0A    %5D%0A%0A    image = Image.new('RGB', %5Braw.metadata.width, raw.metadata.height%5D)%0A    image.putdata(rgb_tuples)%0A    image.save(dest)%0A

Add example saving jpg using pillow