I'm looking for the simplest way to extract the embedded jpg preview from a Nikon raw file (.nef) in Python 2.7. How should I do this?
Asked
Active
Viewed 533 times
1 Answers
1
Although I have not been able to test it, it may work with rawpy
to read the .nef
file and imageio
to save it as jpg
:
import rawpy
import imageio
path = 'image.nef'
with rawpy.imread(path) as raw:
rgb = raw.postprocess()
imageio.imsave('default.jpg', rgb)

otorrillas
- 4,357
- 1
- 21
- 34