Logo elodees  elodees

A caring AI for a better world













Only alphabetic characters accented or not as well as the space are accepted

Logo IA




Convert NEF format to JPEG





No account yet ?

Sign up to access all content




NEF (Nikon Electronic Format).

NEF is the file extension used by Nikon for their RAW image files.

To work with an image so that you can extract detail without losing resolution, it is necessary to have a RAW file.

RAW is the universal group of image file formats captured by digital cameras. RAW format images are much larger because they store all the information captured by the camera sensor.

So you can work more efficiently with RAW files.

Mais est-ce que NEF et RAW sont la même chose ?

Oui car .NEF est l'extension de fichier utilisée par les reflex numériques Nikon et les appareils photo sans miroir pour leurs fichiers d'image RAW.



This python script converts a directory of raw (nef format) images to jpg.



Tested in Anaconda and Python 3.7

import glob
import rawpy
import imageio
import time
 
def main():
    # Timer is optional
    print("Starting Now")
    start = time.time()
 
    pathnef = "nef/*.nef"
    count = 0
    for path in glob.glob(pathnef):
        with rawpy.imread(path) as raw:
            rgb = raw.postprocess()
            imageio.imwrite(path.replace('.nef', '') + '.jpg', rgb)
            count = count + 1
            print('image #', count, ' done')
 
    # Timer is optional
    end = time.time()
    minutes = (end - start) / 60
    seconds = (end - start) % 60
 
    print("Elapsed Time:", round(minutes), "minutes and ", round(seconds), "seconds")
 
if __name__ == '__main__':
    main()
 


nef-to-jpg - GitHub



Downloading the nef2jpeg.nef file



NEF to JPEG


Light Vs Colors












Welcome, my name is Eric Soupet and I am the administrator of the site elodees.com. elodees.com is a state of the art of Artificial Intelligence and aims to be collaborative, you can now offer content such as articles, events, tutorials, ... so don't hesitate !

Platform images credit : Pixabay - Pixabay License | Pexels - Pexels License