Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import rawpy
- import imageio
- import glob
- import os
- raw_file_type='cr2'
- file_location='D:\input'+'/'
- raw_images = glob.glob(file_location + '*' + raw_file_type)
- for raw_image in raw_images:
- file_name = os.path.basename(raw_image)[:-(len(raw_file_type)+1)]
- with rawpy.imread(raw_image) as raw:
- rgb = raw.postprocess()
- imageio.imsave('D:\output'+'/'+file_name+'.png', rgb)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement