UFRaw - Unidentified Flying Raw
Raw photo loader plugin for The GIMP
(http://ufraw.sourceforge.net/)
by Udi Fuchs,

UFRaw is a utility to read and manipulate raw images from digital cameras.
It can be used by itself or as a GIMP plug-in.
It reads raw images using Dave Coffin's raw conversion utility DCRaw.
It supports basic color management using Little CMS, allowing the user to
apply color profiles.
 
UFRaw was originally based on the GIMP plug-in by Dave Coffin
http://www.cybercom.net/~dcoffin/
and on Pawel T. Jochym's (jochym at ifj edu pl) GIMP plug-in.

UFRaw is licensed under the GNU General Public License.

Installation
============
Requires GIMP 2.0, the GIMP development package, GTK+ >= 2.4 and lcms.
If you have GTK+ >= 2.6 you will get the extra option of seeing hidden
files in the file chooser dialogs.

The UFRaw build process expects Perl to be present (for pod2man).

(If you are using the CVS version you should first run ./autogen.sh
and check the "Development version" section in this README.)

The first step of the installation, is to run:
./configure

At the end of the configuration you will get a summary of the installation
settings. It should look like that:

configure: ====================== summary =====================
configure: build GIMP plug-in: yes
configure: hidden directories support (GTK>=2.6): yes
configure: EXIF support using libexif: no
configure: EXIF support using exiv2: no
configure: JPEG support: yes
configure: TIFF support: yes
configure: lossless compressed TIFF support: yes

If some of the lines end with 'no' instead of 'yes', it is not the end of
the world. It only means that this option in UFRaw will be disabled. EXIF
support is disabled by default. It can be enabled for Canon (CRW, CR2),
Minolta (MRW), Nikon (NEF), Pentax (PEF), Samsung (PEF), Sony (SR2, ARW)
and Adobe's DNG by running configure as:
./configure --with-exiv2 (requires exiv2-0.10 or newer)
and for Fuji (RAF) by:
./configure --with-libexif (requires libexif-0.6.13 or newer)

These paragraphs use the term "development package"; the general
requirement is to have the full library installed, including header
files used in compilation of programs using the library.

The libjpeg development package is required for saving image in the
JPEG format in the stand-alone tool. It is also needed to support
Kodak DC120. If the configuration script does not find this package
the above options will be suppressed.

The libtiff development package is required for saving images in the
TIFF format. If the configuration script does not find this package
this option will be suppressed.

The zlib package is required for saving images in the TIFF format with
lossless compression. If the configuration script does not find this package
this option will be suppressed.

Other options for the configuration script are:

--disable-gimp : do not build the GIMP plug-in and hence the GIMP development
                 package is not needed.

--enable-extras: build the extra binaries - dcraw, ufraw-exif, nikon-curve.

--with-libexif:  use libexif to read raw EXIF data.

--with-exiv2:    use Exiv2 to read raw EXIF data.

--with-prefix=PREFIX: use also PREFIX as input prefix for the build.

--with-dosprefix=PREFIX: PREFIX is the prefix in dos format
                         (needed only in windows).

To build UFRaw:
make

To make a system wide installation:
make install

To install for a single user:
make install-user

You also need to make sure that rawphoto is not installed.

If one of the packages (lcms, libjpeg, libtiff, zlib) is not installed
on your system, you can build it locally and use UFRaw's configuration
option --with-prefix to point to its location.
To build any of the above packages download the package and type:
./configure --prefix=$PREFIX
make
make install

If zlib is built only locally you will have to configure libtiff with
the command:
./configure --prefix=$PREFIX --with-zlib-include-dir=$PREFIX/include --with-zlib-lib-dir=$PREFIX/lib

Finally, you should configure UFRaw with the command:
./configure --prefix=$PREFIX --with-prefix=$PREFIX

MS-Windows installation
=======================
Windows users can simply download ufraw-VERSION-setup.exe that automatically
installs UFRaw.

Here are a few pointers if you still want to build UFRaw yourself.

'make install' will try to make a Unix like installation into /usr/local.
'make windows-installer' will create a windows installer and
'make install-windows' will run this installer.

For creating the installer UFRaw needs to know the path to all the DLLs.
For this you should use the configuration option --with-dosprefix.
For example, from CygWin:
./configure --with-prefix=/cygdrive/c/mingw32  --with-dosprefix=c:\\mingw32 \
    --target=i686-mingw32msvc --host=i686-mingw32msvc --build=i686-mingw32msvc

pkg-config behaves differently under MinGW32. Therefore, if you are
cross compiling from Linux or CygWin, you will have to modify all the
*.pc files that come with the different packages. The following script
should does the trick in debian (update TARGET to your needs):

TARGET=/opt/i586-mingw32msvc
for f in $TARGET/lib/pkgconfig/*.pc ; do
  cat $f | sed s+^prefix=.*+prefix=$TARGET+ > $f.tmp
  mv $f.tmp $f
done

The gimp-dev package can be tricky to find. You can download it from:
http://www.gimp.org/win32/gimp-dev-2.2.7.zip

To build Cygwin binaries you can use the development libraries from:
http://cygwinports.dotsrc.org/

CVS
===
UFRaw has a CVS repository on sourceforge. To use the repository you need
autoconf and automake to be installed. You should './autogen.sh' before
'./configure'.

Using the CVS, new versions of dcraw.c can be easily updated. Copy the latest
version of dcraw.c from Dave Coffin to a UFRaw working directory with the
filename dcraw.cc. Then type:

cvs update -r dcraw-original-branch dcraw.cc
cvs commit -m "dcraw original 7.86 (1.304)." dcraw.cc
cvs update -A
cvs update -j dcraw-original-latest -j dcraw-original-branch dcraw.cc
cvs commit -m "dcraw modified 7.86 (1.304)." dcraw.cc
cvs tag -F -r dcraw-original-branch dcraw-original-latest dcraw.cc

This would commit the original dcraw.cc to the dcraw-original-branch and
update the modified dcraw.cc in the main trunk. Remember to use the correct
version (7.86 in the example) and revision (1.304 in the example) numbers.

This update procedure is not full proof. First there can be conflict that
have to be resolved. But even if there are no conflicts, one should check
if there are new global variable or functions and add them to dcraw.h.
also if there where changes in scale_colors(), border_interpolate(),
lin_interpolate(), vng_interpolate(), cam_to_cielab(), ahd_interpolate(),
convert_to_rgb(), fuji_rotate(), flip_image(), main(). Such a change could
effect dcraw_indi.c or dcraw_api.cc.

Development version
===================
The development version has the following caveats:

./autogen.sh must be run before ./configure.

The format of the ID files and of the configuration file $HOME/.ufrawrc
may and will change before the final release. I try to make sure that the
new releases will read such files correctly even if they are from previous
releases. No attempt is made to keep backward compatibility with the different
stages of the development versions. If you use the development version you
might have to delete or fix manually such files from time to time.

Last but not least, the development version is poorly tested and has some
half written features, therefore it is bound to have bugs...

For Packagers
=============
You are free to package UFRaw in any way, as long as it complies with the
GNU GPL. The followings are just recommendations.

Do not package the executables generated by by --enable-extras. These extras
are there for testing the code during development. They are of no interest
to end user. Specifically, if you want to package dcraw, you should use
Dave's original code and not UFRaw's modified code.

Notice also that the UFRaw executables have different dependencies.
* ufraw-gimp depends on libgimp and all its derivatives.
* ufraw only depends on libgtk and its derivatives.
* ufraw-batch only depends on glib.
In addition all the executables may depend on lcms, libjpeg, libtiff, zlib,
and libexif, depending on the way you configured UFRaw's build.

Lastly, I'm requesting that you should consider adding a link to
http://ufraw.sourceforge.net/ where ever is appropriate on the package page.
This site is the main source of information about UFRaw, including an up to
date user guide.

History
=======

11/08/2006 - UFRaw-0.9.1 released, based on DCRaw v8.29.
* Recognize Sony's *.arw file type.
* Redirect exiv2 warnings from the terminal to the log.
* Fix build for some build environments (libjpeg errors).
* Treat Minolta's Alpha and Maxxum models as the Dynax model for WB presets.

03/08/2006 - UFRaw-0.9 released, based on DCRaw v8.28.
* Display EXIF data in user interface.
* Add darkframe subtraction option.
* More conservative highlight unclipping.
* Support filenames in URI format.
* Some bug corrections.

13/05/2006 - UFRaw-0.8.1 released, based on DCRaw v8.15.
* Fix Gimp plug-in half-interpolation crash.
* Fix possible crash in auto-exposure.

04/05/2006 - UFRaw-0.8 released, based on DCRaw v8.13.
* Preliminary zoom support, only up to 50% and with no scrolling.
* Auto white balance is much faster.
* Auto exposure is smarter, and hopefully better.
* Auto black and auto curve are much faster.
* EXIF data of Canon CRW files can be read using Exiv2 (not enabled by default).
* EXIF data of Fuji RAF files can be read using libexif (not enabled by default).
* White balance presets for more cameras.
* Fix the bug that sometimes caused a 'maze effect'.
* A few minor bug fixes.

03/03/2006 - UFRaw-0.7 released, based on DCRaw v8.05.
* Much more accurate white balance temperature setting.
* White balance presets per camera model.
* Show the channel multipliers in the UI.
* Apply base curve before gamma curve.
* Fix a few general bugs.
* Fix camera specific bugs for Sony F828, Sigma Foveon, Nikon D2H, D1X.

13/11/2005 - UFRaw-0.6 released, based on DCRaw v7.84.
* Enabled AHD (Adaptive Homogeneity-Directed) interpolation.
* Added base curve, which simulates Nikon tone curve behavior.
  (The old correction curve is still there.)
* Automatically apply the embedded custom curve only if the camera
  was setup to use this curve.
* Support the D1X rectangular pixels.
* Fix EXIF support with libtiff 3.7.4.
* Some bug fixes.

25/09/2005 - UFRaw-0.5 released, based on DCRaw v7.65.
* Read support for Nikon Tone Curve (NTC/NCV) files.
* Added a curve editor.
* Added control on the base curve (see the user guide for more information).
* Support the new DCRaw color matrices for better color rendering.
* More controls can be set from the command-line.
* Preliminary EXIF support.
* New UFRaw ID files contain all the conversion parameters and allow
  for batch conversion.
* New 'ufraw-batch' replaces 'ufraw --batch'.
* Numerous other changes.
* Notice that the new Adaptive Homogeneity-Directed interpolation
  is still not enabled.

08/02/2005 - UFRaw-0.4 released, based on DCRaw v6.33.
* Rotate Fuji images by 45 degrees.
* Preview dialog is more responsive.
* Disable internationalization for Hebrew and Arabic (The right to left setting
  doesn't do good to the preview dialog).
* Bug correction - ufraw --batch did not calculate WB in some cases.
* Bug correction - Seg Fault for some images.

23/01/2005 - UFRaw-0.3 released, based on DCRaw v6.23.
* Added basic color management support using Little CMS.
* Made a stand-alone version with a GUI interface and batch processing support.
  Images can be saved in the PPM, TIFF, and JPEG formats.
* Settings are saved between sessions in a configuration file.
* Added white balance presets (direct sunlight, cloudy, shade, flash, etc.)
* Several possible live histograms.
* Initial (a bit slow) support for thumbnails in the GIMP 2.0 open file dialog.
* Many smaller changes.

28/10/2004 - UFRaw-0.2 released, based on DCRaw v6.10.
* Added support for Nikon Tone Curves.
* This version can be used on the smaller 1024x768 screens.
* I'm finally satisfied with the Saturation control.
* Many small changes.

11/10/2004 - UFRaw-0.1 released, based on DCRaw v6.07.
* Initial version.

Todo
====
* Show some Exif Data in dialog.
* Add the UFRaw parameters used to the Exif data.
* Curve corrections per channel.
* Configurable preview image size.
* Rotate by 90 degrees.
* Zoom.
* Crop.
* Spot query - mark on histograms.
* Multi spot query (when pressing the control key).
* Show camera overexposures.
* Help (based on the webpage).
* Calculate width of the dialog control column
  and set raw histogram to that width.
* Add a "Send to GIMP" option in the stand-alone tool.
* Improve the unclip highlights option.
