Page 1 of 1
NEF to JPG conversion
Posted: 2013-03-18T15:15:45-07:00
by ChrisH
While converting from a .NEF file to .jpg file, I noticed two issues. First the jpg image has added black columns of pixels on the one edge now. Second, the color has also changed from the original, making the jpg brighter.
Are there additional options that could be applied to resolve these issues? Any suggestions are appreciated. Thanks!
Here is the command line used in ImageMagick 6.8.2-3 2013-01-30 Q16.
convert input.NEF -quality 98% output.jpg
Re: NEF to JPG conversion
Posted: 2013-03-18T17:15:47-07:00
by snibgo
What camera are you using? My Nikon D800 produces black pixels down one side. I think this is because dcraw pulls out all the available pixels, including the ones down the side of the sensor that don't get any light. When the image is trimmed to the manufacturer's specified number of pixels, I don't get any black pixels.
Second, the color has also changed from the original, making the jpg brighter
What original? The NEF file is the original. Everything else (including any image you see on your computer screen) is processed from that original.
If you are comparing it to the JPG produced by the camera, it will be different. Any in-camera processing is applied during the processing by the camera. ImageMagick doesn't know about this proccesing, so won't apply it.
Re: NEF to JPG conversion
Posted: 2013-03-19T15:24:05-07:00
by ChrisH
Thank you for the explanation regarding the black pixels. This makes sense with what I'm seeing.
I'm working with a D800E. The pics were taking in the NEF format. When I compare a JPG converted from the NEF format in a Nikon software to a JPG from the same NEF converted in ImageMagick, I notice that some neutral tones are becoming blown out. I don't want to lose those details. Are there any options in ImageMagick to apply during the conversion so that this does not happen?
Re: NEF to JPG conversion
Posted: 2013-03-19T15:29:13-07:00
by fmw42
I don't know much about NEF format. But any such settings or defines would usually be identified at
http://www.imagemagick.org/script/formats.php#supported and I do not see any for NEF.
There are controls for creating the JPG. See the same file as above and also
http://www.imagemagick.org/Usage/formats/#jpg
It is mostly -quality and -compression and -sampling-factor.
But you can apply many different brightness, contrast like operators (linear or non-linear) during the conversion to maintain such detail.
Re: NEF to JPG conversion
Posted: 2013-03-19T16:35:21-07:00
by snibgo
What exactly do you mean by "some neutral tones are becoming blown out"?
I use dcraw directly, rather than letting ImageMagick use dcraw as a delegate. That way, I have full control over white balance etc, including over options that ensure highlights don't become blown out, or even to recover blown highlights. I can even get the totally raw Bayer data, as it came off the sensor, should I want it.
Then, IM has a vast array of image processing abilities, before saving the image as JPG, TIFF, PNG or whatever. See
http://www.imagemagick.org/script/comma ... ptions.php
Re: NEF to JPG conversion
Posted: 2013-03-20T15:34:02-07:00
by ChrisH
Thanks for the links.
I'm just trying to find a way to keep the same quality in the JPGs that I see in the NEF files. But I don't really understand all of these options. Could this be a color space or profile issue?
Re: NEF to JPG conversion
Posted: 2013-03-20T15:57:33-07:00
by snibgo
My crystal ball is on the blink. If you put up a NEF file and the corresponding camera's JPEG, that might help. (Put them on a free site somewhere, and post the URLs here.)
You should, of course, be able to get a better quality image from the NEF than the camera's JPEG. Otherwise, there's no point to keeping the NEF.