From: Floyd L. Davidson <floyd@apaflo.com>
Subject: Re: D80 workflow under Linux
Full headers:
Path: reader.athenanews.com!master.readnews.com!198.186.190.247.MISMATCH!news-out.readnews.com!news-xxxfer.readnews.com!newshub.sdsu.edu!tethys.csu.net!nntp.csufresno.edu!sn-xt-sjc-02!sn-xt-sjc-09!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail
From: floyd@apaflo.com (Floyd L. Davidson)
Newsgroups: rec.photo.digital
Subject: Re: D80 workflow under Linux
Date: Tue, 01 Jan 2008 14:56:59 -0900
Organization: __________
Message-ID: <87y7b9p0ac.fld@barrow.com>
References: <yibzlvp45p9.fsf@coxeter.math.toronto.edu>
User-Agent: gnus 5.10.6/XEmacs 21.4.15/Linux 2.6.19
Cancel-Lock: sha1:s2S6buwKtRPrCjOeRfMas+uYeiQ=
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@supernews.com
Lines: 137
Print Article
Forward Article
marco<marco@reimeika.ca> wrote:
>Hello,
>
>I'm planning on purchasing a Nikon D80 soon, but I just want to
>make sure the following workflow is OK under Linux:
>
>1) The camera is connected via USB and the RAW files downloaded
>   using gphoto2:
>
>   gphoto2 --get-all-files

I would assume that will work, but absolutely would
*not* recommend doing it!  Last time I knew, Nikon will
not share their control protocols, and /gphoto2/ cannot
really do much with Nikon cameras.  It almost certainly
can download files though, using the camera as a USB
storage device.  (But I have *NOT* verified the accuracy
of those comments.)

Regardless of whether /gphoto2/ does or does not work,
using the camera as USB mass storage device is not a
good idea.  It takes significant time, needlessly runs
the camera's battery down, and you cannot continue
taking pictures while doing it.

Get a CF card reader.  Apparently the firewire readers
are the fastest, followed by USB 2.0 readers (try a few,
because some are not fast at all), and the slowest are
readers that plug into PCMCIA slots.  (Don't even think
about a USB 1.0 reader.)

>2) RAW files can be decoded using dcraw:
>
>   dcraw -c file0001.nef | cjpeg > file0001.jpg

That will work, but is not recommended either.  The
default parameters for /dcraw/ are probably not what you
want!  Using /dcraw/ directly to adjust parameters would
be a tedious task at best.

Use /ufraw/.  First, use the GUI to determine parameter
values.  Then, for all NEF files that you feel should be
processed with that set of parameters, use /ufraw-batch/
to process them.  Note that /ufraw/ can generate JPEG
images if that is what you want.

For example, to process one NEF file:

  ufraw dsc_0001.nef

That can generate a PPM, TIFF, JPEG or PNG image file,
plus an "ID" file (dsc_0001.ufraw) that can be used as
a configuration file for future calls to /ufraw/.

To then process all NEF files in this directory with
the same parameters:

  ufraw-batch --conf=dsc_0001.ufraw *.nef

Also, for most command line work, using tools from
ImageMagick is prefered.  Hence if you insist on using
/dcraw/, it might be better to do this:

  dcraw -c dsc_0001.nef | convert - dsc_0001.jpg

>   Is the white balance encryption an issue?

No.

>   dcraw has various options to process the RAW files, is this
>   the best (or maybe only) way to manipulate NEF files under
>   Linux?

Well...  the code in /dcraw/, from Dave Coffin, is
almost certainly the best regardless of platform.  But
he is providing a conversion code template, not a
polished front end.

The UFRAW package puts a very nice front end on the code
from /dcraw/, and is by far the nicest way to work under
Linux.  Other platforms do have programs that equal it,
but it is a matter of opinion about whether any are
better.

>3) If necessary, JPG files can be tweaked with GIMP.

Yes, but that too isn't such a hot idea!  JPEG is a
lossy format.  It is *intended* to reduce the size of
the file produced to the absolute minimum required to
provide the image as viewed.  It does that by tossing
out as much redundant and excess data as possible.  But
tweaking an image _needs_ that data!  Hence tweaking
is much easier done using a lossless format, such as
PPM or TIFF, rather than JPEG.

Plus, every time you edit and then save a JPEG file, it
goes through the process again... and each time it
leaves artifacts that aren't usually very visible.  But
each iteration thinks the artifacts from the previous
edit are intended to be there...  and the image is
progressively degraded.

You'd be _much_ better off to use the disk space (and it
will require a *lot* of disk, but 500GB drives are
cheap), and convert from RAW to something like 8 bit
PPM, and then edit that.  You can save edits in GIMP as
XCF format if you want to come back and do more (it will
keep layers and so on).  But saving intermediate PPM
format files will not degrade your images.

Only the *final* output file should ever be in JPEG
format.  Hence, if you want to post an image on your
website, and perhaps offer three different sizes, plus
you want to print a paper image too...  generate *four*
different JPEG files, all from a single PPM file!  Do
*not* resize any of the JPEG files to get smaller ones.
(You can do that with The GIMP, or using /convert/ from
Imagemagick.)

>Any further tips, suggestions and cautionary tales are appreciated.

You'll need lots of hard disk.  You'll need at least
1-1/2 GB of RAM.  And a read/write DVD.  A good monitor
is nice, but two of them are *really* nice!

In addition to The GIMP, UFRAW, and ImageMagick, you
most certainly will eventually want EXIFTOOLS.  I use
/xv/ (with patches)  and /gqview/ for viewing.

If you are a programmer, the Python interface to GIMP
is harder to get going than the Scheme interface, but
it is *far* better to use.  Otherwise, /bash/ shell scripts
are good enough for just about everything.

-- 
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) floyd@apaflo.com