浏览代码

Added RAW image format. Resolves #3.

Brucey 3 年之前
父节点
当前提交
cd98a90eab
共有 100 个文件被更改,包括 19638 次插入0 次删除
  1. 35 0
      raw.mod/common.bmx
  2. 34 0
      raw.mod/examples/example_01.bmx
  3. 二进制
      raw.mod/examples/gh2.rw2
  4. 171 0
      raw.mod/glue.cpp
  5. 4 0
      raw.mod/libraw/.clang-format
  6. 27 0
      raw.mod/libraw/COPYRIGHT
  7. 2576 0
      raw.mod/libraw/Changelog.txt
  8. 20 0
      raw.mod/libraw/DEVELOPER-NOTES
  9. 21 0
      raw.mod/libraw/GoPro/dng-sdk-allow-VC5-validate.diff
  10. 29 0
      raw.mod/libraw/GoPro/gpr_read_image.cpp.diff
  11. 12 0
      raw.mod/libraw/GoPro/gpr_read_image.h.diff
  12. 51 0
      raw.mod/libraw/INSTALL
  13. 340 0
      raw.mod/libraw/LICENSE.CDDL
  14. 458 0
      raw.mod/libraw/LICENSE.LGPL
  15. 19 0
      raw.mod/libraw/LibRaw.pro
  16. 123 0
      raw.mod/libraw/LibRaw.sln
  17. 140 0
      raw.mod/libraw/Makefile.am
  18. 491 0
      raw.mod/libraw/Makefile.devel
  19. 230 0
      raw.mod/libraw/Makefile.devel.nopp
  20. 227 0
      raw.mod/libraw/Makefile.devel.noppr2i
  21. 497 0
      raw.mod/libraw/Makefile.dist
  22. 297 0
      raw.mod/libraw/Makefile.mingw
  23. 628 0
      raw.mod/libraw/Makefile.msvc
  24. 43 0
      raw.mod/libraw/README.DNGSDK.txt
  25. 103 0
      raw.mod/libraw/README.GoPro.txt
  26. 62 0
      raw.mod/libraw/README.RawSpeed.txt
  27. 9 0
      raw.mod/libraw/README.cmake
  28. 17 0
      raw.mod/libraw/README.demosaic-packs
  29. 106 0
      raw.mod/libraw/README.md
  30. 15 0
      raw.mod/libraw/RawSpeed/rawspeed.cpucount-unix.patch
  31. 84 0
      raw.mod/libraw/RawSpeed/rawspeed.qmake-pro-files.patch
  32. 39 0
      raw.mod/libraw/RawSpeed/rawspeed.samsung-decoder.patch
  33. 13 0
      raw.mod/libraw/RawSpeed/rawspeed.uncompressed-color-dng.patch
  34. 186 0
      raw.mod/libraw/RawSpeed/rawspeed.win32-dll.patch
  35. 4115 0
      raw.mod/libraw/RawSpeed/rawspeed_xmldata.cpp
  36. 2 0
      raw.mod/libraw/bin/.keep_me
  37. 5 0
      raw.mod/libraw/buildfiles/4channels.pro
  38. 145 0
      raw.mod/libraw/buildfiles/4channels.vcxproj
  39. 18 0
      raw.mod/libraw/buildfiles/4channels.vcxproj.filters
  40. 6 0
      raw.mod/libraw/buildfiles/dcraw_emu.pro
  41. 145 0
      raw.mod/libraw/buildfiles/dcraw_emu.vcxproj
  42. 18 0
      raw.mod/libraw/buildfiles/dcraw_emu.vcxproj.filters
  43. 6 0
      raw.mod/libraw/buildfiles/dcraw_half.pro
  44. 145 0
      raw.mod/libraw/buildfiles/dcraw_half.vcxproj
  45. 18 0
      raw.mod/libraw/buildfiles/dcraw_half.vcxproj.filters
  46. 10 0
      raw.mod/libraw/buildfiles/half_mt.pro
  47. 28 0
      raw.mod/libraw/buildfiles/libraw-common-lib.pro
  48. 8 0
      raw.mod/libraw/buildfiles/libraw-common.pro
  49. 70 0
      raw.mod/libraw/buildfiles/libraw.pro
  50. 234 0
      raw.mod/libraw/buildfiles/libraw.vcxproj
  51. 295 0
      raw.mod/libraw/buildfiles/libraw.vcxproj.filters
  52. 6 0
      raw.mod/libraw/buildfiles/mem_image.pro
  53. 145 0
      raw.mod/libraw/buildfiles/mem_image.vcxproj
  54. 18 0
      raw.mod/libraw/buildfiles/mem_image.vcxproj.filters
  55. 6 0
      raw.mod/libraw/buildfiles/multirender_test.pro
  56. 145 0
      raw.mod/libraw/buildfiles/multirender_test.vcxproj
  57. 18 0
      raw.mod/libraw/buildfiles/multirender_test.vcxproj.filters
  58. 6 0
      raw.mod/libraw/buildfiles/openbayer_sample.pro
  59. 145 0
      raw.mod/libraw/buildfiles/openbayer_sample.vcxproj
  60. 18 0
      raw.mod/libraw/buildfiles/openbayer_sample.vcxproj.filters
  61. 4 0
      raw.mod/libraw/buildfiles/postprocessing_benchmark.pro
  62. 145 0
      raw.mod/libraw/buildfiles/postprocessing_benchmark.vcxproj
  63. 18 0
      raw.mod/libraw/buildfiles/postprocessing_benchmark.vcxproj.filters
  64. 6 0
      raw.mod/libraw/buildfiles/raw-identify.pro
  65. 145 0
      raw.mod/libraw/buildfiles/raw-identify.vcxproj
  66. 18 0
      raw.mod/libraw/buildfiles/raw-identify.vcxproj.filters
  67. 6 0
      raw.mod/libraw/buildfiles/rawtextdump.pro
  68. 145 0
      raw.mod/libraw/buildfiles/rawtextdump.vcxproj
  69. 18 0
      raw.mod/libraw/buildfiles/rawtextdump.vcxproj.filters
  70. 6 0
      raw.mod/libraw/buildfiles/simple_dcraw.pro
  71. 145 0
      raw.mod/libraw/buildfiles/simple_dcraw.vcxproj
  72. 18 0
      raw.mod/libraw/buildfiles/simple_dcraw.vcxproj.filters
  73. 6 0
      raw.mod/libraw/buildfiles/unprocessed_raw.pro
  74. 145 0
      raw.mod/libraw/buildfiles/unprocessed_raw.vcxproj
  75. 18 0
      raw.mod/libraw/buildfiles/unprocessed_raw.vcxproj.filters
  76. 12 0
      raw.mod/libraw/clist2c.pl
  77. 54 0
      raw.mod/libraw/clist2html.pl
  78. 153 0
      raw.mod/libraw/configure.ac
  79. 174 0
      raw.mod/libraw/doc/API-C.html
  80. 910 0
      raw.mod/libraw/doc/API-CXX.html
  81. 1303 0
      raw.mod/libraw/doc/API-datastruct.html
  82. 305 0
      raw.mod/libraw/doc/API-notes.html
  83. 66 0
      raw.mod/libraw/doc/API-overview.html
  84. 124 0
      raw.mod/libraw/doc/Install-LibRaw.html
  85. 213 0
      raw.mod/libraw/doc/Samples-LibRaw.html
  86. 65 0
      raw.mod/libraw/doc/Why-LibRaw.html
  87. 38 0
      raw.mod/libraw/doc/index.html
  88. 28 0
      raw.mod/libraw/export-dist.sh
  89. 66 0
      raw.mod/libraw/internal/dcraw_defs.h
  90. 25 0
      raw.mod/libraw/internal/dcraw_fileio_defs.h
  91. 193 0
      raw.mod/libraw/internal/defines.h
  92. 27 0
      raw.mod/libraw/internal/dmp_include.h
  93. 316 0
      raw.mod/libraw/internal/libraw_cameraids.h
  94. 130 0
      raw.mod/libraw/internal/libraw_cxx_defs.h
  95. 405 0
      raw.mod/libraw/internal/libraw_internal_funcs.h
  96. 215 0
      raw.mod/libraw/internal/var_defines.h
  97. 539 0
      raw.mod/libraw/internal/x3f_tools.h
  98. 3 0
      raw.mod/libraw/lib/Makefile
  99. 12 0
      raw.mod/libraw/libraw.pc.in
  100. 537 0
      raw.mod/libraw/libraw/libraw.h

+ 35 - 0
raw.mod/common.bmx

@@ -0,0 +1,35 @@
+' Copyright (c) 2021 Bruce A Henderson
+'
+' This software is provided 'as-is', without any express or implied
+' warranty. In no event will the authors be held liable for any damages
+' arising from the use of this software.
+'
+' Permission is granted to anyone to use this software for any purpose,
+' including commercial applications, and to alter it and redistribute it
+' freely, subject to the following restrictions:
+'
+'    1. The origin of this software must not be misrepresented; you must not
+'    claim that you wrote the original software. If you use this software
+'    in a product, an acknowledgment in the product documentation would be
+'    appreciated but is not required.
+'
+'    2. Altered source versions must be plainly marked as such, and must not be
+'    misrepresented as being the original software.
+'
+'    3. This notice may not be removed or altered from any source
+'    distribution.
+'
+SuperStrict
+
+Import BRL.Pixmap
+
+Import "source.bmx"
+
+
+Extern
+	Function libraw_init:Byte Ptr(flags:Int)
+	Function libraw_recycle(handle:Byte Ptr)
+	Function libraw_close(handle:Byte Ptr)
+
+	Function bmx_image_raw_load:TPixmap(handle:Byte Ptr, stream:TStream)
+End Extern

+ 34 - 0
raw.mod/examples/example_01.bmx

@@ -0,0 +1,34 @@
+SuperStrict
+
+?win32
+Framework SDL.d3d9sdlmax2d
+?Not win32
+Framework SDL.gl2sdlmax2d
+?
+Import Image.Raw
+Import BRL.Standardio
+
+Local pix:TPixmap = LoadPixmap("gh2.rw2")
+
+If pix Then
+	Print pix.width + ", " + pix.height
+Else
+	Print "Unable to load file"
+	End
+End If
+
+Graphics 1024, 768, 0
+
+local resized:TPixmap = ResizePixmap(pix, 1024, 768)
+Local img:TImage = LoadImage( resized )
+
+While Not KeyDown(KEY_ESCAPE)
+	Cls
+
+	if img Then
+		DrawImage img, 0, 0
+	End If
+
+
+	Flip
+Wend

二进制
raw.mod/examples/gh2.rw2


+ 171 - 0
raw.mod/glue.cpp

@@ -0,0 +1,171 @@
+/*
+ Copyright (c) 2021 Bruce A Henderson
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+    1. The origin of this software must not be misrepresented; you must not
+    claim that you wrote the original software. If you use this software
+    in a product, an acknowledgment in the product documentation would be
+    appreciated but is not required.
+
+    2. Altered source versions must be plainly marked as such, and must not be
+    misrepresented as being the original software.
+
+    3. This notice may not be removed or altered from any source
+    distribution.
+*/
+#include "libraw/libraw.h"
+
+#include "brl.mod/blitz.mod/blitz.h"
+
+extern "C" {
+    int image_raw__stream_seek(BBObject *stream, BBInt64 offset, int origin);
+    int image_raw__stream_read(BBObject *stream, void * buf, size_t count);
+    BBInt64 image_raw__stream_tell(BBObject *stream);
+    BBInt64 image_raw__stream_size(BBObject *stream);
+    int image_raw__stream_eof(BBObject * stream);
+
+    BBObject * image_raw_TRawImage__NewPixmap(BBINT width,BBINT height);
+    void * image_raw_TRawImage__PixmapPtr(BBObject * pix);
+    void image_raw_TRawImage__PixmapVar(BBObject* bbt_pix, void** pixels,BBINT* pitch);
+
+    BBObject * bmx_image_raw_load(libraw_data_t *lr, BBObject * stream);
+}
+
+class LibRaw_Max_datastream : public LibRaw_abstract_datastream
+{
+private: 
+
+    BBObject * stream;
+
+public:
+
+    LibRaw_Max_datastream(BBObject * _stream) : stream(_stream) {}
+
+	~LibRaw_Max_datastream() {
+	}
+
+    int valid()
+    {
+        return stream != 0 && stream != &bbNullObject;
+    }
+
+    int read(void *buffer, size_t size, size_t count)
+    {
+        return image_raw__stream_read(stream, buffer, size * count);
+    }
+
+    int seek(INT64 offset, int origin)
+    {
+        return image_raw__stream_seek(stream, offset, origin);
+    }
+
+    INT64 tell()
+    {
+        return image_raw__stream_tell(stream);
+    }
+
+    INT64 size()
+    {
+        return image_raw__stream_size(stream);
+    }
+
+    int get_char()
+    {
+        unsigned char c;
+        int r = read(&c, 1, 1);
+        return r > 0 ? c : r;
+    }
+
+    char *gets(char *buffer, int length)
+    {
+        memset(buffer, 0, length);
+		for (int i = 0; i < length; i++) {
+			if (!read(&buffer[i], 1, 1)) {
+				return NULL;
+            }
+			if (buffer[i] == 10) {
+				break;
+            }
+		}
+		return buffer;
+    }
+
+    int scanf_one(const char *fmt, void* val)
+    {
+        std::string buf;
+		char c = 0;
+		do {
+			if (read(&c, 1, 1) == 1) {
+                if ( c == '0' || c == '\n' || c == ' ' || c == '\t') {
+                    break;
+                }
+				buf.append(&c, 1);
+			} else {
+				return 0;
+			}
+		} while(true);
+
+		return sscanf(buf.c_str(), fmt, val);
+    }
+
+    int eof()
+    {
+        return image_raw__stream_eof(stream);
+    }
+};
+
+// --------------------------------------------------------
+
+BBObject * bmx_image_raw_load(libraw_data_t *lr, BBObject * stream) {
+
+    BBObject * pixmap = &bbNullObject;
+
+    LibRaw *ip = (LibRaw *)lr->parent_class;
+    LibRaw_Max_datastream datastream(stream);
+
+    ip->imgdata.rawparams.shot_select = 0;
+	ip->imgdata.params.use_camera_wb = 1;
+	ip->imgdata.params.use_camera_matrix = 1;
+	ip->imgdata.params.half_size = 0;
+
+    if (ip->open_datastream(&datastream) != LIBRAW_SUCCESS) {
+        return pixmap;
+    }
+
+    ip->imgdata.params.output_bps = 8;
+    ip->imgdata.params.gamm[0] = 1/2.222;
+	ip->imgdata.params.gamm[1] = 4.5;
+    ip->imgdata.params.no_auto_bright = 1;
+    ip->imgdata.params.use_auto_wb = 1;
+    ip->imgdata.params.user_qual = 3;
+
+    if (ip->unpack() != LIBRAW_SUCCESS) {
+        return pixmap;
+    }
+
+    if (ip->dcraw_process() != LIBRAW_SUCCESS) {
+        return pixmap;
+    }
+
+    int width, height, cols, bpp;
+    ip->get_mem_image_format(&width, &height, &cols, &bpp);
+
+    pixmap = image_raw_TRawImage__NewPixmap(width, height);
+ 
+    void * ptr;
+    int pitch;
+    image_raw_TRawImage__PixmapVar(pixmap, &ptr, &pitch);
+
+    if (ip->copy_mem_image(ptr, pitch, 0) != LIBRAW_SUCCESS) {
+        return &bbNullObject;
+    }
+
+    return pixmap;
+}

+ 4 - 0
raw.mod/libraw/.clang-format

@@ -0,0 +1,4 @@
+BreakBeforeBraces: Allman
+ColumnLimit: 80
+SortIncludes: false
+TabWidth: 4

+ 27 - 0
raw.mod/libraw/COPYRIGHT

@@ -0,0 +1,27 @@
+ ** LibRaw: Raw images processing library **
+
+Copyright (C) 2008-2021 LibRaw LLC (http://www.libraw.org, [email protected])
+ 
+LibRaw is free software; you can redistribute it and/or modify
+it under the terms of the one of two licenses as you choose:
+
+1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1
+   (See file LICENSE.LGPL provided in LibRaw distribution archive for details).
+
+2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+   (See file LICENSE.CDDL provided in LibRaw distribution archive for details).
+
+LibRaw uses code from dcraw.c -- Dave Coffin's raw photo decoder,
+dcraw.c is copyright 1997-2018 by Dave Coffin, dcoffin a cybercom o net.
+LibRaw do not use RESTRICTED code from dcraw.c
+
+LibRaw uses DCB demosaic and FBDD denoise licensed under BSD-like 3-clause license
+DCB and FBDD are Copyright (C) 2010,  Jacek Gozdz ([email protected])
+
+LibRaw uses X3F library to unpack Foveon Files, licensed BSD-style license
+Copyright (c) 2010, Roland Karlsson ([email protected])
+All rights reserved.
+
+LibRaw uses pieces of code from Adobe DNG SDK 1.4,
+Copyright (c) 2005 Adobe Systems Incorporated, licensed under MIT license
+

+ 2576 - 0
raw.mod/libraw/Changelog.txt

@@ -0,0 +1,2576 @@
+2021-10-22  Alex Tutubalin <[email protected]>
+  
+   == LibRaw snapshot 202110 ==
+   * Camera Format support:
+    - Sony Lossless compressed support
+    - Panasonic v6/12 bit
+ 
+   * Camera support:
+    DJI Mavic Air 2S
+    Fujifilm GFX 50S II;  GFX 100S, X-E4
+    GoPro HERO9, HERO10 (if compiled w/ USE_GPR_SDK)
+    Nikon Z fc
+    Panasonic GH5 Mark II
+    Pentax K3 Mark III
+    Olympus E-P7
+    Ricoh GR IIIx
+    Sony A1, A7R-IIIA (ILCE-7RM3A), A7R-IVA (ILCE-7RM4A), ZV-E10
+    Canon EOS M50 Mark II was supported but not listed in camera list
+
+    Multiple phones tested and added to cameralist.cpp
+
+   * Support for RaspberryPi HQ camera (if compiled w/  USE_6BY9RPI)
+
+   * Improved support for RPi V1/V2 cameras:
+     - white balance data extraction
+     - color matrix extracted to imgdata.color.cmatrix to use with
+       use_camera_matrix.
+     - full-size thumbnail/preview support for JPEG+RAW files (raspistill -r)
+
+  == API-ABI changes ==
+
+  * (INCOMPATIBILITY WITH OLDER VERSIONS!!!) 
+    imgdata.params.shot_select moved to imgdata.rawparams.shot_select
+     (because this is decode-time option, not postprocessing option)
+
+  * libraw_open_bayer(...) added to C-API
+
+  * imgdata.makernotes.canon: separate SensorLeftBorder,SensorTopBorder....
+    (and many other datafields) are united in libraw_area_t (rectangle)
+    groups for crop areas and optical black areas.
+
+  * Additional fields in libraw_internal_data.unpacker_data:
+    - INT64: exif_offset: base offset of 1st EXIF IFD in file
+    - INT64: ifd0_offset: base offset of 1st TIFF IFD (IFD0) in file
+    - unsigned cr3_exif_length, cr3_ifd0_lenght : CR3-specific length of
+     exif and ifd0 sections.
+
+  *  imgdata.sizes.raw_inset_crop rearranged:
+     now it is imgdata.sizes.raw_inset_crops[2]:
+     - item at [0] is the same as imgdatra.sizes.raw_inset_crop in previous 
+      versions
+     - item at [1] is 'user crop', in particular:
+       -- set by DNG  DefaultUserCrop tag
+       -- or set via raw aspect ratio tags (e.g. 16:9 aspect on Fujifilm cameras)
+          raw_inset_crops[1] is filled only if aspect ratio tags provides different
+          aspect ratio compared to raw_inset_crops[0].
+
+   There are no flags to check if raw_inset_crops[Nth] is filled; to see if it is filled check 
+   the values of:
+     ctop/cleft < 0xffff (0xffff => standard values if not initialized)
+     ctop+cheight <= sizes.raw_height
+     cleft+cwidth <= sizes.raw_width
+
+   Note: raw_inset_crops may be fooled by metadata (makernotes), use some correctness check before use.
+
+  * LIBRAW_RAWOPTIONS_USE_DNG_DEFAULT_CROP processing flag removed,
+    DNG DefaultCrop* tags are parsed into raw_inset_crops[0]
+
+  * new LibRaw call LibRaw::adjust_to_raw_inset_crop(unsigned mask, float maxcrop = 0.55f)
+    Promotes imgdata.sizes.raw_inset_crops[] values to
+    imgdata.sizes.*margin and imgdata.sizes.width/height fields
+
+   mask: if bit 1 is set: prefer raw_inset_crops[1] 
+         if bit 0 is set: prefer raw_inset_crops[0] 
+
+   maxcrop: limits crop to not less than (original width/height)*maxcrop; if raw_inset_crops[i]
+   data results in tighter crop, than this item is ignored.
+
+   return value: index in raw_inset_crops[] used increased by one, so
+    0: no changes made
+    1: [0]th data used
+    2: [1]th data used
+   
+  Note: this call SHOULD be used after LibRaw::unpack(), otherwise black level
+  calculation from masked area may be fooled resulting in wrong black levels.
+
+ * Shared library version incremented to disallow automated upgrades (will not work because of ABI change)
+
+== Metadata parsing improvements ==
+
+  * Olympus makernotes parsing: LiveND mode, Panorama mode tags.
+
+  * Fuji GFX100/GFX100S: PixelShift metadata extraction.
+
+  * Fuji RAF files: XMP block extraction
+
+== Misc improvements, limits implemented, etc ==
+
+  * Canon/12-bit files: adjust color.linear_max and makernotes.canon values
+    to match data range.
+
+  * DNG/Floating point: additional metadata check to refuse ambiguous/corrupted files.
+
+  * DNG/Floating point: correct handling of striped files (never seen in wild)
+
+  * Rawspeed support: disallow Nikon D6/Compressed processing
+ 
+  * Compile-time raw size limits implemented:
+     LIBRAW_MAX_NONDNG_RAW_FILE_SIZE - max file size for non-DNG files (default: 2GB - 1 byte)
+     LIBRAW_MAX_DNG_RAW_FILE_SIZE - max DNG file size limit (4GB-1 if compiled w/ DNG SDK, 2GB-1 overwise)
+
+  * samples/raw-identify.cpp:  -v flag documented in usage print.
+
+  * src/libraw_cxx.cpp completely removed from source tree to not confuse users.
+    (also all mentions are removed from Makefiles)
+
+  * clang-cl compatibility:
+    - defines _MSC_VER, but _forceinline is not supported
+    - warnings eliminated in Windows buffered datastream
+
+  * XMP block size in CR3 files limited to 1MB
+  
+  * Preview block size in CR3 files limited to 100MB
+
+  * Improved Phase One Compressed defects masking, thanks to Alexey Danilchenko
+
+  * CRX (CR3) decoder: fixed typo in constant; this does not affect any
+    known still photo (CR3) sample(s), but allows to use the decoder with 
+    some video (CRM) files.
+
+  * Imported user-contributed improvements to OpenMP postprocessing
+    (AHD and X-Trans demosaic)
+
+  * Bugfix: overwrite (wrong) TIFF/Orientation tag value with Metadata/Camera Orientation
+    value for EOS 40D only.
+
+  * ACES output: color conversion changed to provide D65 white point
+
+  * Fix for Canon 5D Mark II/sRAW1 incorrect camera provided crop   
+
+  * RawSpeed (master): fixed bug in old Samsung/compressed decoder,
+    apply this patch to RawSpeed: RawSpeed/rawspeed.samsung-decoder.patch
+  
+  * DCI-P3 and Rec 2020 output colorspaces
+  
+  * Eliminated multiple signed/unsigned mismatch warnings (reported by gcc11)
+
+  * Fixed a typo in LIBRAW_OPTIONS_* flag names
+    (was LIBRAW_OPIONS, old flags names not removed due to compatibility)
+
+== Bugfixes ==
+  * fixed possible 1-byte stack underrun while handling text tags with zero lengh
+
+  * Fixed wrong handling of linear DNG files created from Pentax out-of-camera DNGs
+ 
+
+2021-01-21  Alex Tutubalin <[email protected]>
+
+ == LibRaw snapshot 202101 ==
+
+ = Camera format support: =
+   Lossy compressed CR3 files
+   Lossy compressed RAF files
+   Uncompressed floating point DNG files (16-24-32 bit)
+   Deflate compressed striped DNG files
+   XMP and HEIF-preview extraction from CR3 files
+
+ =  Camera support =
+   Apple iPhone 12 Max, iPhone 12 Max Pro
+   Canon EOS R5, EOS R6, EOS 850D, EOS-1D X Mark III (lossy compressed files)
+   FujiFilm X-S10
+   Hasselblad CFV II 50C",
+   Leica M10-R, Q2 Monochrom, S3, SL2-S
+   Nikon Z 5, Z 6 II, Z 7 II
+   Olympus E-M10 Mark IV
+   Panasonic DC-G100 / G110, DC-S5
+   Sony ILCE-7C (A7C), ILCE-7SM3 (A7S III)
+   Zeiss ZX1
+   Plus multiple DNG-recording cameraphones/drones/etc.
+
+ = Almost dropped camera support: =
+   Old/partially supported video/cinema cameras support is available only if
+   LibRaw is compiled with USE_OLD_VIDEOCAMS defined (this #define is
+   converted internally to LIBRAW_OLD_VIDEO_SUPPORT defined).
+   This affects:
+     Arri cameras
+     Canon C500
+     RED Cine cameras
+   We plan to keep the support in LibRaw 0.21 (if compiled with define 
+   mentioned above) and completely drop the support after 0.21.
+   If you're using LibRaw to decode RED Cine files, see LibRaw*datastreams
+   section below (in short: you'll need to use old fstream-based datastream 
+   under Windows).
+   Cinema DNG files are not affected by this.
+
+ = API/ABI changes =
+
+  * Decoding parameters
+    imgdata.params is split into
+      imgdata.rawparams: parameters used for metadata/raw data decoding
+      imgdata.params:  parameters used at postprocessing stage
+
+    imgdata.params.raw_processing options are split into two sub-options sets
+      imgdata.rawparams.options: raw processing flags, useful for normal 
+      operations
+      imgdata.rawparams.specials: special modes (e.g decoding only delta 
+      pixels from Sony ARW)
+
+   Old LIBRAW_PROCESSING_* flags are renamed to LIBRAW_RAWOPTIONS_* and 
+    LIBRAW_RAWSPECIAL*
+   LIBRAW_PROCESSING_DP2Q_INTERPOLATE... flags are renamed to 
+   LIBRAW_RAWSPECIAL_NODP2Q_INTERPOLATE with inverted meaning (with the 
+   goal to have zero imgdata.rawparams.specials in normal use).
+
+ * New processing flag LIBRAW_RAWOPTIONS_PROVIDE_NONSTANDARD_WB
+   If set (default is not), and when applicable, color.cam_mul[] and
+   color.WB_Coeffs/WBCT_Coeffs will contain WB settings for a
+   non-standard workflow.
+   Right now only Sony DSC-F828 is affected: camera-recorded white balance
+   can't be directly applied to raw data because WB is for RGB, while raw
+   data is RGBE.
+
+ * New processing flag: LIBRAW_RAWOPTIONS_CAMERAWB_FALLBACK_TO_DAYLIGHT
+   If set (default is not), LibRaw::dcraw_process() will fallback to
+   daylight WB (excluding some very specific cases like Canon D30).
+   This is how LibRaw 0.19 (and older) works.
+   If not set: LibRaw::dcraw_process() will fallback to calculated auto WB if
+   camera WB is requested, but appropriate white balance was not found in
+   metadata.
+
+  * Removed LIBRAW_PROCESSING_SKIP_MAKERNOTES processing flag: with new
+    Windows(-handle) datastreams metadata parsing performance is enough
+    to not skip makernotes parsing.
+
+  * new output parameter: imgdata.params.output_flags and new
+    enum LibRaw_output_flags
+    Right now the only flag is implemented: LIBRAW_OUTPUT_FLAGS_PPMMETA
+    setting it will result into metadata written to PPM/PGM output file
+
+  * LibRaw_*datastreams change and corresponding open_file() parameters change
+   LibRaw_file_datastream (based on iostreams) is moved under
+      #ifdef LIBRAW_USE_DEPRECATED_IOSTREAMS_DATASTREAM
+    Standard datastreams are:
+     LibRaw_bigfile_datastream (FILE* based) for POSIX systems
+     LibRaw_bigfile_buffered_datastream - for use with Win32 syscalls
+    API changes:
+    if LIBRAW_USE_DEPRECATED_IOSTREAMS_DATASTREAM is NOT defined, than 
+    LibRaw::open_file() and similar calls drops the last INT64 max_buffered_sz 
+    parameter which defines automatic selection between iostreams and 
+    FILE* based datasteams.
+
+    Note: LibRaw_bigfile_buffered_datastream does NOT implements 
+    make_jas_stream() call, so RED Cine file decoding is not possible with 
+    this datastream. Use deprecaded iostreams implementation instead.
+
+    We plan to keep LIBRAW_USE_DEPRECATED_IOSTREAMS_DATASTREAM up to 
+    LibRaw 0.21 and drop in 0.22.
+
+  * Fuji decoder:
+    fuji_decode_loop/fuji_decode_strip parameters has changed; look into source
+    code for details if you're implementing your own fuji_decode_loop() 
+    call in subclass to provide parallel fuji decoding.
+
+  * Canon CR3 H265 (HEIF) preview limited support:
+    - new format value: LIBRAW_THUMBNAIL_H265
+    - this thumbnail is NOT extracted by LibRaw::make_mem_thumb() yet;
+
+  * LibRaw::capabilities
+    Two bits added:
+      LIBRAW_CAPS_ZLIB if compiled with USE_ZLIB
+      LIBRAW_CAPS_JPEG if compiled with USE_JPEG
+
+
+ * Windows datastreams: CreateFile2 is used if compiled for UWP.
+
+ * API-datastruct: clarified behavior with use_camera_wb=1 setting.
+
+ * identify(): restored the differentiation between fsize and flen.
+
+ * New compile-time LIBRAW_FORCE_OPENMP to skip compiler version check
+   (if LibRaw user is absolutely sure that OpenMP is supported by compiler)
+
+2020-10-14 Alex Tutubalin <[email protected]>
+
+ * LibRaw 0.20.2
+ Reverted 0.20.1 change:
+   - const buffer for open_buffer() and open_bayer() calls
+ Because of 0.20.0 ABI break
+
+2020-10-14 Alex Tutubalin <[email protected]>
+
+ * LibRaw 0.20.1
+ * Improvements:
+   - exif callback is called on EXIF GPS and EXIF Interop IFDs
+   - open_bayer call documented
+   - Canon (ColorDatsSubver==32): parse Specular White instead of hardcoded value
+ * Fixes for normal files processing:
+   - Olympus XZ-1: do not provide linear_max (it is wrong in metadata)
+   - Nikon Z cameras: added space in camera list
+   - raw-identify: fixed wb-preset print
+   - Pentax Optio 33WR: maker index was incorrect
+   - dcraw_emu: corrected help line for -6 option.
+   - raw-identify: corrected range check for color matrices print
+   - use_camera_matrix option: fixed a bug introduced when making
+     compiler more happy.
+
+ * Fixes for damaged/special crafted files processing:
+   - Fix for truncated CR3 files parsing
+   - DNG metadata merger: all color loops are limited to MIN(4,colors)
+   - Check for marings: should be less than raw image size
+   - Check for xmpdata present in Samsung Lens ID assignment
+   - Check for column range in leaf_hdr decoder
+   - Additional checks in Hasselblad model parser
+   - Fuji rotate: better limits check
+   - DNG files: limit tiff_samples
+
+ * Not fixes, but makes ASAN/compilers/etc happy:
+   - corrected GPS EXIF output
+   - const buffer for open_buffer() and open_bayer() calls
+
+
+2020-07-23 Alex Tutubalin <[email protected]>
+
+ * LibRaw 0.20
+
+== Camera Format support ==
+  Canon CR3
+  GoPro (via GPR SDK)
+  Panasonic 14-bit
+  Fujifilm compressed/16bit
+  Rapsberry Pi RAW+JPEG format (if USE_6BY9RPI defined)
+  Foveon X3F support changed: it is supported only if USE_X3FTOOLS defined
+  at build (see below for 'Imported code policy changed')
+
+== Camera support (+59, 1131 total) ==
+  Canon: PowerShot G5 X Mark II, G7 X Mark III, SX70 HS,
+         EOS R, EOS RP, EOS 90D, EOS 250D,  EOS M6 Mark II, EOS M50, EOS M200
+         EOS 1DX Mark III (lossless files only)
+  DJI Mavic Air, Osmo Action
+  FujiFilm GFX 100, X-A7, X-Pro3, X100V, X-T4 (uncompressed/lossless compressed only), X-T200
+  GoPro Fusion, HERO5, HERO6, HERO7, HERO8
+  Hasselblad L1D-20c, X1D II 50C
+  Leica D-LUX7, Q-P, Q2, V-LUX5, C-Lux / CAM-DC25, SL2, M10 Monochrom
+  Nikon D780, Z50, P950
+  Olympus TG-6, E-M5 Mark III, E-PL10, E-M1 Mark III,
+  Panasonic DC-FZ1000 II, DC-G90, DC-S1, DC-S1R, DC-S1H, DC-TZ95
+  PhaseOne IQ4 150MP
+  Ricoh GR III
+  Sony A7R IV, A9 II, ILCE-6100, ILCE-6600, RX0 II, RX100 VII
+  Zenit M
+
+also multiple smartphones (the tested ones are listed in LibRaw::cameraList)
+
+== Source code re-arranged ==
+ * dcraw.c is not used in the generation and build processes
+ * dcraw_common.cpp and libraw_cxx.cpp are split into multiple code chunks
+   placed in separate subfolders (decoders/ for raw data decoders,
+   metadata/ for metadata parsers, etc)
+ * dcraw_common.cpp and libraw_cxx.cpp remain to preserve existing
+   build environments (these files are now just a bunch of #include directives).
+ * It is possible to build LibRaw
+    a)without postprocessing functions (dcraw_process() and  called function)
+    b)without postprocessing and LibRaw::raw2image() call (and called function).
+   It may be useful to reduce library memory/code footprint.
+   See Makefile.devel.nopp and Makefile.devel.noppr2i for the list of source
+   files needed to build reduced/stripped library.
+
+== Normalized make/model ==
+
+There is a huge number of identical cameras sold under different names,
+depending on the market (e.g. multiple Panasonic or Canon models)
+and even some identical cameras sold under different brands
+(Panasonic -> Leica, Sony -> Hasselblad).
+
+To reduce clutter, a normalization mechanism has been implemented in LibRaw:
+
+In imgdata.idata:
+    char normalized_make[64]; - primary vendor name (e.g. Panasonic for
+    Leica re-branded cameras)
+    char normalized_model[64]; - primary camera model name
+    unsigned maker_index; - primary vendor name in indexed form (enum
+       LibRaw_cameramaker_index, LIBRAW_CAMERAMAKER_* constant).
+These fields are always filled upon LibRaw::open_file()/open_buffer() calls.
+
+const char* LibRaw::cameramakeridx2maker(int index): converts maker_index
+to normalized_make.
+
+We recommend that you use these normalized names in a variety of data tables
+(color profiles, etc.) to reduce the number of duplicate entries.
+
+New vendor index values will be added strictly to the end of the
+LibRaw_cameramaker_index table, ensuring that the numbers assigned to
+vendors that are already known to LibRaw will not change.
+
+== DNG frame selection  ==
+
+ DNG frames selection code re-worked:
+  - by default all frames w/ the NewSubfileType tag equal to 0
+  (high-res image) are added to the list of available images (selection
+  performed via imgdata.params.shot_select field, as usual)
+  - the special case for Fuju SuperCCD (SamplesPerPixel == 2) works as
+  before: shot_select=1 will extract second sub-image.
+  - Additional flags to imgdata.params.raw_processing_options:
+     LIBRAW_PROCESSING_DNG_ADD_ENHANCED - will add Enhanced DNG frame
+     (NewSubfileType == 16) to the list of available frames
+     LIBRAW_PROCESSING_DNG_ADD_PREVIEWS - will add previews
+     (NewSubfileType == 1) to the list.
+
+  - By default, DNG frames are not reordered and are available in same order
+  as in DNG (LibRaw traverses IFD/Sub-IFD trees in deep-first order).
+  To prioritize the largest image, set LIBRAW_PROCESSING_DNG_PREFER_LARGEST_IMAGE
+  bit in imgdata.params.raw_processing_options.
+
+ - DNG Stage2/Stage3 processing via DNG SDK (request via flags in
+ raw_processing_options)
+
+== Imported code policy disclaimer ==
+
+  We've changed the policy regarding 3rd party code imported into LibRaw.
+
+  We (like other authors of open-source RAW parsers) gladly import support
+  code for various RAW formats from other projects (if the license allows it).
+  This is done to expand camera support.
+  Unfortunately, not all imported code can tolerate truncated or otherwise
+  damaged raw files, as well as arbitrary conditions or arbitrary data;
+  not all authors handle rejecting unexpected input well.
+
+  LibRaw is now widely used in various projects, including ImageMagick, which,
+  in turn, is often used on web sites to process any input images, including
+  arbitrary data from unknown users.
+  This opens up wide possibilities for exploiting the various vulnerabilities
+  present in the code borrowed from other projects into LibRaw. In order to
+  avoid such security risks, - the borrowed code will no longer compile
+  by default.
+  We are not able to support it in general case, and the authors refuse
+  to add code to reject unexpected input.
+
+  Thus, if you use some kind of camera for which the support is disabled
+  by default, you need to recompile LibRaw for your specific case.
+
+  Formats currently affected:
+   X3F (Foveon) file format.
+    Code is imported from Kalpanika X3F tools: https://github.com/Kalpanika/x3f
+    To turn the support on, define USE_X3FTOOLS
+
+   Rapsberry Pi RAW+JPEG format.
+     Code is imported from https://github.com/6by9/dcraw/,
+     To turn the support on, define USE_6BY9RPI
+  Format support is indicated via LibRaw::capabilities() call with flags:
+    LIBRAW_CAPS_X3FTOOLS - Foveon support
+    LIBRAW_CAPS_RPI6BY9 - RPi RAW+JPEG support
+
+== GoPro .gpr format support ==
+ GoPro  format supported via open-source GPR SDK
+ See README.GoPro.txt for details.
+
+== Windows support/Windows unicode (wchar_t*) filenames support ==
+
+* (old) LibRaw's WIN32 external define split into 3 defines to fine tune
+  compiler/api compatibility:
+  LIBRAW_WIN32_DLLDEFS - use to compile DLLs (__dllimport/__dllexport attributes)
+  LIBRAW_WIN32_UNICODEPATHS - indicates that runtime has calls/datatypes for wchar_t filenames
+  LIBRAW_WIN32_CALLS - use Win32 calls where appropriative (binary mode for files, LibRaw_windows_datastream, _snprintf instead of snprintf, etc).
+
+  If the (old) WIN32 macro is defined at compile time, all three new defines are defined in libraw.h
+  If not, these defines are defined based on compiler version/libc++ defines
+
+* LibRaw::open_file(wchar_t*) is always compiled in under Windows, but
+  if LIBRAW_WIN32_UNICODEPATHS (see above) is not defined, this call will
+  return LIBRAW_NOT_IMPLEMENTED.
+  Use (LibRaw::capabilities() & LIBRAW_CAPS_UNICODEPATHS) on runtime
+  to check that this call was really implemented (or check for #ifdef LIBRAW_WIN32_UNICODEPATHS after #include <libraw.h>)
+
+== LibRaw*datastream simplified ==
+
+  * tempbuffer_open, subfile_open are not used, so removed from
+  LibRaw_abstract_datastream and derived classes.
+
+  * jpeg_src() call implemented using ->read() call and own buffering
+  (16k buffer).
+  * buffering_off() call added. It should be used in derived classes
+    to switch from buffered reads to unbuffered.
+
+== minor/unsorted changes ==
+   * new flag LIBRAW_WARN_DNGSDK_PROCESSED to indicate decoder used
+   *  LibRaw::open() call, max_buf_size special meaning:
+       == 1 => open using bigfile_datastream
+       == 2 => open using file_datastream
+   * Add support for zlib during configure
+   * Fixed multiple problems found by OSS-Fuzz
+   * Lots of changes in imgdata.makernotes (hope someone will document it)
+   * DNG SDK could be used (if enabled) to unpack multi-image DNG files.
+   * DNG whitelevel calculated via BitsPerSample if not set via tags.
+   * DNG: support for LinearDNG w/ BlackLevelRepeat.. pattern
+   * Generic Arri camera format replaced w/ list of specific camera models in supported cameras list.
+   * new samples/rawtextdump sample: allows one to dump (small selection) of RAW data in text format.
+   * samples/raw-identify:
+     * +M/-M params (same as in dcraw_emu)
+     * -L <file-w-filelist> parameter to get file list from a file
+     * -m paramerer to use mmap'ed IO.
+     * -t parameter for timing
+   * samples/dcraw_emu: fixed +M handling
+   * better support for Nikon Coolscan 16-bit NEF files.
+   * Visual Studio project files: re-generated to .vcxproj (Visual Studio 2019), different
+     intermediate folders for different sub-projects to allow 1-step rebuild.
+   * imgdata.makernotes...cameraspecific: removed the vendor name prefix from variables.
+   * Bayer images: ensure that even margins have the same COLOR() for both the active sensor area and the full sensor area.
+   * raw processing flag bit LIBRAW_PROCESSING_CHECK_DNG_ILLUMINANT inverted and renamed to
+     LIBRAW_PROCESSING_DONT_CHECK_DNG_ILLUMINANT. If not set, DNG illuminant will be checked.
+   * New libraw_decoder_t flags:
+      LIBRAW_DECODER_FLATDATA - in-file data could be used as is (if byte order matches), e.g. via mmap()
+      LIBRAW_DECODER_FLAT_BG2_SWAPPED - special flag for Sony ARQ: indicates R-G-G2-B channel
+                                        order in 4-color data
+   * Camera-recorded image crop data is parsed into imgdata.sizes.raw_inset_crop structure:
+	ctop,cleft,cwidth,cheight - crop size.
+	aspect - LibRawImageAspects enum (3to2, 4to3, etc)
+   * New define LIBRAW_NO_WINSOCK2 to not include winsock2.h on compile
+
+   * New processing flag LIBRAW_PROCESSING_PROVIDE_NONSTANDARD_WB
+   If set (default is not), and when applicable, color.cam_mul[] and
+   color.WB_Coeffs/WBCT_Coeffs will contain WB settings for a non-standard
+   workflow.
+   Right now only Sony DSC-F828 is affected: camera-recorded white balance
+   can't be directly applied to raw data because WB is for RGB, while raw
+   data is RGBE.
+
+   * New processing flag: LIBRAW_PROCESSING_CAMERAWB_FALLBACK_TO_DAYLIGHT
+   If set (default is not), LibRaw::dcraw_process() will fallback to
+   daylight WB (excluding some very specific cases like Canon D30).
+   This is how LibRaw 0.19 (and older) works.
+   If not set: LibRaw::dcraw_process() will fallback to calculated auto WB if
+   camera WB is requested, but appropriate white balance was not found in
+   metadata.
+
+  * Google changes cherry-picked (thanks to Jamie Pinheiro)
+  * speedup: ppg interpolate: const loop invariant
+
+  * Bugs fixed
+   -Fixed several UBs found by OSS Fuzz
+   -Fixed several problems found by other fuzzers.
+   - Thumbnail size range check (CVE-2020-15503)
+    Thanks to Jennifer Gehrke of Recurity Labs GmbH for problem report.
+   - fixed possible overflows in canon and sigma makernotes parsers
+   - fixed possible buffer overrun in crx (cr3) decoder
+   - fixed memory leak in crx decoder (if compiled with LIBRAW_NO_CR3_MEMPOOL)
+   - fixed possible overrun in Sony SRF and SR2 metadata parsers
+
+  * Fixed typo in longitude (member of parsed GPS structure), update required for code that uses it.
+
+
+2019-03-05 Alex Tutubalin <[email protected]>
+ * Camera support
+   Canon A560 (CHDK hack)
+   FujiFilm X-T30
+   Nikon Coolpix A1000
+   Olympus E-M1X
+   Sony ILCE-6400
+   Several dng files from phones and drones was tested
+   and added to built-in camera list too.
+
+ * Multiple names for same Panasonic cameras are processed via
+   aliaces mechanics, no multiple duplicate fields in adobe_coeffs() table
+
+ * Better makernotes parsing for many cameras
+
+ * Better parsing of makernotes embeded into DNG files created by
+   Adobe DNG Converter
+
+ * New imgdata.params.raw_processing_options value: LIBRAW_PROCESSING_ZEROFILTERS_FOR_MONOCHROMETIFFS
+    - If this bit is set
+    - and TIFF file contains SamplesPerPixel == 1
+    - and filters value was not guessed from metadata parsing
+   LibRaw will assume the file is monochrome, not bayer.
+ This option is needed for monochrome scan processing (Imacon X1 etc).
+ This option may broke old TIF-like RAW files processing (Kodak 760,etc)
+ use with care (it is better to let user choose).
+
+2018-12-12 Alex Tutubalin <[email protected]>
+ * Camera support:
+     Canon: PowerShot A480 (CHDK hack), EOS 2000D, EOS 4000D
+     Eyedeas E1
+     FujiFilm: GFX 50R, XF10, X-T3, X-T100, DBP680
+     GITUP G3 DUO (16:9 mode only, use custom camera for 4:3)
+     Kodak PIXPRO AZ901
+     Leica M10-D, M10-P
+     Nikon D3500, Z6, Z7, P1000
+     Panasonic LX100M2
+     Pentax K-1 II
+     Sony A7 III, HX95, HX99, RX100-VA, RX100-VI
+
+  * Fixed long standing bug in remove_zeroes: first two rows/cols was unprocessed
+  * Better parsing for NEF files modified (damaged) by NikonTransfer
+  * Better parsing for floating point DNG black levels (into color.dnglevels.fblack and dng_fcblack[], similar
+    to color.black and color.cblack[] for other formats).
+  * More flexible limit for RAW decoding memory usage:
+      imgdata.params.max_raw_memory_mb (default is LIBRAW_MAX_ALLOC_MB_DEFAULT)
+
+  * New flags for imgdata.params.raw_processing_options:
+    LIBRAW_PROCESSING_CHECK_DNG_ILLUMINANT - will check DNG illuminant field when selecting color matrix
+      (note: incompatibility with previous versions, so default is not set).
+    LIBRAW_PROCESSING_DNGSDK_ZEROCOPY - will not copy data from Adobe DNG SDK decoded buffer, but use it as is
+
+  * Swtiched from auto_ptr to unique_ptr, to get back define LIBRAW_USE_AUTOPTR
+
+  * dcraw_emu: it is now possible to create output filename in a more flexible manner, via -Z switch:
+     -Z - will output to stdout
+     -Z ext will output into inputfilename.ext
+     -Z .ext will output into inputfilename.inputext.ext
+
+
+2018-11-22  Alex Tutubalin <[email protected]>
+ * Finally: got Sinar 4shot sample, works fine now
+ * OpenMP critical sections for malloc/free; extra #ifdefs removed; bin/dcraw_dist could be built again using Makefile.devel
+ * additional checks in parse_phase_one()
+ * more checks on file offsets/tag len in parse_minolta
+ * more checks in parse_ciff
+ * Mempool check reworked
+ * Old Leaf (16bit/3color/TIFF) support
+ * Fix cameraWB->autoWB fallback
+ * Polaroid x530 channel swap; get metadata pointer for Foveon files
+ * Fixed Secunia Advisory SA86384
+   - possible infinite loop in unpacked_load_raw()
+   - possible infinite loop in parse_rollei()
+   - possible infinite loop in parse_sinar_ia()
+  Credits: Laurent Delosieres, Secunia Research at Flexera
+
+ * LibRaw 0.19.1-Release
+
+2018-06-28  Alex Tutubalin <[email protected]>
+ * changed wrong fix for Canon D30 white balance
+ * fixed possible stack overrun while reading zero-sized strings
+ * fixed possible integer overflow
+ * LibRaw 0.19.0-Release
+
+2018-06-11  Alex Tutubalin <[email protected]>
+ * Sony uncompressed/untiled DNGs: do not set bits-per-sample to 14 bit
+ * Do not change tiff_bps for DNG files
+ * Another possible stack overflow in kodak radc reader
+ * Secunia Advisory SA83507, credits Kasper Leigh Haabb,
+   Secunia Research at Flexera"
+   - parse_qt: possible integer overflow
+   - reject broken/crafted NOKIARAW files
+ * LibRaw 0.19-Beta6
+
+2018-05-10  Alex Tutubalin <[email protected]>
+ * Put rogue printf's behind #ifdef DCRAW_VERBOSE
+ * Exceptions was not caught in x3f_new_from_file resulting in x3f handle leak
+ * packed_load_raw(): EOF check on each row
+ * define LIBRAW_USE_CALLOC_INSTEAD_OF_MALLOC to use ::calloc instead of
+   ::malloc in LibRaw_mem_mgr malloc calls;
+   Note: realloc is not changed, so only partial fix
+ * Fixed possible div by zero in EOS D30 WB data parse
+ * U-suffix for filter-var manipulation consts
+ * restored static specifier for utf2char() lost in previous bugfix
+ * Fixed stack overrun in kodak_radc_load_raw
+ * Secunia Advisory SA83050: possible infinite loop in parse_minolta()
+ * LibRaw 0.19-Beta5
+
+2018-05-03  Alex Tutubalin <[email protected]>
+ * CVE-2018-10529 fixed: out of bounds read in X3F parser
+ * CVE-2018-10528 fixed: possible stack overrun in X3F parser
+ * LibRaw 0.19-Beta4
+
+2018-04-24 Alex Tutubalin <[email protected]>
+ * LibRaw 0.19-Beta3
+ * fixed lot of bugs reported by ImageMagic/oss-fuzz
+ * fixed several bugs reported by Secunia team (adv 81800,
+   Credit: Laurent Delosieres, Secunia Research at Flexera)
+
+2018-03-22 Alex Tutubalin <[email protected]>
+ * LibRaw 0.19-Beta2
+ * Better handling of broken JPEG thumbnails
+ * Panasonic GH5S/G9-hires decoder, thanks to Alexey Danilchenko
+   Note: ABI has changed due to this patch, so shlib version increased
+ * Fujifilm X-A5/A20 metadata parsing fix
+ * New error code LIBRAW_TOO_BIG: image data size excess LIBRAW_MAX_ALLOC_MB
+ * winsock2 included before windows.h to make MinGW happy
+
+2018-02-23 Alex Tutubalin <[email protected]>
+
+ * LibRaw 0.19-Beta1
+
+ * 84 cameras added compared to 0.18 (1014 total):
+    Apple
+	iPhone 8(*), iPhone 8 plus, iPhone X
+    BlackMagic
+	URSA Mini 4k, URSA Mini 4.6k, URSA Mini Pro 4.6k
+    Canon CHDK hack
+	 PowerShot A410, A540, D10, ELPH 130 IS, ELPH 160 IS, SD750,
+	    SX100 IS,SX130 IS, SX160 IS, SX510 HS, SX10 IS, IXUS 900Ti
+    Canon
+	PowerShot G1 X Mark III, G9 X Mark II, EOS 6D Mark II, EOS 77D,
+ 	EOS 200D, EOS 800D, EOS M6, EOS M100
+    Casio EX-ZR4100/5100
+    DJI
+	Phantom4 Pro/Pro+, Zenmuse X5, Zenmuse X5R
+    FujiFilm
+	S6500fd, GFX 50S, X100f, X-A3, X-A5, X-A10, X-A20, X-E3, X-H1, X-T20
+    GITUP GIT2P
+    Hasselblad
+	H6D-100c, A6D-100c
+    Huawei
+	P9 (EVA-L09/AL00), Honor6a, Honor9, Mate10 (BLA-L29)
+    Leica
+	CL, M10, TL2
+    LG
+	V20 (F800K), VS995,
+    Nikon
+	D850, D5600, D7500, Coolpix B700
+    Olympus
+	E-PL9, E-M10 Mark III, TG-5
+    OnePlus
+	One, A3303, A5000
+    Panasonic
+	DMC-FZ45, DMC-FZ72, DC-FZ80/82, DC-G9 (std. res mode only), DC-GF10/GF90,
+  	DC-GH5, DC-GX9, DC-GX800/850/GF9, DMC-LX1, DC-ZS70 (DC-TZ90/91/92, DC-T93),
+	DC-TZ100/101/ZS100, DC-TZ200/ZS200
+    PARROT
+	Bebop 2, Bebop Drone
+    Pentax KP
+    PhaseOne IQ3 100MP Trichromatic
+    Samsung
+	Galaxy Nexus, Galaxy S3, S6 (SM-G920F), S7, S7 Edge, S8 (SM-G950U),
+    Sony
+	A7R III, A9, DSC-RX0, DSC-RX10IV
+    Yi M1
+    YUNEEC
+	CGO3, CGO3P
+    Xiaoyi YIAC3 (YI 4k)
+
+  Note(*): for mobile phones with DNG format recording, only really tested cameras
+  are added to supported camera list. Really LibRaw should support any correct DNG.
+
+ * No more built-in support for LibRaw demosaic packs (GPL2/GPL3).
+   We're unable to support this (very old code), so we'll be happy to transfer this
+   code to some maintainer who wish to work with it.
+
+   In LibRaw 0.19 we provide extension API: user-settable callbacks to be called in
+   code points where demosaic pack code was called.
+
+   -  int callbacks.pre_identify_cb(void *) => to be called in LibRaw::open_datastream
+       before call to (standard) identify() function. If this call returns 1, this means
+       that RAW file is identified and all metadata fields are set, so no need to run
+       standard identify code.
+   - void callbacks.post_identify_cb(void*) => called just after identify(), but before
+       any cleanup code;
+   - dcraw_process() callbacks are called before dcraw_process phases (name speaks for itself):
+       	pre_subtractblack_cb, pre_scalecolors_cb, pre_preinterpolate_cb, pre_interpolate_cb,
+	interpolate_bayer_cb, interpolate_xtrans_cb, post_interpolate_cb, pre_converttorgb_cb,
+	post_converttorgb_cb
+
+   All these new callbacks are called with (this) as the only arg.
+   To continue LibRaw-demosaic-pack-GPLx support one need to subclass LibRaw, set needed
+   callbacks in (e.g.) constructor code, than these callbacks to be called
+
+ * Better DNG parser:
+    - support for DefaultCrop Origin/Size tags (add LIBRAW_PROCESSING_USE_DNG_DEFAULT_CROP to raw_processing_options to enable)
+    - better parsing for nested DNG tags (use tag from RAW IFD, fallback to IFD0 if no tag in current IFD)
+    - DNG PreviewColorspace extracted into dng_levels.preview_colorspace
+
+ * Metadata extraction:
+  - Better extraction of camera measured balance (LIBRAW_WBI_Auto and WBI_Measured),
+    this not the same as 'as shot' if some preset/manual tune is used.
+  - Extraction of camera custom balances (LIBRAW_WBI_CustomN)
+  - Nikon data compression tag extracted into  makernotes.nikon.NEFCompression
+  - Hasselblad BaseISO and Gain extracted into makernotes.hasselblad
+  - Canon multishot params extracted into makernotes.canon.multishot
+  - lot of other vendor-specific makernotes data (see data structures definitions for details).
+
+ * New LibRaw::open_bayer call allows to pass sensor dump w/o metadata directly to LibRaw:
+     virtual int open_bayer(unsigned char *data, unsigned datalen,
+	  ushort _raw_width, ushort _raw_height, ushort _left_margin, ushort _top_margin,
+	  ushort _right_margin, ushort _bottom_margin,
+	  unsigned char procflags, unsigned char bayer_pattern, unsigned unused_bits, unsigned otherflags,
+	  unsigned black_level);
+    Parameters:
+     data, datalen - buffer passed
+     width/height/margins - speaks for itself
+     procflags:
+     for 10-bit format:
+      1: "4 pixels in 5 bytes" packing is used
+      0: "6 pixels in 8 bytes" packing is used
+     for 16-bit format:
+      1: Big-endian data
+    bayer_pattern: one of LIBRAW_OPENBAYER_RGGB,LIBRAW_OPENBAYER_BGGR,
+                          LIBRAW_OPENBAYER_GRBG,LIBRAW_OPENBAYER_GBRG
+    unused_bits: count of upper zero bits
+    otherflags:
+      Bit 1 - filter (average neighbors) for pixels with values of zero
+      Bits 2-4 - the orientation of the image (0=do not rotate, 3=180, 5=90CCW, 6=90CW)
+    black_level: file black level (it also may be specified via imgdata.params)
+
+    see samples/openbayer_sample.cpp for usage sample (note, this sample is 'sample only', suited for
+    Kodak KAI-0340 sensor, you'll need change open_bayer() params for your data).
+
+ * Color data added/updated/fixed for many cameras
+
+ * Correct data maximum for Fuji X-* cameras
+
+ * Thumbnail processing:
+   - JPEG thumbnails: if compiled with libjpeg, color count is extracted into imgdata.thumbnail.tcolors
+   - PPM (bitmap) thumbnails: color count is set according to thumbnail IFD tag
+   - PPM16 thumbnails: if LIBRAW_PROCESSING_USE_PPM16_THUMBS set in raw_processing_options, than thumbnail will be extracted
+     as is, not converted to 8 bit. thumbnail.tformat is set to LIBRAW_THUMBNAIL_BITMAP16 in this case.
+     Untested, because it is hard to find RAWs with 16-bit bitmaps.
+
+== Compatibility fixes
+
+ * struct tiff_tag renamed to libraw_tiff_tag
+ * pow64f renamed to libraw_pow64f
+
+== Bugs fixed:
+
+ * COLOR(r,c) works correctly on X-Trans files
+
+== Security fixes:
+Secunia #81000:
+Credit: Laurent Delosieres, Secunia Research at Flexera
+ * leaf_hdr_load_raw: check for image pointer for demosaiced raw
+ * NOKIARAW parser: check image dimensions readed from file
+ * quicktake_100_load_raw: check width/height limits
+
+Secunia #79000:
+Credit: Laurent Delosieres, Secunia Research at Flexera
+ * All legacy (RGB raw) image loaders checks for imgdata.image is not NULL
+ * kodak_radc_load_raw: check image size before processing
+ * legacy memory allocator: allocate max(widh,raw_width)*max(height,raw_height)
+
+Secunia #76000:
+ * Fixed fuji_width handling if file is neither fuji nor DNG
+ * Fixed xtrans interpolate for broken xtrans pattern
+ * Fixed panasonic decoder
+ * LibRaw 0.18.6
+
+Other fixes:
+ * Checks for width+left_margin/height+top_margin not larger than 64k
+ * LIBRAW_MAX_ALLOC_MB define limits maximum image/raw_image allocation
+   (default is 2048 so 2Gb per array)
+ * LibRaw::read_shorts item count is now unsigned
+ * Fixed possible out of bound access in Kodak 65000 loader
+ * CVE-2017-14348: Fix for possible heap overrun in Canon makernotes parser
+   Credit: Henri Salo from Nixu Corporation
+ * Fix for CVE-2017-13735
+ * CVE-2017-14265: Additional check for X-Trans CFA pattern data
+ * Fixed several errors (Secunia advisory SA75000)
+ * ACES colorspace output option included in dcraw_emu help page
+ * Avoided possible 32-bit overflows in Sony metadata parser
+ * Phase One flat field code called even for half-size
+
+
+2016-12-27  Alex Tutubalin <[email protected]>
+ * Licensing changes:
+    - there is no 'LibRaw Software License 27032010' licensing anymore (and all signed
+      agreements have expired)
+    - LibRaw is now dual-licensed: LGPL 2.1 or CDDL 1.0
+
+ * Camera support (+87):
+     Apple: iPad Pro, iPhone SE, iPhone 6s, iPhone 6 plus, iPhone 7, iPhone 7 plus
+     BlackMagic Micro Cinema Camera, URSA, URSA Mini
+     Canon PowerShot G5 X, PowerShot G7 X Mark II, PowerShot G9 X,
+       IXUS 160 (CHDK hack), EOS 5D Mark IV, EOS 80D, EOS 1300D, EOS M10, EOS M5,
+       EOS-1D X Mark II
+     Casio EX-ZR4000/5000
+     DXO One,
+     FujiFilm X-Pro2, X70, X-E2S, X-T2
+     Gione E7
+     GITUP GIT2
+     Google Pixel,Pixel XL
+     Hasselblad X1D, True Zoom
+     HTC MyTouch 4G, One (A9), One (M9), 10
+     Huawei P9
+     Leica M (Typ 262), M-D (Typ 262), S (Typ 007), SL (Typ 601), X-U (Typ 113), TL
+     LG G3, G4
+     Meizy MX4
+     Nikon D5, D500, D3400
+     Olympus E-PL8, E-M10 Mark II, Pen F, SH-3, E-M1-II
+     Panasonic DMC-G8/80/81/85, DMC-GX80/85, DMC-TZ80/81/85/ZS60, DMC-TZ100/101/ZS100,DMC-LX9/10/15, FZ2000/FZ2500
+     Pentax K-1, K-3 II, K-70
+     PhaseOne IQ3 100MP
+     RaspberryPi Camera, Camera V2
+     Ricoh GR II
+     Samsung Galaxy S7, S7 Edge
+     Sigma sd Quattro
+     Sony A7S II, ILCA-68 (A68),ILCE-6300,DSC-RX1R II,DSC-RX10III, DSC-RX100V,ILCA-99M2 (A99-II), a6500
+          IMX214, IMX219, IMX230, IMX298-mipi 16mp, IMX219-mipi 8mp, Xperia L
+     PtGrey GRAS-50S5C
+     YUNEEC CGO4
+     Xiaomi MI3, RedMi Note3 Pro
+
+ * Floating point DNG support:
+    - new data fields:
+      imgdata.rawdata.float_image - bayer float data
+      imgdata.rawdata.float3_image - 3-component float data
+      imgdata.rawdata.float4_image - 4-component float data
+      imgdata.color.fmaximum - float data maximum (calculated from real data,
+          rounded to 1.0 if below 1.0)
+   - new raw processing flag
+      LIBRAW_PROCESSING_CONVERTFLOAT_TO_INT - converts float data to 16-bit
+        integer immediately after decoding with default parameters
+   - new API Calls:
+      int LibRaw::is_floating_point() returns non-zero if RAW file contains
+          floating point data
+      int LibRaw::have_fpdata() returns non-zero if rawdata.float*_image is not
+        null (so FP data has been unpacked but not converted to integrer, see below).
+      LibRaw::convertFloatToInt(float dmin=4096.f, float dmax=32767.f, float dtarget = 16383.f)
+        converts float/float3/float4_image to raw_image/color3/color4_image with or without scaling:
+       - if both real data maximum and metadata maximum are within the range ( >= dmin && <=dmax), float
+         data is just converted to integer
+       - if data is out of the range given above, values are scaled so real data maximum becomes dtarget
+       - if data was rescaled (normalized), scale multiplier is stored in imgdata.color.fnorm
+
+ * LibRaw can be built with Adobe DNG SDK support to decode exotic DNG formats (e.g. 8 bit).
+   See README.DNGSDK.txt for details
+
+ * New API calls
+    unsigned LibRaw::capabilities and C-API libraw_capabilities()
+    allows developers to determine LibRaw compile flags at runtime.
+    Returns ORed bit fields:
+    LIBRAW_CAPS_RAWSPEED - LibRaw was compiled with RawSpeed Support
+    LIBRAW_CAPS_DNGSDK - LibRaw was compiled with Adobe DNG SDK
+    LIBRAW_CAPS_DEMOSAICSGPL2, LIBRAW_CAPS_DEMOSAICSGPL3 - LibRaw was compiled with demosaic packs (GPL2/GPL3)
+
+ * More metadata parsed:
+    - White balance coefficients stored in the raw file are extracted into:
+     int imgdata.color.WBCoeffs[256][4] - array indexed by EXIF lightsource type
+        for example, WBCoeffs[21][..] contains coefficients for D65 lightsource
+     float imgdata.color.WBCT_Coeffs[64][5] contains white balance data specified
+       for given color temperature: WBCT_Coeffs[i][0] contains temperature value,
+       and [1]..[4] are WB coefficients.
+    - DNG analog balance, per-channel black/white level, and forward matrix
+    - vendor specific metadata stored in vendor-specific data structures
+
+ * new C-API calls:
+    void libraw_set_user_mul(libraw_data_t *lr,int index, float val);
+    void libraw_set_ca_correction(libraw_data_t *lr,int ca_correc, float ca_red, float ca_blue);
+    void libraw_set_cfalinenoise(libraw_data_t *lr,int cfaline, float linenoise);
+    void libraw_set_wf_debanding(libraw_data_t *lr, int wf_debanding, float wfd0, float wfd1, float wfd2, float wfd3);
+    void libraw_set_interpolation_passes(libraw_data_t *lr,int passes);
+
+ * Existing API changes:
+    imgdata.params fields (all very specific purpose): sony_arw2_options, sraw_ycc, and params.x3f_flags
+    replaced with single bit-field raw_processing_options
+    See  LIBRAW_PROCESSING_* bits in documentation.
+
+ * zlib library is optional
+   Use -DUSE_ZLIB to compile with zlib (to provide deflate DNG support)
+ * libjpeg version: jpeg_mem_src() is mandatory, so use libjpeg-turbo
+   or libjpeg 8+
+ * Fixes in vng_interpolate to make modern compilers happy
+ * Fixed bug in Sony SR2 files black level
+ * DNG files with BlackLevel both in vendor makernotes and BlackLevel:
+    BlackLevel tag always takes precedence
+ * strlen replaced with strnlen in most cases, added local version of strnlen
+ * ChannelBlackLevel added to canon makernotes
+ * unpack_thumb() data size/offset check against file size
+
+2015-08-15  Alex Tutubalin <[email protected]>
+
+ * LibRaw 0.17
+
+ * Fixed dcraw.c ljpeg_start possibly buffer overrun
+
+ * fixed several bugs detected by using American Fuzzy Lop
+
+ * C-API extension to support 3DLut Creator
+
+ * More metadata parsing/extraction:
+    - XMP packet extracted (if exists)
+    - DNG Color information parsed
+    - GPS data (partially) parsed
+    - EXIF/Makernotes parsed for used optics (for both RAW files and DNG converted by Adobe convertor).
+
+ * Exif/Makernotes parser callback (called for each processed tag)
+
+ * Sony ARW2.3 decoder:
+   - params.sony_arw2_hack removed, decoded data are always in 0...17k range (note the difference with dcraw!)
+   - Additional processing options for Sony lossy compression techincal analysis.
+
+ * Dcraw 9.26 imported (but some changes not approved because Libraw do it better) with some exceptions:
+    - no Pentax K3-II frame selection code
+    - no built-in JPEG decompressor
+
+ * Many improvements in data decoding/processing:
+    - Correct decoding of black level values from metadata for many formats, LibRaw do not rely on hardcoded black levels.
+
+ * 224 camera models added to supported camera list.
+   Some of them are new (released since LibRaw 0.16 come out), some was supported before, but missed from the list.
+   Added cameras are:
+
+  Alcatel 5035D
+  BlackMagic Pocket Cinema Camera, Production Camera 4k
+  Canon PowerShot A550, A3300 IS, G1 X Mark II, G7 X, SD950, SX60 HS, EOS 7D Mark II, EOS 20Da, EOS 60Da, EOS 1200D, EOS-1D C, 5DS, 5DS R, 750D, 760D, M2, M3, G3 X
+  Casio EX-FC300S, EX-FC400S, EX-Z1080, EX-ZR700, EX-ZR710, EX-ZR750, EX-ZR800, EX-ZR850, EX-ZR1000, EX-ZR1100, ZR1200, ZR1300, EX-ZR1500, EX-100, EX-10
+  Digital Bolex D16,D16M
+  DJI 4384x3288,
+  Epson R-D1s, R-D1x
+  FujiFilm E505,S1,S205EXR,HS10,HS11,HS22EXR,HS33EXR,HS35EXR,F505EXR,F605EXR,F775EXR,F900EXR,X100T,X30,X-T1,X-T1 Graphite Silver, XQ2, X-A2, X-T10
+  Hasselblad H5D-60, H5D-50,H5D-50c,H5D-40,H4D-60,H4D-50,H4D-40,H4D-31,H3DII-22,H3DII-31,H3DII-39,H3DII-50,H3D-22,H3D-31,H3D-39,H2D-22,H2D-39,CF-22,CF-31,CF-39,Stellar II,HV
+  HTC UltraPixel
+  Imacon Ixpress 96, 96C, 384, 384C (single shot only),132C,  528C (single shot only)
+  ISG 2020x1520
+  Ikonoskop A-Cam dII Panchromatic, A-Cam dII
+  Kinefinity KineMINI, KineRAW Mini, KineRAW S35
+  Kodak DCS460D, S-1
+  Leaf Credo 50
+  Lenovo a820
+  Leica Digital-Modul-R, D-Lux (Typ 109), M (Typ 240), Monochrom (Typ 240), M-E, M-P, R8, S, T (Typ 701), X (Typ 113), X2, X-E (Typ 102), V-Lux (Typ 114), Monochrom (Typ 246), Q
+  Matrix 4608x3288
+  Nikon D4s, D600, D610, D750, D800, D800E, D810, D3300, D5500, Df, 1 J4, 1 S2, 1 V3, Coolpix P340, Coolscan NEF, D7200, 1 J5,D810A
+  Nokia 1200x1600
+  Olympus E-450, E-600, E-PL6, E-PL7, E-M1, E-M10, E-M5 Mark II, SP565UZ, STYLUS1s, SH-2, TG-4, AIR-A01
+  Panasonic DMC-CM1, DMC-FZ7, DMC-FZ70, DMC-FZ1000, DMC-GF7, DMC-GH4, AG-GH4, DMC-GM1s, DMC-GM5, DMC-LX100, DMC-TZ60/61/SZ40, DMC-TZ70, FZ300/330, GX8
+  Pentax GR, K110D, K-01,  K-S1, Q, QS-1, 645Z, K-S2, K3 II
+  PhaseOne IQ250, IQ260, IQ260 Achromatic, IQ280, Achromatic+, P 20+, P 21, P 25+, P 30+, P 40+
+  Ricoh GXR MOUNT A12, GXR MOUNT A16 24-85mm F3.5-5.5, GXR, S10 24-72mm F2.5-4.4 VC, GXR, GR A12 50mm F2.5 MACRO, GXR, GR LENS A12 28mm F2.5, GXR, GXR P10
+  Samsung GX-1L, NX1, NX5, NX1000, NX1100, NX30, NX300, NX300M, NX3000, NX mini, Galaxy S3, Galaxy Nexus, NX500
+  Sigma dp1 Quattro, dp2 Quattro, dp3 Quattro, dp0 Quattro
+  Sinar eMotion 22, eMotion 54, eSpirit 65, eMotion 75, eVolution 75, Sinarback 54
+  Sony A7 II, A7S, ILCA-77M2 (A77-II), ILCE-3000, ILCE-5000, ILCE-5100, ILCE-6000, ILCE-QX1, DSC-RX100III, DSLR-A560, NEX-VG20, NEX-VG30, NEX-VG900, IMX135-mipi 13mp, IMX135-QCOM, IMX072-mipi, RX100-IV, A7R-II, RX10-II
+
+ * Fujifilm F700/S20Pro second frame support
+
+2014-02-01  Alex Tutubalin <[email protected]>
+   * Updated Oly E-M10 & Panasonic TZ60/61 color data
+   * Updated foveon SD9-14 white level
+   * Support for 1x1 BlackLevelRepeatDim
+
+2014-01-31  Alex Tutubalin <[email protected]>
+   * imported dcraw 1.461: fixed error in BlackLevelDim handling
+   * Accurate work with pattern black-level (cblack[6+])
+   * Support for Olympus E-M10 and Fujifilm X-T1
+   * Adjusted possbile maximum value for Sigma SD9 small raws
+
+2014-01-27 Alex Tutubalin <[email protected]>
+   * dcraw 1.460:  Nikon D3300, Panasonic DMC-TZ61, Sony  ILCE-5000
+2014-01-25 Alex Tutubalin <[email protected]>
+   * PhaseOne IQ250 support (both compressed and uncompressed)
+2014-01-21 Alex Tutubalin <[email protected]>
+   * imgdata.params.sony_arw2_hack removed.
+     It always on for ARW2-files.
+   * New imgdata.params.sony_arw2_options processing flags
+     Values:
+       LIBRAW_SONYARW2_NONE - normal processing
+       LIBRAW_SONYARW2_BASEONLY - BASE pixels outputeed, delta pixels set to 0
+       LIBRAW_SONYARW2_DELTAONLY - Delta pixels written to raw data, base pixels zeroed
+       LIBRAW_SONYARW2_DELTAZEROBASE - Only deltas written without base offset
+
+2014-01-20 Alex Tutubalin <[email protected]>
+  * Imported dcraw 9.20:
+    - Support for DNG BlackLevelRepeatDim tags
+    - imgdata.color.cblack[] holds variable BlackLevel for DNG files (up to ~4k values)
+    - imgdata.params.use_camera_matrix is now ON by default. Set it to 3 if you want
+      to force use of DNG embedded matrix.
+    - Tone curve for Canon RMF format supported
+    - Color data for Canon C500
+  * Additional camera support:
+     Alcatel 5035D
+     DJI 4384x3288
+     Fujifilm F900EXR
+     Kodak 12MP
+     Matrix 4608x3288
+     Nokia 1200x1600
+     Olympus E-PL6
+     Panasonic DMC-FZ7
+
+2014-01-17 Alex Tutubalin <[email protected]>
+  * Camera support:
+     Added: Fujifilm XE2, XQ1
+     Color data updated: Nikon D4 1 AW1/J3, Fuji X-M2
+     Fixes: Nikon D610 visible image area, Canon A3300 bayer
+     pattern
+  * RawSpeed support: enabled processing for cameras,
+    unknown to RawSpeed
+  * Fixed error in LibRaw::unpack_thumb()
+  * little improve performance in my_strcasestr
+  * Fix compiler errors for VS2012/OpenMP
+  * Fixed typo which prevents to use Demosaic Pack GPL2
+  * LibRaw 0.16.0-Release
+
+2013-11-15 Alex Tutubalin <[email protected]>
+  * New cameras supported
+     Leica C, X VARIO
+     Nikon D5300, D610, Df, 1 AW1
+     Nokia Lumia 1020, 1520
+     Olympus STYLUS1
+     Pentax K-3
+     Sony RX10, A3000 (ILCE-3000),
+  * Color data updated:
+     Canon S120
+     Nikon P7800, 1 J3
+     Olympus E-M1
+  * Corrected image visible area sizes
+    Canon G16
+    Sigma pre-Merrill cameras: small and medium-sized RAWs
+
+  * Better EXIF parsing:
+     - ISO values for new Nikon cameras (D4, D800)
+     - black level extraction for Nikon D5300
+     - correct Olympus color data conversion
+
+  * Better Visual Studio compatibility (esp. old versions)
+  * Cmake build: added ws2_32 library for MinGW builds
+  * LibRaw 0.16.0-Beta1
+
+2013-10-22 Alex Tutubalin <[email protected]>
+  * Support for new cameras:
+    Sony A7, A7R
+    Panasonic GM1
+
+  * Sony RX1R and RX100M2 color data updated.
+
+  * Sony cameras model name is set by SonyModelID EXIF tag
+
+  * Sony ARW2: black level and color matrix extracted from EXIF data
+
+  * Samsung: black level and color matrix extracted from EXIF;
+    Camera multipliers are now extracted correctly even if black is not 0
+
+  * Better source compatibility with Mac OS X compilation
+
+  * Better source compatibility with Win32 compilation
+
+  * DNG without Compression tag assumed uncompressed
+
+  * Better X3F-tools based Foveon support:
+    - new Foveon metadata parser based on X3F-tools. So, if LibRaw compiled
+      without demosaic-pack-GPL2, then no dcraw Foveon code used.
+    - Support for Medium resolution RAWs from DPx Merrill and SD1 cameras.
+      RAW data extracted as is (4800x1600 pixels), aspect ratio is set to
+      0.5, so these RAWs are processed to full-size 4800x3200 RGB.
+    - Support for Foveon thumbnail extraction. Only JPEG and bitmap
+      thumbnails extracted, but 'foveon' (RAW) thumbnails are really not used
+      in production cameras.
+    - New imgdata.params.force_foveon_x3f flag
+      Forces use of x3f-tools based code for Foveon processing if LibRaw
+      compiled with demosaic-pack-GPL2 (and does nothing if LibRaw compiled
+      without this pack).
+      New flag -disadcf added to dcraw_emu sample to use this flag.
+    - LibRaw do not calls exit() on broken Foveon files.
+
+  * API/ABI changed, so all code using LibRaw should be recompiled.
+
+  * LibRaw 0.16.0-Alpha3
+
+
+2013-10-16 Alex Tutubalin <[email protected]>
+  * Support for new cameras:
+    Canon S120 (preliminary color data), G16
+    Fujifilm X-A1 (preliminary color data)
+    Hasselblad Lunar, Stellar
+    Nikon P7800 (preliminary color data)
+    Pentax K50, K500, Q7
+    Samsung Galaxy NX (EK-GN120)
+    Sony NEX-5T
+
+  * Updated color data for:
+    Samsung NX300
+    Sony RX1R
+    Sigma SD1, SD1 Merrill, DPxx (only if non-GPL2 foveon decoder used)
+
+  * Image dimensions table for Foveon cameras (only if
+    non-GPL2 foveon decoder used)
+
+  * Fixed memory leak in x3f-tools code (new Foveon decoder)
+  * Fixed DHT-demosaic incompatibility with MS VisualStudio in OpenMP directives
+  * Additional image size checks.
+  * LibRaw 0.16-Alpha2
+
+2013-09-22 Alex Tutubalin <[email protected]>
+  * Support for new cameras:
+     Baumer TXG14
+     Blackmagic Cinema
+     Canon EOS 70D, C500
+     Fujifilm X-M1
+     Nikon D5200
+     Olympus E-P5,E-M1
+     OmniVision OV5647 (Raspberry Pi)
+     Panasonic LF1, GX7, GF6
+     Richon GR
+     Samsung NX300, NX1100, NX2000
+     Sony RX100II, RX1R, NEX-3N
+
+  * Support for Foveon sensor based on X3F code by Roland Karlsson
+    BSD-like license, so included in main LibRaw code.
+    No 'foveon interpolation', so no way to get good colors from
+    old Sigma cameras (SD9, SD14, Polaroid x530). For modern Foveon cameras
+    one may try to create ICC profile (not supplied).
+
+    TODO: thumbnail extraction, fast cancelation
+
+    Old foveon_*_load_raw (from dcraw) code is used if compiled with
+    LIBRAW_DEMOSAIC_PACK_GPL2
+
+  * API Changes:
+
+    + New parameters in imgdata.params:
+      - imgdata.params.no_interpolation - disables interpolation step in
+        LibRaw::dcraw_process() call.
+      - imgdata.params.no_auto_scale - disables call to scale_colors() in
+        LibRaw::dcraw_process() call.
+      - imgdata.params.sraw_ycc - disables Canon sRAW YCbCr to RGB conversion
+        in LibRaw::unpack() call (use for RAW analyzers
+
+    + New Fuji X-Trans handling:
+      - imgdata.iparams.filters value is now 9 for Fuji X-Trans (instead of 2)
+      - imgdata.iparams.xtrans[6][6] matrix contains row/col to color mapping
+        for Fuji X-Trans sensor.
+
+    + LibRaw::setCancelFlag() - use for fast decoder termination
+
+    + LibRaw_abstract_datastream::make_byte_buffer() call is not needed more.
+
+    + New demosaic code: DHT Demosaic by Anton Petrusevich
+      Set params.user_qual=11 to use.
+
+    + New demosaic code: Modified AHD Demosaic by Anton Petrusevich
+      Set params.user_qual=12 to use.
+
+    + New C-API call libraw_COLOR(libraw_data_t *t, int row,int col)
+      (so LibRaw::COLOR(row,col) exposed to C-API users)
+
+  * Removed faster lossless jpeg decoder ported from RawSpeed library
+    some years ago. Build LibRaw with RawSpeed to get fast decoding.
+
+  * Fixed decoding error for some Canon sRAW files.
+
+  * Disabled RawSpeed's bad pixel processing if RawSpeed used.
+
+  * EOS M and EOS 70D added to unique Canon ID table
+
+  * Canon EOS model name normalized by unique ID table
+
+  * Backported 0.15.4 input data checks
+
+  * Support for CMake builds
+
+  * Updated RawSpeed supported camera list
+
+  * Internals changed, so all code using LibRaw should be recompiled.
+
+  * LibRaw 0.16.0-Alpha1
+
+2013-05-23 Alex Tutubalin <[email protected]>
+
+ LibRaw 0.15-Release
+
+ New camera/format support:
+  * Adobe DNG:	fast Load DNG (LightRoom 4.x), support for
+		lossy-compressed DNG (LR 4.x, requires libjpeg 6+)
+  * Canon:	G1 X, SX220 HS, EOS 5D Mark III, EOS 650D, EOS 1D-X,
+		100D (Rebel SL1), 700D (Rebel T5i), 6D, EOS M, G15, S110, SX50
+  * Casio:	EX-ZR100,EX-Z8
+  * Fujifilm:	X-S1, HS30EXR, X1-Pro,X-E1, X20, X100S, SL1000, HS50EXR,
+  		F800EXR, XF1
+  * Leica:	D-LUX6 and V-LUX4
+  * Nikon:	D4, D3200, D800, D800E, 1 J2, 1 V2, D600, 1 J3, 1 S1, Coolpix A,
+		Coolpix P330, Coolpix P7700, D7100
+  * Olympus:	E-M5, XZ-2, XZ-10, E-PL5, E-PM2
+  * Panasonic:	G5, G6, DMC-GF5, FZ200, GH3, LX7
+  * Pentax:	MX-1, K-5 II, K-5 IIs, K-30, Q10
+  * Samsung:	EX2F, NX20, NX210, support for the new firmware for NX100
+  * Sigma:	SD15, SD1, SD1 Merill, DP1, DP1S, DP1X, DP2, DP2S, DP2X
+		(only with Demosaic-pack-GPL2)
+  * Sony:	SLT-A58, RX-1, SLT-A99, NEX-5R, NEX-6, NEX-F3, SLT-A37, SLT-A57
+  * Multishot files:	Imacon Ixpress 39Mpix
+
+API changes:
+  1. dcraw_process() can now be called several times with different parameters
+     without re-opening and unpacking the file for second and consecutive
+     calls to dcraw_process
+
+  2. deleted (nobody uses those)
+   - LibRaw::dcraw_document_mode_processing  (and respective C-API)
+   - imgdata.color.color_flags data field
+
+  3. LibRaw::unpack() now decodes data into different buffers, the buffer
+     depends on the raw data type
+     - imgdata.rawdata.raw_image - 1 color component per pixel,
+       for b/w and Bayer type sensors
+     - imgdata.rawdata.color3_image - 3 color components per pixel,
+       sRAW/mRAW files, RawSpeed decoding
+     - imgdata.rawdata.color4_image - 4 components per pixel, the 4th
+       component can be void
+
+   4. Support for compiling with RawSpeed library, http://rawstudio.org/blog/?p=800
+      details are in README.RawSpeed
+
+   5. Suppression of banding
+
+   6. New API calls
+     - recycle_datastream(),
+     - open_file(wchar_t*) (Win32)
+
+
+2012-04-05 Alex Tutubalin <[email protected]>
+        * Casio EX-Z500 support
+        * (possible) I/O exceptions on file open catched in open_datastream
+        * Fixed possible read-after-buffer in Sony ARW2 decoder
+        * Fixed mingw32 errors when compiling LibRaw_windows_datastream
+        * Makefile.msvc: support of OpenMP and LCMS (uncomment to use)
+        * Fixed decoding of some Leaf Aptus II files
+        * LibRaw 0.14.6-Release
+
+2011-12-24 Alex Tutubalin <[email protected]>
+        * Fixed bug (uninitialized variable) in SMAL format decoding.
+
+        * Imported new dcraw 9.12 (1.446): support for Leica V-LUX 3,
+          updated color data for Canon S100, Fujifilm X10, Nikon 1 J1/V1,
+          Panasonic GX1, Samsung NX200, Sony NEX-7
+
+        * LibRaw 0.14.5-Release
+
+2011-12-12 Alex Tutubalin <[email protected]>
+
+        * Fixes to Panasonic/Leica file parser to prevent crash
+          on broken jpegs.
+
+        * Fixes to include order in src/libraw_datastream.cpp to
+          better compile with KDEWIN
+
+        * Floating-point DNGs are rejected on early processing stage.
+
+        * Support for new cameras: Canon S100, Fuji X10, Panasonic GX1,
+          Samsung NX200, Sony NEX-7.
+
+        * LibRaw 0.14.4-Release
+
+
+2011-10-26 Alex Tutubalin <[email protected]>
+        * Bug fixes in black level subtraction code for PhaseOne files
+
+        * New API call LibRaw::get_internal_data_pointer() for developers
+           who need access to libraw_internal_data fields (i.e.
+           Fuji SuperCCD layout).
+
+        *  doc/API-overview fixes to reflect 0.14 changes
+
+        * LibRaw 0.14.3-Release
+
+2011-10-19 Alex Tutubalin <[email protected]>
+        * Fixed bug in Canon 1D and 1Ds files decoding.
+        * New decoder information bit DECODER_HASRAWCURVE
+        * LibRaw 0.14.2-Release
+
+2011-10-11 Alex Tutubalin <[email protected]>
+        * Imported dcraw 9.11/1.445:
+          + Support for new cameras added: Fujifilm F600EXR, Nikon P7100,
+            Olympus E-PL3 and E-PM1, Panasonic DMC-FZ150, Sony NEX-5N,
+            A65 and A77.
+          + Changed color data for: Olympus E-P3, Panasonic G3 and GF3,
+            PhaseOne H25, P40 and P65, Sony NEX-C3, NEX-5, NEX-3, A35 and A55.
+          + Support for dark frame extraction on Sony cameras.
+
+        * DCB demosaicing: reserving 6 pixels instead of 3 to suppress
+          colored image frame.
+        * LibRaw 0.14.1-Release
+
+2011-09-21 Alex Tutubalin <[email protected]>
+        * Cosmetic changes to make Visual C++/OpenMP more happy
+        * Fix megapixel calculation for postprocessing_benchmark in half mode
+        * Shlib version number increment
+        * LibRaw 0.14.0-Release
+
+2011-09-04 Alex Tutubalin <[email protected]>
+        * Fixed bug with Kodak thumbnail extraction
+        * raw2image_ex() always return value
+        * LibRaw 0.14.0-Beta2
+
+2011-09-02 Alex Tutubalin <[email protected]>
+        * Cosmetic changes to LibRaw_file_datastream interface
+
+        * OpenMP speedup of postprocessing steps (up to 50% for
+          half mode and 4-core machine)
+
+        * LibRaw 0.14.0-Beta1
+
+2011-08-20 Alex Tutubalin <[email protected]>
+
+        * Patch to dcraw_emu for SunStudio compiler compatibility
+
+        * Fixed crash in unprocessed_raw sample due to uninitialized
+          timestamp variable.
+
+        * Fixed crash in raw decoding if raw_width/raw_height is
+          less than resulting image width/height.
+
+        * imgdata.sizes.flip is set from user_flip only on
+          postprocessing and/or adjust_sizes_info_only()
+
+        * Fixed buffer overrun for some LJPEG-compressed files
+
+        * Most of LibRaw_datastream function bodies are moved to
+          separate source file
+
+        * LibRaw_windows_datastream is merged to main sourcetree
+
+        * LibRaw 0.14.0-Alpha5
+
+2011-08-11 Alex Tutubalin <[email protected]>
+        * Imported dcraw 9.10 (1.444), support for new cameras added:
+          ARRIRAW format, Canon SX30 IS, Leica D-LUX 5 and V-LUX2,
+          Olympus E-P3, Panasonic G3 and GF3, Sony NEX-C3 and SLT-A35
+
+        * Support for RedOne digital movie cameras (R3D format).
+          To enable this support you should:
+           + install libjasper JPEG2000 support library
+
+           + compile LibRaw with -DUSE_JASPER compiler switch (./configure
+             will do it for you)
+
+           + If you use own LibRaw_datastream implementation, you should
+             implement make_jas_stream() call for your datastream. See
+             bottom of src/libraw_cxx.cpp for  implementations in datafile
+             and mem-buffer LibRaw streams.
+
+        * Bugfix: green matching is turned off if output image is shrinked
+          due to wavelet filtering or aberration correction.
+
+        * fixed open_file()/adjust_sizes_info_only() code path
+
+        * Removed imgdata.sizes.bottom_margin and right_margin data fields
+          use imgdata.sizes.raw_width - width - left_margin to get right one,
+          the same with bottom_margin.
+
+        * minor ./configure cleanup
+
+        * Qmake files and Visual Studio Project files are updated.
+
+        * New version check macros:
+          For use at runtime checks:
+           LIBRAW_RUNTIME_CHECK_VERSION_EXACT() - checks  that runtime
+            major/minor version numbers are same with compile-time values.
+
+           LIBRAW_RUNTIME_CHECK_VERSION_NOTLESS() - checks that runtime
+            version is not less that compile-time one.
+
+          For use at compile-time in preprocessor directives:
+           LIBRAW_COMPILE_CHECK_VERSION_EXACT(major,minor) - Compile-time
+            check that LibRaw version is exact major.minor.
+
+           LIBRAW_COMPILE_CHECK_VERSION_NOTLESS(major,minor) - Compile-time
+            check that version is not less than major.minor.
+
+        * all client code should be recompiled due to internals change.
+
+        * LibRaw 0.14.0-Alpha4
+
+2011-07-19 Alex Tutubalin <[email protected]>
+        * New sample samples/postprocessing_benchmark.cpp
+          This sample measures postprocessing speed.
+          All demosaic methods, averaged white balance, median
+          filtering, wavelet filtration, highlight recovery, and
+          cropping are supported.
+
+        * Removed LibRaw::rotate_fuji_raw() call and corresponding C-API call.
+
+        * The LibRaw::adjust_sizes_info_only() call may be called repeated
+          and mixed with dcraw_process() call.
+
+        * Postprocessing speedup and optimization, especially if cropping set.
+
+        * Cropping works for FujiCCD raws. For the technical reasons, the position
+          of top-left corner of crop area will be rounded to the nearest
+          multiple of 4 (the corner is shifted top-left).
+
+        * LibRaw 0.14.0-Alpha3
+
+2011-07-15 Alex Tutubalin <[email protected]>
+        * imported cropping code from 0.13 branch
+
+2011-07-12 Alex Tutubalin <[email protected]>
+        * samples/multirender_test - check for different clip settings
+
+2011-07-11 Alex Tutubalin <[email protected]>
+        * New call LibRaw::free_image(), deallocates imgdata.image buffer.
+          Use this call if current postprocessing results are not
+          needed, but it is to early to call recycle() because
+          dcraw_process() may be called later.
+
+        * New C-API calls
+          libraw_raw2image() - C API for LibRaw::raw2image()
+          libraw_free_image() - C API for LibRaw::free_image()
+          libraw_get_decoder_info() - C API for LibRaw::get_decoder_info()
+
+        * Bugfix: change of params.user_flip aftee open()/unpack()
+          calls should work.
+
+        * LibRaw 0.14.0-Alpha2
+
+2011-07-10 Alex Tutubalin <[email protected]>
+        * Multiple rendering (LibRaw::dcraw_process() calls) allowed
+          without re-opening RAW file thrfough the sequence of open()/unpack()
+          calls.
+          You should be able to change any processing parameters (except
+          shot_select parameter) between dcraw_process() calls.
+
+          + New sample in samples/multirender_test.cpp: renders data 4 times:
+            in half and full modes with different white balance settings.
+
+          + Unprocessed RAW data is stored in separate data buffer:
+            (2 bytes per pixel for all Bayer-pattern images,
+            8 bytes per pixel for Foveon, sRAW, and other full-color raw
+            formats), so now LibRaw uses 25% more memory for full processing of
+            most common Bayer images; while for just unpack memory is reduced
+            4 times.
+
+          + New call LibRaw::raw2image() fills imgdata.image array
+            with fresh copy of data.
+            There is no need to call raw2image() separately if you use
+            dcraw_process() or dcraw_document_mode_processing() calls.
+
+          + New call LibRaw::get_decoder_info() to determine raw data
+            storage layout. See samples/unprocessed_raw.cpp for an example
+            of how to use it.
+
+        If your code uses usual open()/unpack()/dcraw_process() call
+        sequence, then NOTHING CHANGED: your program should produce same
+        results. For interactive programs you may skip open()/unpack()
+        calls after adjusting processing parameters, so user should see
+        image refreshed much faster.
+
+        If your code uses raw data (open+unpack calls), you need to call
+        LibRaw::raw2image(), and imgdata.image will contain same bitmap
+        as in LibRaw 0.13.x
+
+        If you code uses access to masked borders data, you need to
+        rewrite it. See samples/unprocessed_raw.cpp as a sample.
+
+        Unfortunately, documentation is untouched yet. This problem will be
+        fixed in next Alpha release.
+
+        Other changes:
+
+        * No separate imgdata.masked_pixels buffers, Bayer raw formats are read
+          to buffer with borders. So, no ugly add_masked_border_to_bitmap()
+          call.
+
+        * No filtering_mode parameter. Raw tone curve is applied
+          at unpack() stage; zero pixels removed on postprocesing stage.
+
+        * unprocessed_raw and 4colors samples are adjusted to use
+          new RAW data storage layout.
+
+        * all client code should be recompiled due to internals change.
+
+        * LibRaw 0.14.0-Alpha1
+
+2011-07-03 Alex Tutubalin <[email protected]>
+        * Cosmetic cleanup in Libraw_memmgr code
+
+        * Permit OpenMP support on MS VS2008
+
+        * More general mem_image interface:
+          + New call get_mem_image_format returns bitmap size and bit depth
+          + New call copy_mem_image can copy bitmap into buffer with
+            different color order (RGB/BGR) and line stride
+          + dcraw_make_mem_image() uses calls mentioned above
+          + see documentation for info on these function parameters.
+
+        * libraw/librawwindows.h implements LibRaw_datastream class based
+          on Windows memory mapped files.Win32/64-only
+          Thanks to Linc Brookes.
+
+        * Fixed parallel make errors in configure/Makefile.am
+
+        * LibRaw 0.13.6-Release
+
+
+2011-05-18 Alex Tutubalin <[email protected]>
+        * Imported new dcraw 9.08/1.443:
+           + New color data for Canon 600D and 1100D, Fuji S200EXR
+           + New camera supported: Fuji HS20EXR and F550EXR, Kodak Z990,
+                                   Nikon D5100, Olympus E-PL1s and XZ-1,
+                                   Samsung NX11, Sony A230 and 290.
+        * LibRaw 0.13.5-Release
+
+2011-04-02 Alex Tutubalin <[email protected]>
+        * Imported new dcraw 9.07/1.442:
+          + Support for Canon 600D and 1100D, Hasselblad H4D-60,
+            Olympus E-PL2
+        * Color data for Leaf Aptus II and Canon Powershot S2 IS
+        * LibRaw 0.13.4-Release
+
+2011-03-30 Alex Tutubalin <[email protected]>
+        * Preliminary support for Leaf Aptus II cameras (no color data yet):
+          Leaf Aptus II 6,7,8,10 and 12 are tested, Aptus II 5 should work.
+        * Preliminary support for Fujifilm X100 camera (again, no color data).
+        * Fixed possible after the end of buffer read when working with
+          in-memory data.
+        * Fixed possible loss of JPEG stream sync marks in LJPEG decoder
+          (this bug was found only for Leaf Aptus II RAWs).
+        * LibRaw 0.13.3-Release
+
+2011-03-08 Alex Tutubalin <[email protected]>
+        * Fixed broken camera white balance reading for some Sony cameras
+        * LibRaw 0.13.2-Release
+
+2011-02-25 Alex Tutubalin <[email protected]>
+	* Sony A390 support (colordata from A380)
+	* Leica D-LUX 4: fixed typo in camera name in colordata
+
+2011-02-15 Alex Tutubalin <[email protected]>
+	* New -mem option for dcraw_emu: I/O via allocated buffer
+	* Removed debug printf from LibRaw_memory_buffer code
+	* Preliminary shared library support
+
+2011-02-12 Alex Tutubalin <[email protected]>
+	* Added qmake .pro and Visual Studio 2008 sln/vcproj project files
+2011-02-07 Alex Tutubalin <[email protected]>
+        * dcraw_emu documentation updated
+        * ./configure stuff changed for correct linking on some systems
+        * FBDD denoising is disabled for full-color images and 4-color bayer
+          data (including forced 4-color via four_color_rgb option)
+        * LibRaw 0.13.1-Release
+
+2011-02-05 Alex Tutubalin <[email protected]>
+        * ./configure fixes for PACKAGE_REQUIRES
+        * Makefile.msvc: correct compiler flags for demosaic packs
+        * dcraw.c 9.06/1.440 imported:
+          + New camera support: Canon S95, Casio EX-Z1080, Panasonic GF2
+            and GH2, Samsung NX100, Sony A-580
+          + New color data for: Canon G12, Nikon D3100, D7000 and P7000,
+            Olympus E-5, Pentax K-r and K-5, Samsung NX10 and WB2000
+        * green_matching() code is disabled for half-size processing
+        * LibRaw 0.13.0-Release
+
+2011-01-15 Alex Tutubalin <[email protected]>
+        * Fallback to old huffman decoder for Sony files with unspecified
+          data length (Sony A100)
+        * Fixed incomplete data fields reset in LibRaw::recycle()
+        * LibRaw 0.13.0-Beta3
+
+2011-01-13 Alex Tutubalin <[email protected]>
+        * Better parsing of unknown command-line params in dcraw_emu sample
+        * Brigtness table in ahd_demosaic is calculated in reversed order
+          to prevent possible (very unlikely) multithreaded app problem.
+        * New exposure correction code based on linear-cubic root combination.
+          New working correction range is from 0.25 (-2 stops) to 8 (+3 stops)
+        * LibRaw 0.13.0-Beta2
+
+2011-01-10 Alex Tutubalin <[email protected]>
+	* Fixed file extension in half_mt.c sample
+
+2011-01-10 Alex Tutubalin <[email protected]>
+	* Three patches provided by Jacques Desmis:
+          - Exposure correction before demosaic (demosaic pack GPL3)
+	  - OpenMP speed-up in median filters (demosaic pack GPL2)
+	  - OpenMP speed-up in green equilibration (demosaic pack GPL3)
+	* Merged 0.12.2-0.12.3 changes:
+          - Patches for ./configure system for better LCMS2 support
+	  - Patches for ./configure system
+	  - math.h included before any other includes to make KDE compile
+	    with Visual C++ happy
+	  - Fuji FinePix S5500 size adjusted to ignore (rare?) garbage
+	    at top of frame.
+        * all client code should be recompiled due to internals change.
+        * LibRaw 0.13.0-Beta1
+
+2010-12-22 Alex Tutubalin <[email protected]>
+        * Zero copy huffman buffer for LibRaw_buffer_datastream
+        * Fixed memory leak in compressed NEFs handling
+        * LibRaw 0.13.0-Alpha2
+
+2010-12-20 Alex Tutubalin <[email protected]>
+        * Demosaic-pack-GPL3 changes:
+          + New noise reduction methods before demosaic
+             - Banding suppression
+             - High-frequency noise suppression
+             - Green channel equalization
+          + New chromatic abberration correction.
+          All three methods are written by Emil Martinec for Raw Therapee.
+          Adapted to LibRaw by Jacques Desmis
+
+        * Merged Foveon code fix from LibRaw 0.12.1
+
+        * LJPEG decompressor speed-up (about 1.5 times for Canon cameras
+          and slightly less for others). Some ideas are from RawSpeed library.
+
+        * all client code should be recompiled due to internals change.
+
+        * LibRaw 0.13.0-Alpha1
+
+2010-12-12 Alex Tutubalin <[email protected]>
+	* Thread-safe and demosaic packs support for MinGW build
+	* Demosaic packs support for MS VC build
+        * LibRaw 0.12.0-Release
+
+2010-12-09 Alex Tutubalin <[email protected]>
+        * Fixed bug in add_masked_borders_to_bitmap() call for cameras
+          with odd pixels border.
+        * New command line options for unprocessed_raw sample:
+           -B - subtract black level, -M - add masked pixels to bitmap.
+        * Foveon-sensor cameras added to supported camera list if
+          compiled with demosaic pack GPL2
+        * LibRaw 0.12.0-Beta4
+
+2010-12-05 Alex Tutubalin <[email protected]>
+        * Demosaic packs support in Makefile.dist
+        * Foveon support in LibRaw demosaic pack GPL2
+        * all client code should be recompiled due to internals change.
+        * LibRaw 0.12.0-Beta3
+
+2010-11-27 Alex Tutubalin <[email protected]>
+        * Fixed allocation bug in lmmse_interpolation (demosaic-pack-GPL2)
+	* In LMMSE and AMaZE interpolators allocation changed to calloc
+	  to make valgrind happy with uninitialized values
+        * Changes in distribution-making scripts
+        * LibRaw 0.12.0-Beta2
+
+2010-11-21 Alex Tutubalin <[email protected]>
+	* Fixes to green_matching code by Sergey Pavlov
+
+2010-11-20 Alex Tutubalin <[email protected]>
+        * Update for new demosaic-pack-GPL3
+	* LibRaw 0.12.0-Beta1
+
+2010-11-19 Alex Tutubalin <[email protected]>
+        * Demosaic pack(s) supported via ./configure
+
+2010-11-17 Alex Tutubalin <[email protected]>
+	* LCMS2 support
+	* afd_interpolate(2,1) instead of (5,0)
+        * dcraw_emu sample command line keys added and reordered
+          to reflect changes in LibRaw 0.12.
+	* Nikon P7000: color matrix data and black level patch for ISO >=400
+	  Thanks to Gunnar Thorburn
+        * Support for several industrial cameras based on Sony ICX 625/655
+	  sensor: JAI BB500CL/GE, SVS625CL, ptGrey GRAS-50S5C
+	  Thanks to kaare
+
+2010-11-15 Alex Tutubalin <[email protected]>
+
+        * Several demosaic algorithms, found in other open-source RAW processing
+          packages are implemented in LibRaw.
+
+          1) DCB demosaic and FBDD denoise by Jacek Gozdz are included in
+             main LibRaw source.
+          2) GPL2 demosaic pack with these demosaic methods:
+             * AFD and LMMSE implementations from PerfectRaw by Manuel Llorens
+             * VCD, Modified AHD, post-demosaic refinemend and median
+               filters by Paul Lee
+          3) GPL3 demosaic pack with AMaZe interpolation  by Emil Martinec
+
+          See more details in README.demosaic-packs
+
+        * Current implementation of dcraw_emu sample allows only selection
+          of demosaic method (via -q) options. All other parameters change
+          will be implemented later.
+
+	* LibRaw 0.12-alpha1
+
+2010-11-11 Alex Tutubalin <[email protected]>
+	* Imported 0.11(2) version changes:
+	  + Fixed dcraw_emu command line processing code
+          + OpenMP is completely disabled on MacOS X if compiled with -pthread
+            due to well-known MacOS problem.
+          + dcraw 9.05 (1.439) imported, many new cameras supported:
+              Canon: G12, SX120, 60D,
+              Hasselblad H4D, Nokia X2, Olympus E-5,
+              Nikon: D3100, D7000, P7000,
+              Panasonic: FZ40, FZ100, LX5,
+              Pentax: K-r, K-5, 645D,
+              Samsung GX20, WB2000
+	* LibRaw 0.12-alpha0
+
+2010-11-08 Alex Tutubalin <[email protected]>
+	* Fixes for Sun Studio compiler compatibility
+	* Fixes for Visual Studio 2010 compatibility
+	* All russian-language files are converted to UTF-8
+	* LibRaw 0.11.0-Release
+
+2010-10-18 Alex Tutubalin <[email protected]>
+           * Disabled OpenMP for wavelet_denoise under Mac OS X
+           * More Visual C++ 2003 warnings cleaned in libraw/*h files
+           * LibRaw 0.11-Beta7
+
+2010-10-16 Alex Tutubalin <[email protected]>
+           * internal/dcraw_fileio.c can be compiled with -DDCRAW_VERBOSE again
+           * fixed comment style in libraw_datastream.h
+           * LibRaw 0.11-Beta6
+
+2010-10-15 Alex Tutubalin <[email protected]>
+
+           * New changes to I/O layer. Three LibRaw_*datastream clasees are
+             exists:
+               + LibRaw_buffer_datastream - buffer reaging
+               + LibRaw_file_datastream - file reading using iostreams
+                 (large files are no supported on some systems)
+               + LibRaw_bigfile_datastream - FILE*-based file I/O
+
+           *  file/bigfile_datastream is selected automatically by
+              LibRaw::open_file based on input file size.
+              By default, files larger than 250Mb are opened using
+              bigfile interface, you may change this behaviour
+              by using second optional parameter of open_file()
+
+           * There is no way to use default parameter values in C API,
+             so new call libraw_open_file_ex added with two parameters
+             (file name and minimal file size for bigfile_datastream use).
+
+           * all client code should be recompiled due to internals change.
+
+           * All LibRaw_abstract_datastream functions are virtual again. You may
+             (again) use your own I/O layer.
+
+           * new -d key for dcraw_emu sample: print timings of processing stages
+
+           * simple_dcraw sample simplified: no mmap code
+
+           * LibRaw 0.11-Beta5
+
+2010-10-08 Alex Tutubalin <[email protected]>
+           * Fixed bug in exception handling in OpenMP sections in
+             AHD interpolation code.
+
+           * LibRaw_datastreams are now C++ iostreams based instead of old
+             plain FILE* calls.
+             LibRaw::open_file() in multithreaded programs are WAY faster
+             on many OSes (Linux, Windows, MacOSX) because of no extra locks.
+
+           * all client code should be recompiled due to internals change.
+
+           * LibRaw 0.11-Beta4
+
+
+2010-10-01 Alex Tutubalin <[email protected]>
+           * Fixed bug in LibRaw::dcraw_process() code: for half_size
+             processing, params.four_color_rgb was set to 1 internally
+             and not returned back after postprocessing.
+
+           * Several Visual Studio 2003 compatibility fixes
+
+            * AHD interpolation refactored. Now it is about 10% faster than
+              dcraw in single-process mode and up to 1.5 times faster on
+              4-core and OpenMP (total execution time counted, not AHD itself)
+              Thanks to Adam Hooper
+           * AHD interpolation refactored. Now it is about 10% faster than
+             dcraw in single-process mode and up to 1.5 times faster on
+             4-core and OpenMP (total execution time counted, not AHD itself)
+             Thanks to Adam Hooper
+
+           * LibRaw 0.11-Beta3
+
+2010-09-07 Alex Tutubalin <[email protected]>
+           * Phase One files: LibRaw::unpack() sets colordata.black to
+             approximately correct value.
+
+           * Fixed minor error in setting colordata.maximum value
+             for Phase One files.
+
+           * LibRaw::subtract_black() sets colordata.black and
+             colordata.cblack[] to zero to preserve data integrity.
+
+           * LibRaw 0.11-Beta2
+
+
+2010-09-04 Alex Tutubalin <[email protected]>
+
+           * It is now possible to crop output image on postprocessing
+            stage (dcraw_process). Coordinates and size of the output box
+            are set via imgdata.params.cropbox[4] parameter. Look into
+            LibRaw documentation for more details.
+
+              + New fatal error code LIBRAW_BAD_CROP
+
+              + New dcraw_emu sample command line switch: -B x y w h
+                (sets cropbox)
+
+             Thanks to Patrick and Jan.
+
+            * Processing pipeline has changed: the black level is subtracted
+              from data on postprocessing stage either automatically
+              (on dcraw_process() stage) or by special LibRaw API call:
+
+               + New API calls:  LibRaw::subtract_black() (C++ API) and
+                 libraw_subtract_black (C API).
+                 If you use dcraw_process() or dcraw_document_mode_processing()
+                 calls YOU DON'T NEED to call subtract_black() directly.
+
+               + The raw preprocessing mode LIBRAW_FILTERING_NOBLACKS
+                 is deprecated and removed from LibRaw.
+
+             * New ./configure script.
+               Use ./configure -h for usage details.
+               Thanks to Siddhesh Poyarekar
+
+             * New API cals static LibRaw::dcraw_clear_mem() (C++ API)
+               and libraw_dcraw_clear_mem(..) (C API).
+               This calls are used to free memory, allocated by
+               dcraw_make_mem_image() and dcraw_make_mem_thumb() instead
+               of free() call.
+
+               In some cases LibRaw and calling process have different
+               memory managers, so free() of make_mem_image() data
+               results to program crash (especially in Win32/VisualStudio
+               enviroment).
+
+             * LibRaw::free() is now private instead of public (again).
+
+             * Minor changes and bugfixes:
+
+               + Memory allocation exceptions (std::bad_alloc) are caught,
+                 so LibRaw API calls will return reasonable error codes
+                 instead of C++ exception (possibly unhandled).
+                 This problem is very unlikely to see in wild: if application
+                 cannot allocate small data for internal structure, it will
+                 always fail on allocation for RAW image data.
+
+               + WIN32/VisualStudio 2008/2010: fopen,fscanf and sscanf calls
+                 in Libraw_datastream code are changed to *_s (secure) ones.
+
+               + Debug print removed from fatal error handler.
+
+               + Mmaped I/O for dcraw_emu sample is turned on via -E switch
+                 now (because old -B switch is used for settng cropbox).
+
+           * all client code should be recompiled due to structures size change
+
+           * LibRaw 0.11-Beta1
+
+
+2010-07-31 Alex Tutubalin <[email protected]>
+           * dcraw 9.04 (1.438) imported: changes in tiff metadata parser,
+            fixed a typo in Canon A720 model name
+           * small patch in Sony ARW2 unpacking code to make valgrind happy
+           * LibRaw 0.10.0-Beta3.
+
+2010-07-05 Alex Tutubalin <[email protected]>
+           * dcraw 9.03 (1.437) imported:
+             + New cameras: Canon SX20, Nikon D3s, Olympus E-P2, Panasoni DMC-GF1,
+               Samsung EX1, Sony A450
+             + Color data changed for some cameras
+
+           * LibRaw 0.10.0-Beta2.
+
+2010-06-06 Alex Tutubalin <[email protected]>
+           * dcraw 9.01 (1.434) imported:
+             + Separate black levels for each color channel.
+             + New cameras: Canon 550D, Casio EX-Z1050, Fuji HS10/HS11,
+               Kodak Z981, Panasonic G2 and G10, Phase One P65,
+               Samsung NX-10 and WB550, Sony NEX-3 and NEX-5.
+             + Fixed file descriptor leak in dark frame subtraction processing
+
+           * Fixed dcraw 9.01's bug in DNG black level processing
+
+           * Preliminary support for Sony A450 camera.
+
+           * New command-line switch -h in mem_image sample (half_size support)
+
+           * Some patches by Johannes Hanika (darktable author):
+              + OpenMP speedup  for PPG-interpolation
+              + green_matching  - suppress of 'color maze' on cameras with
+              different green channel sensitivity. This option is turns on
+              by  filed with same name in imgdata.params
+
+           * all client code should be recompiled due to structures size
+             change
+
+           * LibRaw::free() is now public instead of private.
+
+           * LibRaw 0.10.0-Beta1.
+
+2010-05-15 Alex Tutubalin <[email protected]>
+           * Fixed bug in 8-bit RAW processing code
+           * LibRaw 0.9.1-Release
+
+2010-04-26 Alex Tutubalin <[email protected]>
+           * OpenMP support: OpenMP is possible under MinGW (untested)
+           * LibRaw 0.9.0-Release
+
+2010-04-21 Alex Tutubalin <[email protected]>
+           * Finally fixed inconsistency in Fuji files processing
+           * New COLOR(row,col) call to get bayer color index in image[] array
+           * Old FC() call is deprecated and will be removed in future releases
+           * unprocessed_raw sample switched to COLOR() call
+           * LibRaw 0.9.0-Beta5
+
+
+2010-04-10 Alex Tutubalin <[email protected]>
+           * Fixed bug in unpacking DNG files made from Fuji RAFs.
+           * LibRaw 0.9.0-Beta4
+
+2010-04-09 Alex Tutubalin <[email protected]>
+
+           * Fixed typecast error (problem reported only on gcc 4.2.1/32bit)
+            in CRW files processing.
+
+           * C++ API call LibRaw::adjust_maximum() is now deprecated and
+             de-documented, use params.adjust_maximum_thr instead (on by default)
+
+           *  C-API call libraw_adjust_maximum() removed.
+
+           * New postprocessing parameter params.adjust_maximum_thr
+             This parameter replaces LibRaw::adjust_maximum(), but more flexible
+             Defaults are reasonable (0.75, same as in old adjust_maximum),
+             look into documentation for more details.
+
+           * Removed last OpenMP warning
+
+           * dcraw_emu's -c parameter now wants numeric (float) argument. This value
+             is assigned to params.adjust_maximum_thr.
+             Use -c 0.0 for dcraw compatibility.
+
+           * all client code should be recompiled due to structures size
+             change
+
+           * LibRaw 0.9.0-Beta3
+
+
+2010-03-29 Alex Tutubalin <[email protected]>
+           * Fixed a bug in channel_maximum[] calculation for
+             Panasonic cameras.
+           * channel_maximum[] data now calculated for ALL cameras.
+           * OpenMP warnings suppressed.
+           * Documented the -c command-line switch for dcraw_emu sample.
+           * Removed extra messages from dcraw_emu sample.
+           * LibRaw 0.9.0-Beta2
+
+2010-03-28 Alex Tutubalin <[email protected]>
+
+           New licensing:
+
+           * Triple licensing (selected by LibRaw user):
+
+              + LGPL 2.1 (http://www.gnu.org/licenses/lgpl-2.1.html)
+              + CDDL 1.0 (http://www.opensource.org/licenses/cddl1.txt)
+              + LibRaw Software License (27 March 2010 version)
+               (http://www.libraw.org/data/LICENSE.LibRaw.pdf)
+
+           * There is no separate LibRaw-Lite and LibRaw-Commercial versions,
+             only single LibRaw.
+             Current LibRaw-Lite and LibRaw-Commercial users should switch
+             to LibRaw without loss of functionality.
+             It is possible to change licensig too (e.g. from LGPL to CDDL
+             for LibRaw-Lite users and from LibRaw License to LGPL or CDDL
+             for LibRaw-Commercial users).
+
+           * No Foveon support :(
+             It is not possible to get good color from Foveon sensors with
+             *any* converter. So, there is no need to support these cameras.
+             Dcraw's Foveon-processing code is too strict licensed (GPL),
+             so we choose to drop it.
+
+           New Features:
+
+           * New data field  colordata.channel_maximum[4] - per channel data
+            maximum (calculated for most cameras, 0 for others).
+
+           * New call LibRaw::adjust_maximum() (and libraw_adjust_maximum() in C API).
+             This call changes hardcoded colordata.maximum value to calculated
+             at unpack stage. This helps suppress false color in highlights
+             (magenta clouds and so).
+
+           * New command line parameter -c for dcraw_emu sample. Calls adjust_maximum()
+             for each processed file.
+
+           * all client code should be recompiled due to structures size
+             change
+
+           * LibRaw 0.9.0-Beta1
+
+2010-02-06 Alex Tutubalin <[email protected]>
+           * Fixed ambiguity in pow/sqrt calls (to make Sun C++ compiler happy)
+           * OpenMP is not supported under MS Visual Studio
+           * Masked a bug in RIFF format parser
+           * LibRaw 0.8.6
+
+2009-12-30 Alex Tutubalin <[email protected]>
+           * Fixed bug in simple_dcraw sample parameters processing
+           * Imported dcraw 8.99 (1.432):
+             + New cameras: Canon:  1D mk IV, Canon S90; Casio Z750,
+               Nikon D3S, Pentax K-x, Sony A-500/550, Fuji S200EXR
+             + New color data for Canon G11 and Sony A850
+             + Changes in Canon sRAW processing
+             + Changes in Kodak metadata processing
+             + Changes in uncompressed Fuji files processing (FinePix S5xxx)
+           * LibRaw 0.8.5
+
+2009-11-21 Alex Tutubalin <[email protected]>
+           + Fixed a bug in processing of uncompressed Phase One files
+           * LibRaw 0.8.4
+
+2009-10-24 Alex Tutubalin <[email protected]>
+           + Imported dcraw 8.98/1.431:
+             * New Cameras: Canon 7D, Panasonic GF1, Sony A850 and A380,
+             Casio Z850, Nikon D300s
+           + changes in libraw_datastream.h to make compilers more happy
+           * LibRaw 0.8.3
+
+2009-09-02 Alex Tutubalin <[email protected]>
+           + Fixed bug in Hasselblad .3FR unpacking code
+           * Imported dcraw 8.97/1.428: Nikon D3000 image width fix
+           * LibRaw 0.8.2
+
+2009-08-31 Alex Tutubalin <[email protected]>
+           + Enum LibRaw_thumbnail_formats (LIBRAW_IMAGE_*) values changed to
+             match values in  enum LibRaw_image_formats (LIBRAW_THUMBNAIL_*).
+             You need to recompile all sources using these constants.
+
+2009-08-30 Alex Tutubalin <[email protected]>
+           * Imported dcraw 8.97/1.427:
+             + new cameras: Canon A470, Canon G11 (without color data),
+                Nikon D3000, Olympus E-P1, Panasonic DMC-FZ35/FZ38
+             + some changes in decoding code.
+            * Fixes for Microsoft Visual C++ 6.0 compatibility
+            * C-API dcraw_make_mem_thumb() call finally exported in API
+           * LibRaw 0.8.1
+
+2009-08-24 Alex Tutubalin <[email protected]>
+           * Imported dcraw 8.96/1.426
+             + New cameras: Casio EX-Z60 and EX-Z75, Kodak Z980,
+               Nikon D5000,  Olympus X200, D560Z,C350Z,E620,
+               Pentax K7, Sony A330.
+             + New color data for many cameras
+             + Generalized unpacker code for Canon and Casio P&S cameras
+           * LibRaw 0.8.0-Release
+
+2009-08-13 Alex Tutubalin <[email protected]>
+           * RAW files larger than 2Gb are supported on:
+              - Unix (all supported: FreeBSD, MacOS X, Linux)
+              - Windows (with C runtime version  >= 8.0)
+           * bzero replaced with memset to make Solaris users happy
+           * All applications on 32-bit systems should be recompiled
+             due to data structures size changes.
+           * Minor fixes in windows makefile
+           * LibRaw 0.8.0-Beta5
+
+2009-07-21 Alex Tutubalin <[email protected]>
+           * Imported dcraw 8.95 (1.425):
+             + new huffman tree code
+             + New cameras supported: AGFAPHOTO DC-833m, Casio EX-S20,
+                Phase One P65, Samsung S850
+             + Removed hardcoded white-balance data for many P&S cameras.
+               It is recommended to set params.use_camera_wb to 1 for
+               safe WB.
+           * Fixes for Nikon D5000 files: no pink stripe at
+             right side of frame
+           * C-wrapper: added missed calls
+               libraw_dcraw_make_mem_image
+               libraw_dcraw_ make_mem_thumb
+           * Minor fixes to make non-gcc compilers more happy
+           * Internal structures changed, full recompilation of all client
+             code is needed.
+           * LibRaw 0.8.0-Beta4
+
+2009-06-08 Alex Tutubalin <[email protected]>
+           * Fixes: gamma  curve processing was not performed in
+              dcraw_write_mem_image()
+           * Fixes: gamma curve processing was not performed for
+              Kodak thumbnails
+           * LibRaw 0.8.0-Beta3
+
+2009-06-05 Alex Tutubalin <[email protected]>
+           * Fixes in documentation: params.gamm[] described more precisely
+           * Fixes in version number, 0.8-beta1 was mistakenly 0.0.0-beta1
+           * LibRaw 0.8.0-Beta2
+
+2009-06-04 Alex Tutubalin <[email protected]>
+           * Imported dcraw 8.94 (1.423):
+             + New camera support:
+                 Canon: SX1, 500D/Rebel T1i, A570, A590, SX110
+                 Kodak Z1015, Motorola PIXL, Olympus E30, Panasonic DMC-GH1
+             + Improved color data for Nikon D3X
+             + New gamma curve model
+             + Many changes in RAW unpacking code
+             + Canon cameras: black level is not subtracted if set
+               params.document_mode > 1
+
+           * API changed: params.gamma_16bit field removed. Gamma curve is
+             set via params.gamm[0]/gamm[1] values (see documentation and
+             samples for details)
+           * LibRaw::identify() splitted to avoid MS VS2008 bug (too many
+             nested blocks)
+
+           * Samples: dcraw_emu and mem_image samples supports new dcraw
+              16bit/gamma semantics:
+                -6: set 16 bit output
+                -4: set 16 bit output and linear gamma curve and no auto
+                   brighness
+           *  LibRaw 0.8.0-Beta1
+
+2009-04-28 Alex Tutubalin <[email protected]>
+           * Identify sample renamed to raw-identify (name conflict
+             with ImageMagic)
+           * Copyright notice changes
+           * Many compiler warnings removed
+
+2009-04-07 Alex Tutubalin <[email protected]>
+           * More accurate types conversion in libraw_datastream.h
+           * New postprocessing parameter auto_bright_thr: set portion of
+             clipped pixels for auto brightening code (instead of
+             dcraw-derived hardcoded 1%)
+           * -U  option for dcraw_emu sample sets auto_bright_thr parameter
+           * all client code should be recompiled due to structures size
+             change
+           * LibRaw 0.7.2-Release
+
+2009-03-22 Alex Tutubalin <[email protected]>
+           * Fixed typo in OpenMP support code
+           * MinGW support
+           * dcraw source is included in distribution
+           * LibRaw 0.7.1-Release
+
+2009-03-15 Alex Tutubalin <[email protected]>
+           * Fuji SuperCCD RAWs: color channels unshuffled on RAW
+             read stage (moved from postprocessing stage)
+
+           * LibRaw 0.7.0-Release
+
+2009-03-13 Alex Tutubalin <[email protected]>
+           * dcraw 8.93/1.421 imported:
+             + more accurate pentax dSLR support
+             + fixes in Kodak 620x/720x identification
+             + faster identification procedure for some formats.
+           * LibRaw 0.7.0-Beta5
+
+
+2009-03-08 Alex Tutubalin <[email protected]>
+           * dcraw 8.92/1.420 imported:
+             + user-specified gamma curve
+             + Pentax K2000/Km support
+             + Changes in Canon sRAW processing (support for 5D2 fw 1.07)
+
+           * all client code should be recompiled
+
+           * LibRaw 0.7.0-Beta4
+
+2009-02-13 Alex Tutubalin <[email protected]>
+           * bugfix: 4channels sample finally subtracts black by default
+           * dcraw 8.91/1.419 imported:
+              + fixes in RIFF files parsing
+
+           * LibRaw 0.7.0-Beta3
+
+2009-02-12 Alex Tutubalin <[email protected]>
+           * Black level was not calculated for Canon RAWs in
+             some filtering modes
+
+           * 4channels sample prints calculated black level
+             (scaled if autoscaling used).
+             Also output file names for this sample now includes
+             color channel name (R/G/B/G2 or C/M/Y/G)
+
+           * LibRaw 0.7.0-Beta2
+
+2009-02-09 Alex Tutubalin <[email protected]>
+           * New sample 4channels: splits RAW color channels into four
+             separate TIFFs
+
+           * LibRaw 0.7.0-Beta1
+
+2009-02-07 Alex Tutubalin <[email protected]>
+           * Fixed bug in external jpeg metadata reading code.
+
+           * Cleaned some C++ warnings
+
+           * dcraw 8.91/1.418 imported
+             + Hasselblad V96C support
+
+           * You need to clean and recompile client code which
+             uses LibRaw_*_datastream classes.
+
+           * LibRaw 0.7.0-Alpha6
+
+2009-01-30  Alex Tutubalin <[email protected]>
+
+           * New data input framework is created. It is possible now to
+             easyly implement your own data input interface for LibRaw
+             (e.g. for reading RAW data from network data stream)
+
+           * All older programs using previous LibRaw versions are
+	     compatible at source code level.
+
+           * LibRaw can read RAW data from memory buffer via
+             new LibRaw::open_buffer() API call (implemented on top of
+             new input framework).
+             This call used in sample application dcraw_emu and simple_dcraw
+             (with -B command-line switch) to test new API.
+
+           * Error handling callback functions now can be called with
+             NULL filename passed (if underlying data stream object
+             does not know file name).
+             So, client error handling callbacks should work with NULL
+             filename.
+
+           * All client code should be recompiled
+
+           * Imported dcraw 8.90/1.417:
+              + Support for loading White Balance data from
+                Sony ARW files edited with Sony IDC software.
+
+           * LibRaw 0.7.0-Alpha5
+
+2009-01-17 Alex Tutubalin <[email protected]>
+           * Raw filtering mode LIBRAW_FILTERING_NOPOSTPROCESS has renamed
+            to LIBRAW_FILTERING_NORAWCURVE for better reflect its purpose.
+            This filtering_mode bit turns off tone curve applying on
+            RAW data on bayer-pattern cameras with raw tone curve:
+              + Adobe DNG (only RAW with bayer pattern)
+              + Nikon compressed NEF
+              + Some Kodak cameras
+              + Sony A700/A900 (tone curve applied to 8-bit raws)
+
+           * unprocessed_raw sample: added command-line key -N, this key
+             turns on LIBRAW_FILTERING_NORAWCURVE filtering mode.
+
+           * New scheme of Fuji RAW processing (introduced in 0.7-Alpha3)
+             supports DNG files generated from Fuji RAF.
+
+           * Imported dcraw 8.90/1.416:
+              + better support for Samsung S85
+              + fixed possible integer overflow in wavelet denoising code
+
+           * LibRaw 0.7.0-Alpha4
+
+
+2009-01-14 Alex Tutubalin <[email protected]>
+           * Black mask extraction supported for all files with bayer data
+            (one component per pixel). Black mask data not avaliable
+            for multi-component data (Foveon, Canon sRAW, Sinar 4-shot,
+            Kodak YCC/YRGB).
+
+           * Black level subtraction can be turned off for all bayer
+            cameras (added support for PhaseOne backs).
+
+           * Fujifilm camera processing model changed:
+              + RAW data is extracted without 45-degree rotation
+              + dcraw-compatible rotation is performed on postptocessing stage
+              + it is possible to rotate RAW data without postprocessing
+                by LibRaw::rotate_fuji_raw() call.
+
+           * New filtering mode setting: LIBRAW_FILTERING_NOPOSTPROCESS
+             This bits turns off RAW tone curve processing based on tone curve
+             readed from RAW metadata.
+             This mode supported only for PhaseOne backs now (to be supported
+             on all relevant cameras in nearest future releases)
+
+           * Black level data (got from RAW data) are stored for PhaseOne backs.
+
+           * Black level subtraction bug (derived from dcraw) fixed
+             for PhaseOne files.
+
+           * Fixed processing of -s parameter for dcraw_emu sample
+
+           * Parameter  -s N (select shot number) added to
+             unprocessed_raw sample.
+
+           * Imported dcraw 8.90/1.414:
+              + changes in QuickTake 100 metadata processing
+              + changes in external jpeg processing code
+              + Samsung S85 support
+
+           * All client code should be recompiled
+
+           * LibRaw 0.7.0-Alpha3 released
+
+2009-01-10 Alex Tutubalin <[email protected]>
+           * Fixed bug in add_masked_borders: crash if output dimensions
+            is already larger than raw dimensions
+            * Fixed out of bounds in samples/unprocessed_raw.cpp for files
+            with non-square pixels
+
+           * LibRaw 0.7.0-Alpha2 released
+
+2009-01-08 Alex Tutubalin <[email protected]>
+           * Fixed bug in  0.7.0-a0: black frame size has not reset,
+             so in batch processing there is an error in black frame
+             size for files without black frame.
+
+           * Implemented reading of black/masked pixels data for
+             near all cameras with masked pixels, exclding:
+              + Canon sRAW, Leaf (MOS), Sinar 4-shot - more than one
+                color component in black frame (redesign of black frame
+                data structures required).
+              + Fuji SuperCCD: need to design right methods of extraction
+                (should we rotate and resize black pixels as active ones??)
+
+            * Tested for most dSLR data formats with masked pixels: 7 of 9
+              untested formats are from old P&S cameras.
+
+           * New call LibRaw::unpack_function_name() returns unpack function name
+             (useful for testers only)
+
+           * New identify sample parameters (useful for test-suite builders
+             to check test coverage):
+                  -u - print unpack function name
+                  -f - print masked frame size
+             These parameters works only for identify run without -v parameter
+
+           * Imported dcraw 8.89/1.411
+             + changes in Panasonic FZ50 files parsing
+
+           * LibRaw 0.7.0-Alpha1 released
+
+
+2009-01-05 Alex Tutubalin <[email protected]>
+           * It is possible to turn off RAW data filtration (black level
+             subtraction,              zero pixels averaging):
+                + supported on all cameras except Foveon and Phase One
+                + filtraction controlled by new parameter "filtering_mode"
+                + it is possible to expand API by filtering procedures
+                  built for specific camera model.
+
+           * Black border (masked pixels) extraction:
+                + API (data structures) for storing black mask.
+                + Black mask extraction supported only for limited list of
+                  data formats:
+                       - Canon .CRW, .CR2 (with exception of sRAW),A600, A5
+                       - Adobe DNG (both converted RAW and native DNG)
+                       - Nikon NEF (compressed only)
+                  this list to be expanded in future LibRaw versions
+           * New call add_masked_borders_to_bitmap makes full bitmap
+             'masked border' + image
+           * Usage sample for functionality listed above:
+              samples/unprocessed_raw
+           * Imported dcraw 8.89/1.410:
+              + fixed bugs in Hasselblad .fff decoding
+              + fixes in Imacon metadata decoding
+           * Documentation changes
+           * All client code should be recompiled
+           * LibRaw 0.7.0-Alpha0
+
+
+2009-01-01 Alex Tutubalin <[email protected]>
+           * Fixed a bug (filedescriptor and buffer memory leak)  in thumbnail
+             extraction when called before metadata analysis.
+             Thanks to Albert Astalis Cid.
+           * LibRaw 0.6.4 Release
+
+2008-12-11 Alex Tutubalin <[email protected]>
+           * Imported new edition of dcraw 8.89 (version 1.409)
+           * Nikon NEF decoding changed
+           * LibRaw 0.6.3 Release
+
+2008-12-03 Alex Tutubalin <[email protected]>
+           * fixed bug in Panasonic .RW2 processing (only for thread-safe version,
+             single-threaded version was not affected)
+           * All client code should be recompiled
+           * LibRaw 0.6.2 Release
+
+2008-12-03 Alex Tutubalin <[email protected]>
+           * Imported  dcraw 8.89 (version 1.407)
+           * New cameras:
+               Canon G10 & 5D Mk2, Leaf AFi 7, Leica D-LUX4, Panasonic FX150 & G1,
+               Fujifilm IS Pro,
+           * Changed camera support (color conversion tables):
+               Canon 50D, Nikon D90 & P6000, Panasonic LX3 & FZ28, Sony A900
+           * LibRaw 0.6.2 beta
+
+2008-09-25 Alex Tutubalin <[email protected]>
+           * Added new data field  float LibRaw::imgdata.color.cam_xyz[4][3].
+           This field contains constant table (different for each camera) for
+           Camera RGB->XYZ conversion.
+           * All client code should be recompiled
+           * LibRaw 0.6.1 Release
+
+2008-09-18 Alex Tutubalin <[email protected]>
+           * dcraw 8.88 imported:
+              - new cameras (Canon 50D, Sony A900, Nikon D90 & P6000,
+                Panasonic LX3 FZ28)
+              - new method of black point subtraction for Canon cameras,
+                preliminary banding supression.
+            * Stack memory usage lowered (some thread data moved to dynamic
+            memory)
+            * some patches for MSVC compatibility
+            * LibRaw 0.6.0 Release
+
+2008-09-16 Alex Tutubalin <[email protected]>
+           * Enum definitions changed to make gcc -pedantic happy
+           * Compiler/preprocessor flags does not affects LibRaw class field set
+           (i.e. structure for thread local storage is always allocated)
+           * Default library compilation mode (i.e. sources imported in another
+             project) is thread-safe
+
+2008-09-14 Alex Tutubalin <[email protected]>
+           * OpenMP support for most CPU consuming steps of processing:
+             ahd_interpolation. wavelet_denoise
+             10-30% speed-up of full processing pipe on 2-core CPU
+             OpenMP supported only on gcc (Linux/FreeBSD and Mac OS X)
+
+           * LibRaw 0.6.0-Beta-1
+
+2008-09-10 Alex Tutubalin <[email protected]>
+           *  All set_**handler accepts additional void* pointer, which should point to
+            callback private data. This pointer passed to user callback when it called.
+
+           * LibRaw 0.6.0-alpha5
+
+           * All client code should be recompiled
+
+2008-09-10 Alex Tutubalin <[email protected]>
+           * New processing stages in enum LibRaw_progress:
+             LIBRAW_PROGRESS_BAD_PIXELS LIBRAW_PROGRESS_DARK_FRAME
+            (reserved stages LIBRAW_PROGRESS_RESERVED_PRE1-PRE2 has removed)
+           * libraw_strprogress() - convert progress code into string
+
+           * Added progress/cancellation user callbacks
+             + new fatal error code: CANCELLED_BY_CALLBACK
+             + sample usage in samples/dcraw_emu.cpp (try run it with -v -v -v opts)
+
+           * LibRaw 0.6.0-alpha4
+
+           * All client code should be recompiled
+
+2008-09-08 Alex Tutubalin <[email protected]>
+           * ICC-profiles support (same as in dcraw)
+             + input/output profiles (specified as path to 'icc' file or 'embed' for
+               embedded input profile)
+             + additional warnings
+             + LCMS library used
+
+           * support of bad pixel map (caller should specify path to bad pixel file
+              in dcraw-compatible format)
+
+           * dark frame subtraction support (caller should supply path to 16-bit PGM
+              map). samples/simple_dcraw.cpp - -4 option added for dark frame file
+              generation
+
+           * support of bad pixeld map (dcraw-compatible format)
+
+           * the dcraw_emu sample supports all new features (ICC, dark frame, bad
+              pixels)
+
+           * libraw/libraw_version.h, defines, calls and macros for version checks:
+              + LibRaw::version(), LibRaw::versionNumber(), LIBRAW_CHECK_VERSION()
+
+           * List of supported cameras:
+              + LibRaw::cameraCount()
+              + LibRaw::cameraList()
+
+           * fixed error in adjust_sizes_info_only
+
+           * documentation changes
+
+           * LibRaw 0.6.0-alpha3
+
+2008-09-07 Alex Tutubalin <[email protected]>
+           * samples/mem_image.c - bitwise equal output with dcraw -4
+             (PPMs outputted with network byte order)
+           * LibRaw 0.6.0-alpha2
+
+2008-09-06 Alex Tutubalin <[email protected]>
+           * Added calls dcraw_make_mem_image and dcraw_make_mem_image:
+             + functions (and supporting code)
+             + documentation changed
+             + new sample code samples/mem_image.cpp
+           * Added processing parameter  LibRaw::imgdata.params.gamma_16bit
+              (set to 1 to make gamma correction for 16-bit output)
+           * LibRaw 0.6.0-alpha1
+
+2008-08-28 Alex Tutubalin <[email protected]>
+           * dcraw 1.404 (8.87) imported:
+             - 6 new cameras supported (Canon 1000D, A720, SD300;
+                Nikon D700, Oly E-520,Kodak C603)
+           * Licensing changed to GPL v2
+
+2008-05-02  Alex Tutubalin <[email protected]>
+            * mmap/malloc+read IO-layer removed due to no performance gain.
+              FILE I/O returned
+
+2008-05-02  Alex Tutubalin <[email protected]>
+            * dcraw 1.403 imported
+              - changes in ljpeg decompression (index values cut to 12 bit)
+              - changes in parse_foveon() jpeg thumbnail extraction
+            * LibRaw 0.5.3 released
+
+2008-04-24  Alex Tutubalin <[email protected]>
+            * Linux build of samples/identify fixed
+            * documentation editorial
+            * LibRaw 0.5.2 released
+
+2008-04-21  Alex Tutubalin <[email protected]>
+            * All documentation translated to English
+            * English changelog started :)
+            * minor bug (include path) fixed in samples/half_mt
+            * LibRaw 0.5.1 released

+ 20 - 0
raw.mod/libraw/DEVELOPER-NOTES

@@ -0,0 +1,20 @@
+
+=== Notes for LibRaw contributor ===
+
+0. Repository
+   LibRaw public repository is located on GitHub
+   URL: 
+    http://github.com/LibRaw/LibRaw - main page
+    git://github.com/LibRaw/LibRaw.git - git URL
+
+If you wish to participate in LibRaw development please use GitHub fork.
+
+LibRaw distribution files are prepared by ./mkdist.sh script
+   This script
+     - generates ./configure script from autotools stuff
+     - removes developer Makefile
+     - fetches 'Official' dcraw.c from Dave Coffin's site
+     - removes itself
+
+Feel free to contact us ([email protected] or Contact form on www.libraw.org) if
+you have any questions or suggestions.

+ 21 - 0
raw.mod/libraw/GoPro/dng-sdk-allow-VC5-validate.diff

@@ -0,0 +1,21 @@
+diff --git a/source/dng_ifd.cpp b/source/dng_ifd.cpp
+index 174f18f..2974323 100644
+--- a/source/dng_ifd.cpp
++++ b/source/dng_ifd.cpp
+@@ -3168,6 +3168,7 @@ bool dng_ifd::IsValidDNG (dng_shared &shared,
+ 		case ccUncompressed:
+ 			break;
+ 			
++        case 9: /* VC5 compression support */
+ 		case ccJPEG:
+ 			{
+ 			
+@@ -3202,7 +3203,7 @@ bool dng_ifd::IsValidDNG (dng_shared &shared,
+ 			break;
+ 			
+ 			}
+-			
++
+ 		case ccLossyJPEG:
+ 			{
+ 			

+ 29 - 0
raw.mod/libraw/GoPro/gpr_read_image.cpp.diff

@@ -0,0 +1,29 @@
+--- gpr_read_image.cpp.orig	2019-08-30 12:20:00.326653300 +0300
++++ gpr_read_image.cpp	2019-08-31 10:43:26.568184100 +0300
+@@ -67,6 +67,10 @@
+     fDecodeVC5 = true;
+ }
+ 
+ void gpr_read_image::ReadTile (dng_host &host,
+                                    const dng_ifd &ifd,
+                                    dng_stream &stream,
+@@ -77,7 +81,8 @@
+                                    uint32 tileByteCount,
+                                    AutoPtr<dng_memory_block> &compressedBuffer,
+                                    AutoPtr<dng_memory_block> &uncompressedBuffer,
+-                                   AutoPtr<dng_memory_block> &subTileBlockBuffer)
++                                   AutoPtr<dng_memory_block> &subTileBlockBuffer,
++								   bool usingMultipleThreads)
+ {
+     
+     if( ifd.fCompression == ccVc5 )
+@@ -122,7 +127,8 @@
+                                   tileByteCount,
+                                   compressedBuffer,
+                                   uncompressedBuffer,
+-                                  subTileBlockBuffer);
++                                  subTileBlockBuffer,
++								  usingMultipleThreads);
+     }
+ }
+ 

+ 12 - 0
raw.mod/libraw/GoPro/gpr_read_image.h.diff

@@ -0,0 +1,12 @@
+--- gpr_read_image.h.orig	2019-08-30 12:20:00.326653300 +0300
++++ gpr_read_image.h	2019-08-30 20:56:11.138246800 +0300
+@@ -56,7 +56,8 @@
+                    uint32 tileByteCount,
+                    AutoPtr<dng_memory_block> &compressedBuffer,
+                    AutoPtr<dng_memory_block> &uncompressedBuffer,
+-                   AutoPtr<dng_memory_block> &subTileBlockBuffer);
++                   AutoPtr<dng_memory_block> &subTileBlockBuffer,
++				   bool usingMultipleThreads  );
+ };
+ 
+ #endif // GPR_READING

+ 51 - 0
raw.mod/libraw/INSTALL

@@ -0,0 +1,51 @@
+
+=========  Installing LibRaw ========
+
+I. Installation steps
+
+1. Unpack the distribution file:
+
+ $  tar xzvf LibRaw-0.xx.yy.tar.gz
+
+2. Go to LibRaw folder and run ./configure and make:
+
+ $ cd LibRaw-0.xx.yy
+ $ ./configure  [...optional args...]
+ $ make
+
+3. install by run make install as root:
+ 
+ $ sudo make install
+
+If you're using Github snapshot, create ./configure script:
+    autoreconf --install
+before using it (you'll need autotools installed).
+
+Alternatively, you may use pre-created Makefiles (Makefile.dist for Unix,
+Makefile.msvc for Windows/VisualStudio) and add/remove options by editing
+these Makefiles
+
+
+II. ./configure options
+
+--enable-openmp
+--disable-openmp
+
+  Enable/disable OpenMP support if compiler supports it.
+  OpenMP is enabled by default.
+
+
+--enable-lcms
+--disable-lcms
+
+  Enable/disable LCMS color engine support. If enabled, ./configure will try to 
+  find lcms library.  Both LCMS-1.x and LCMS-2.x are supported
+  LCMS support is enabled by default
+
+
+--enable-examples
+--disable-examples
+
+  Enables/disables examples compilation and installation. Enabled by default
+
+

+ 340 - 0
raw.mod/libraw/LICENSE.CDDL

@@ -0,0 +1,340 @@
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+1. Definitions.
+
+1.1. Contributor means each individual or entity that creates or
+contributes to the creation of Modifications.
+
+1.2. Contributor Version means the combination of the Original
+Software, prior Modifications used by a Contributor (if any),
+and the Modifications made by that particular Contributor.
+
+1.3. Covered Software means (a) the Original Software, or (b)
+Modifications, or (c) the combination of files containing
+Original Software with files containing Modifications, in each
+case including portions thereof.
+
+1.4. Executable means the Covered Software in any form other
+than Source Code.
+
+1.5. Initial Developer means the individual or entity that first
+makes Original Software available under this License.
+
+1.6. Larger Workmeans a work which combines Covered Software or
+portions thereof with code not governed by the terms of this
+License.
+
+1.7. License means this document.
+
+1.8. Licensable means having the right to grant, to the maximum
+extent possible, whether at the time of the initial grant or 
+subsequently acquired, any and all of the rights conveyed herein.
+
+1.9. Modifications means the Source Code and Executable form of
+any of the following: A. Any file that results from an addition
+to, deletion from or modification of the contents of a file
+containing Original Software or previous Modifications; B. Any
+new file that contains any part of the Original Software or
+previous Modification; or C. Any new file that is contributed or
+otherwise made available under the terms of this License.
+
+1.10. Original Software means the Source Code and Executable
+form of computer software code that is originally released under
+this License.
+
+1.11. Patent Claims means any patent claim(s), now owned or
+hereafter acquired, including without limitation, method,
+process, and apparatus claims, in any patent Licensable by
+grantor.
+
+1.12. Source Code means (a) the common form of computer software
+code in which modifications are made and (b) associated
+documentation included in or with such code.
+
+1.13. You (or Your) means an individual or a legal entity
+exercising rights under, and complying with all of the terms of,
+this License. For legal entities, You includes any entity which
+controls, is controlled by, or is under common control with You.
+For purposes of this definition, control means (a) the power,
+direct or indirect, to cause the direction or management of such
+entity, whether by contract or otherwise, or (b) ownership of
+more than fifty percent (50%) of the outstanding shares or
+beneficial ownership of such entity.
+
+2. License Grants.
+
+2.1. The Initial Developer Grant. Conditioned upon Your
+compliance with Section 3.1 below and subject to third party
+intellectual property claims, the Initial Developer hereby
+grants You a world-wide, royalty-free, non-exclusive license:
+
+(a) under intellectual property rights (other than patent or
+trademark) Licensable by Initial Developer, to use, reproduce,
+modify, display, perform, sublicense and distribute the Original
+Software (or portions thereof), with or without Modifications,
+and/or as part of a Larger Work; and
+
+(b) under Patent Claims infringed by the making, using or
+selling of Original Software, to make, have made, use, practice,
+sell, and offer for sale, and/or otherwise dispose of the
+Original Software (or portions thereof);
+
+(c) The licenses granted in Sections 2.1(a) and (b) are
+effective on the date Initial Developer first distributes or
+otherwise makes the Original Software available to a third party
+under the terms of this License;
+
+(d) Notwithstanding Section 2.1(b) above, no patent license is
+granted: (1) for code that You delete from the Original
+Software, or (2) for infringements caused by: (i) the
+modification of the Original Software, or (ii) the combination
+of the Original Software with other software or devices.
+
+2.2. Contributor Grant. Conditioned upon Your compliance with
+Section 3.1 below and subject to third party intellectual
+property claims, each Contributor hereby grants You a
+world-wide, royalty-free, non-exclusive license:
+
+(a) under intellectual property rights (other than patent or
+trademark) Licensable by Contributor to use, reproduce, modify,
+display, perform, sublicense and distribute the Modifications
+created by such Contributor (or portions thereof), either on an
+unmodified basis, with other Modifications, as Covered Software
+and/or as part of a Larger Work; and
+
+(b) under Patent Claims infringed by the making, using, or
+selling of Modifications made by that Contributor either alone
+and/or in combination with its Contributor Version (or portions
+of such combination), to make, use, sell, offer for sale, have
+made, and/or otherwise dispose of: (1) Modifications made by
+that Contributor (or portions thereof); and (2) the combination
+of Modifications made by that Contributor with its Contributor
+Version (or portions of such combination).
+
+(c) The licenses granted in Sections 2.2(a) and 2.2(b)
+areeffective on the date Contributor first distributes or
+otherwise makes the Modifications available to a third party.
+
+(d) Notwithstanding Section 2.2(b) above, no patent license is
+granted: (1) for any code that Contributor has deleted from the
+Contributor Version; (2) for infringements caused by: (i) third
+party modifications of Contributor Version, or (ii) the
+combination of Modifications made by that Contributor with other
+software (except as part of the Contributor Version) or other
+devices; or (3) under Patent Claims infringed by Covered
+Software in the absence of Modifications made by that
+Contributor.
+
+3. Distribution Obligations.
+
+3.1. Availability of Source Code. Any Covered Software that You
+distribute or otherwise make available in Executable form must
+also be made available in Source Code form and that Source Code
+form must be distributed only under the terms of this License.
+You must include a copy of this License with every copy of the
+Source Code form of the Covered Software You distribute or
+otherwise make available. You must inform recipients of any such
+Covered Software in Executable form as to how they can obtain
+such Covered Software in Source Code form in a reasonable manner
+on or through a medium customarily used for software exchange.
+
+3.2. Modifications. The Modifications that You create or to
+which You contribute are governed by the terms of this License.
+You represent that You believe Your Modifications are Your
+original creation(s) and/or You have sufficient rights to grant
+the rights conveyed by this License.
+
+3.3. Required Notices. You must include a notice in each of Your
+Modifications that identifies You as the Contributor of the
+Modification. You may not remove or alter any copyright, patent
+or trademark notices contained within the Covered Software, or
+any notices of licensing or any descriptive text giving
+attribution to any Contributor or the Initial Developer.
+
+3.4. Application of Additional Terms. You may not offer or
+impose any terms on any Covered Software in Source Code form
+that alters or restricts the applicable version of this License
+or the recipients rights hereunder. You may choose to offer, and
+to charge a fee for, warranty, support, indemnity or liability
+obligations to one or more recipients of Covered
+Software. However, you may do so only on Your own behalf, and
+not on behalf of the Initial Developer or any Contributor. You
+must make it absolutely clear that any such warranty, support,
+indemnity or liability obligation is offered by You alone, and
+You hereby agree to indemnify the Initial Developer and every
+Contributor for any liability incurred by the Initial Developer
+or such Contributor as a result of warranty, support, indemnity
+or liability terms You offer.
+
+3.5. Distribution of Executable Versions. You may distribute the
+Executable form of the Covered Software under the terms of this
+License or under the terms of a license of Your choice, which
+may contain terms different from this License, provided that You
+are in compliance with the terms of this License and that the
+license for the Executable form does not attempt to limit or
+alter the recipients rights in the Source Code form from the
+rights set forth in this License. If You distribute the Covered
+Software in Executable form under a different license, You must
+make it absolutely clear that any terms which differ from this
+License are offered by You alone, not by the Initial Developer
+or Contributor. You hereby agree to indemnify the Initial
+Developer and every Contributor for any liability incurred by
+the Initial Developer or such Contributor as a result of any
+such terms You offer.
+
+3.6. Larger Works. You may create a Larger Work by combining
+Covered Software with other code not governed by the terms of
+this License and distribute the Larger Work as a single product.
+In such a case, You must make sure the requirements of this
+License are fulfilled for the Covered Software.
+
+4. Versions of the License.
+
+4.1. New Versions. Sun Microsystems, Inc. is the initial license
+steward and may publish revised and/or new versions of this
+License from time to time. Each version will be given a
+distinguishing version number. Except as provided in Section
+4.3, no one other than the license steward has the right to
+modify this License.
+
+4.2. Effect of New Versions. You may always continue to use,
+distribute or otherwise make the Covered Software available
+under the terms of the version of the License under which You
+originally received the Covered Software. If the Initial
+Developer includes a notice in the Original Software prohibiting
+it from being distributed or otherwise made available under any
+subsequent version of the License, You must distribute and make
+the Covered Software available under the terms of the version of
+the License under which You originally received the Covered
+Software.  Otherwise, You may also choose to use, distribute or
+otherwise make the Covered Software available under the terms of
+any subsequent version of the License published by the license
+steward.
+
+4.3. Modified Versions. When You are an Initial Developer and
+You want to create a new license for Your Original Software, You
+may create and use a modified version of this License if You:
+(a) rename the license and remove any references to the name of
+the license steward (except to note that the license differs
+from this License); and (b) otherwise make it clear that the
+license contains terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY. COVERED SOFTWARE IS PROVIDED UNDER
+THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION,
+WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS,
+MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
+THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED
+SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE
+DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY
+OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING,
+REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN
+ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE
+IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+6. TERMINATION.
+
+6.1. This License and the rights granted hereunder will
+terminate automatically if You fail to comply with terms herein
+and fail to cure such breach within 30 days of becoming aware of
+the breach. Provisions which, by their nature, must remain in
+effect beyond the termination of this License shall survive.
+
+6.2. If You assert a patent infringement claim (excluding
+declaratory judgment actions) against Initial Developer or a
+Contributor (the Initial Developer or Contributor against whom
+You assert such claim is referred to as Participant) alleging
+that the Participant Software (meaning the Contributor Version
+where the Participant is a Contributor or the Original Software
+where the Participant is the Initial Developer) directly or
+indirectly infringes any patent, then any and all rights granted
+directly or indirectly to You by such Participant, the Initial
+Developer (if the Initial Developer is not the Participant) and
+all Contributors under Sections 2.1 and/or 2.2 of this License
+shall, upon 60 days notice from Participant terminate
+prospectively and automatically at the expiration of such 60 day
+notice period, unless if within such 60 day period You withdraw
+Your claim with respect to the Participant Software against such
+Participant either unilaterally or pursuant to a written
+agreement with Participant.
+
+6.3. In the event of termination under Sections 6.1 or 6.2
+above, all end user licenses that have been validly granted by
+You or any distributor hereunder prior to termination (excluding
+licenses granted to You by any distributor) shall survive
+termination.
+
+7. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO
+LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR
+OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER
+CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY
+SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY
+INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
+CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST
+PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR
+MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES,
+EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
+OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO
+LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH
+PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH
+LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR
+LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS
+EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS. The Covered Software is a
+commercial item, as that term is defined in 48 C.F.R. 2.101
+(Oct. 1995), consisting of commercial computer software (as that
+term is defined at 48 C.F.R. 252.227-7014(a)(1)) and commercial
+computer software documentation as such terms are used in 48
+C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and
+48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all
+U.S. Government End Users acquire Covered Software with only
+those rights set forth herein. This U.S. Government Rights
+clause is in lieu of, and supersedes, any other FAR, DFAR, or
+other clause or provision that addresses Government rights in
+computer software under this License.
+
+9. MISCELLANEOUS. This License represents the complete agreement
+concerning subject matter hereof. If any provision of this
+License is held to be unenforceable, such provision shall be
+reformed only to the extent necessary to make it enforceable.
+This License shall be governed by the law of the jurisdiction
+specified in a notice contained within the Original Software
+(except to the extent applicable law, if any, provides
+otherwise), excluding such jurisdictions conflict-of-law
+provisions. Any litigation relating to this License shall be
+subject to the jurisdiction of the courts located in the
+jurisdiction and venue specified in a notice contained within
+the Original Software, with the losing party responsible for
+costs, including, without limitation, court costs and reasonable
+attorneys fees and expenses. The application of the United
+Nations Convention on Contracts for the International Sale of
+Goods is expressly excluded. Any law or regulation which
+provides that the language of a contract shall be construed
+against the drafter shall not apply to this License. You agree
+that You alone are responsible for compliance with the United
+States export administration regulations (and the export control
+laws and regulation of any other countries) when You use,
+distribute or otherwise make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and
+the Contributors, each party is responsible for claims and
+damages arising, directly or indirectly, out of its utilization
+of rights under this License and You agree to work with Initial
+Developer and Contributors to distribute such responsibility on
+an equitable basis. Nothing herein is intended or shall be
+deemed to constitute any admission of liability.
+
+----------------------------------------------------------------
+
+NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND
+DISTRIBUTION LICENSE (CDDL): This code is released under the
+CDDL and shall be governed by the laws of the State of
+California (excluding conflict-of-law provisions). Any
+litigation relating to this License shall be subject to the
+jurisdiction of the Federal Courts of the Northern District of
+California and the state courts of the State of California, with
+venue lying in Santa Clara County, California.
+
+----------------------------------------------------------------
+

+ 458 - 0
raw.mod/libraw/LICENSE.LGPL

@@ -0,0 +1,458 @@
+		  GNU LESSER GENERAL PUBLIC LICENSE
+		       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS

+ 19 - 0
raw.mod/libraw/LibRaw.pro

@@ -0,0 +1,19 @@
+TEMPLATE=subdirs
+CONFIG+=ordered
+SUBDIRS= \
+	buildfiles/dcraw_emu.pro \
+	buildfiles/libraw.pro \
+	buildfiles/postprocessing_benchmark.pro \
+	buildfiles/dcraw_half.pro \
+#	buildfiles/half_mt.pro \   
+	buildfiles/mem_image.pro \
+	buildfiles/raw-identify.pro \
+	buildfiles/simple_dcraw.pro \
+	buildfiles/multirender_test.pro \
+	buildfiles/unprocessed_raw.pro \
+	buildfiles/4channels.pro  \
+	buildfiles/rawtextdump.pro  \
+	buildfiles/openbayer_sample.pro  
+
+CONFIG-=qt
+

+ 123 - 0
raw.mod/libraw/LibRaw.sln

@@ -0,0 +1,123 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30011.22
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dcraw_emu", "buildfiles\dcraw_emu.vcxproj", "{48688DB8-559A-3DE2-ADDE-5BD27BFEDDA2}"
+	ProjectSection(ProjectDependencies) = postProject
+		{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libraw", "buildfiles\libraw.vcxproj", "{A71D2131-F425-381F-8A9A-29D60132A046}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "postprocessing_benchmark", "buildfiles\postprocessing_benchmark.vcxproj", "{5C66A8FA-D211-3E2F-A2F1-0C3C665689CC}"
+	ProjectSection(ProjectDependencies) = postProject
+		{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dcraw_half", "buildfiles\dcraw_half.vcxproj", "{C6EACFA3-9FC5-393B-BCF6-2874B05E4581}"
+	ProjectSection(ProjectDependencies) = postProject
+		{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mem_image", "buildfiles\mem_image.vcxproj", "{BF8A2750-B847-3BA6-9EAF-05F43380F46C}"
+	ProjectSection(ProjectDependencies) = postProject
+		{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "raw-identify", "buildfiles\raw-identify.vcxproj", "{7C4F61DB-717E-36C9-B20E-36F8E218AB51}"
+	ProjectSection(ProjectDependencies) = postProject
+		{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple_dcraw", "buildfiles\simple_dcraw.vcxproj", "{AD1E31D8-A022-3672-982F-C8280A0D6458}"
+	ProjectSection(ProjectDependencies) = postProject
+		{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "multirender_test", "buildfiles\multirender_test.vcxproj", "{30D21208-219A-3AA8-ADCF-E6B1FFAF6A73}"
+	ProjectSection(ProjectDependencies) = postProject
+		{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unprocessed_raw", "buildfiles\unprocessed_raw.vcxproj", "{1333E21E-D3B5-3640-9A4D-D8955082B855}"
+	ProjectSection(ProjectDependencies) = postProject
+		{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "4channels", "buildfiles\4channels.vcxproj", "{F68CBE78-B27A-3A05-BCD3-293E8CAC1C52}"
+	ProjectSection(ProjectDependencies) = postProject
+		{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rawtextdump", "buildfiles\rawtextdump.vcxproj", "{53A1E3F0-8032-348E-B3BF-3E540A45005F}"
+	ProjectSection(ProjectDependencies) = postProject
+		{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openbayer_sample", "buildfiles\openbayer_sample.vcxproj", "{EF67FEF1-4B19-3765-A660-9F8E9333DEF3}"
+	ProjectSection(ProjectDependencies) = postProject
+		{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|x64 = Debug|x64
+		Release|x64 = Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{48688DB8-559A-3DE2-ADDE-5BD27BFEDDA2}.Debug|x64.ActiveCfg = Debug|x64
+		{48688DB8-559A-3DE2-ADDE-5BD27BFEDDA2}.Debug|x64.Build.0 = Debug|x64
+		{48688DB8-559A-3DE2-ADDE-5BD27BFEDDA2}.Release|x64.ActiveCfg = Release|x64
+		{48688DB8-559A-3DE2-ADDE-5BD27BFEDDA2}.Release|x64.Build.0 = Release|x64
+		{A71D2131-F425-381F-8A9A-29D60132A046}.Debug|x64.ActiveCfg = Debug|x64
+		{A71D2131-F425-381F-8A9A-29D60132A046}.Debug|x64.Build.0 = Debug|x64
+		{A71D2131-F425-381F-8A9A-29D60132A046}.Release|x64.ActiveCfg = Release|x64
+		{A71D2131-F425-381F-8A9A-29D60132A046}.Release|x64.Build.0 = Release|x64
+		{5C66A8FA-D211-3E2F-A2F1-0C3C665689CC}.Debug|x64.ActiveCfg = Debug|x64
+		{5C66A8FA-D211-3E2F-A2F1-0C3C665689CC}.Debug|x64.Build.0 = Debug|x64
+		{5C66A8FA-D211-3E2F-A2F1-0C3C665689CC}.Release|x64.ActiveCfg = Release|x64
+		{5C66A8FA-D211-3E2F-A2F1-0C3C665689CC}.Release|x64.Build.0 = Release|x64
+		{C6EACFA3-9FC5-393B-BCF6-2874B05E4581}.Debug|x64.ActiveCfg = Debug|x64
+		{C6EACFA3-9FC5-393B-BCF6-2874B05E4581}.Debug|x64.Build.0 = Debug|x64
+		{C6EACFA3-9FC5-393B-BCF6-2874B05E4581}.Release|x64.ActiveCfg = Release|x64
+		{C6EACFA3-9FC5-393B-BCF6-2874B05E4581}.Release|x64.Build.0 = Release|x64
+		{BF8A2750-B847-3BA6-9EAF-05F43380F46C}.Debug|x64.ActiveCfg = Debug|x64
+		{BF8A2750-B847-3BA6-9EAF-05F43380F46C}.Debug|x64.Build.0 = Debug|x64
+		{BF8A2750-B847-3BA6-9EAF-05F43380F46C}.Release|x64.ActiveCfg = Release|x64
+		{BF8A2750-B847-3BA6-9EAF-05F43380F46C}.Release|x64.Build.0 = Release|x64
+		{7C4F61DB-717E-36C9-B20E-36F8E218AB51}.Debug|x64.ActiveCfg = Debug|x64
+		{7C4F61DB-717E-36C9-B20E-36F8E218AB51}.Debug|x64.Build.0 = Debug|x64
+		{7C4F61DB-717E-36C9-B20E-36F8E218AB51}.Release|x64.ActiveCfg = Release|x64
+		{7C4F61DB-717E-36C9-B20E-36F8E218AB51}.Release|x64.Build.0 = Release|x64
+		{AD1E31D8-A022-3672-982F-C8280A0D6458}.Debug|x64.ActiveCfg = Debug|x64
+		{AD1E31D8-A022-3672-982F-C8280A0D6458}.Debug|x64.Build.0 = Debug|x64
+		{AD1E31D8-A022-3672-982F-C8280A0D6458}.Release|x64.ActiveCfg = Release|x64
+		{AD1E31D8-A022-3672-982F-C8280A0D6458}.Release|x64.Build.0 = Release|x64
+		{30D21208-219A-3AA8-ADCF-E6B1FFAF6A73}.Debug|x64.ActiveCfg = Debug|x64
+		{30D21208-219A-3AA8-ADCF-E6B1FFAF6A73}.Debug|x64.Build.0 = Debug|x64
+		{30D21208-219A-3AA8-ADCF-E6B1FFAF6A73}.Release|x64.ActiveCfg = Release|x64
+		{30D21208-219A-3AA8-ADCF-E6B1FFAF6A73}.Release|x64.Build.0 = Release|x64
+		{1333E21E-D3B5-3640-9A4D-D8955082B855}.Debug|x64.ActiveCfg = Debug|x64
+		{1333E21E-D3B5-3640-9A4D-D8955082B855}.Debug|x64.Build.0 = Debug|x64
+		{1333E21E-D3B5-3640-9A4D-D8955082B855}.Release|x64.ActiveCfg = Release|x64
+		{1333E21E-D3B5-3640-9A4D-D8955082B855}.Release|x64.Build.0 = Release|x64
+		{F68CBE78-B27A-3A05-BCD3-293E8CAC1C52}.Debug|x64.ActiveCfg = Debug|x64
+		{F68CBE78-B27A-3A05-BCD3-293E8CAC1C52}.Debug|x64.Build.0 = Debug|x64
+		{F68CBE78-B27A-3A05-BCD3-293E8CAC1C52}.Release|x64.ActiveCfg = Release|x64
+		{F68CBE78-B27A-3A05-BCD3-293E8CAC1C52}.Release|x64.Build.0 = Release|x64
+		{53A1E3F0-8032-348E-B3BF-3E540A45005F}.Debug|x64.ActiveCfg = Debug|x64
+		{53A1E3F0-8032-348E-B3BF-3E540A45005F}.Debug|x64.Build.0 = Debug|x64
+		{53A1E3F0-8032-348E-B3BF-3E540A45005F}.Release|x64.ActiveCfg = Release|x64
+		{53A1E3F0-8032-348E-B3BF-3E540A45005F}.Release|x64.Build.0 = Release|x64
+		{EF67FEF1-4B19-3765-A660-9F8E9333DEF3}.Debug|x64.ActiveCfg = Debug|x64
+		{EF67FEF1-4B19-3765-A660-9F8E9333DEF3}.Debug|x64.Build.0 = Debug|x64
+		{EF67FEF1-4B19-3765-A660-9F8E9333DEF3}.Release|x64.ActiveCfg = Release|x64
+		{EF67FEF1-4B19-3765-A660-9F8E9333DEF3}.Release|x64.Build.0 = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {FB319846-66B9-4F61-8285-5EA4D2F09634}
+	EndGlobalSection
+EndGlobal

+ 140 - 0
raw.mod/libraw/Makefile.am

@@ -0,0 +1,140 @@
+# autoconf macros
+ACLOCAL_AMFLAGS = -I m4
+AUTOMAKE_OPTIONS=subdir-objects
+
+LIBRAW_SHLIB_VER = @LIBRAW_SHLIB_VERSION@
+LIBRAW_RELEASE_VER = @LIBRAW_RELEASE_VERSION@
+
+# Headers
+nobase_include_HEADERS = 	libraw/libraw.h \
+				libraw/libraw_alloc.h \
+				libraw/libraw_const.h \
+				libraw/libraw_datastream.h \
+				libraw/libraw_internal.h \
+				libraw/libraw_types.h \
+				libraw/libraw_version.h
+
+# Docs
+doc_DATA =	COPYRIGHT \
+			LICENSE.CDDL \
+			LICENSE.LGPL \
+			Changelog.txt
+
+# pkg-config .pc files
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libraw.pc libraw_r.pc
+
+# Libraries
+lib_LTLIBRARIES = lib/libraw.la lib/libraw_r.la
+
+lib_libraw_a_CPPFLAGS = -DLIBRAW_NOTHREADS -w
+lib_libraw_a_SOURCES = src/libraw_c_api.cpp \
+	src/libraw_datastream.cpp src/decoders/canon_600.cpp \
+	src/decoders/crx.cpp src/decoders/decoders_dcraw.cpp \
+	src/decoders/decoders_libraw_dcrdefs.cpp \
+	src/decoders/decoders_libraw.cpp src/decoders/dng.cpp \
+	src/decoders/fp_dng.cpp src/decoders/fuji_compressed.cpp \
+	src/decoders/generic.cpp src/decoders/kodak_decoders.cpp \
+	src/decoders/load_mfbacks.cpp src/decoders/smal.cpp \
+	src/decoders/unpack_thumb.cpp src/decoders/unpack.cpp \
+	src/demosaic/aahd_demosaic.cpp src/demosaic/ahd_demosaic.cpp \
+	src/demosaic/dcb_demosaic.cpp src/demosaic/dht_demosaic.cpp \
+	src/demosaic/misc_demosaic.cpp src/demosaic/xtrans_demosaic.cpp \
+	src/integration/dngsdk_glue.cpp src/integration/rawspeed_glue.cpp\
+	src/metadata/adobepano.cpp src/metadata/canon.cpp \
+	src/metadata/ciff.cpp src/metadata/cr3_parser.cpp \
+	src/metadata/epson.cpp src/metadata/exif_gps.cpp \
+	src/metadata/fuji.cpp src/metadata/identify_tools.cpp \
+	src/metadata/identify.cpp src/metadata/kodak.cpp \
+	src/metadata/leica.cpp src/metadata/makernotes.cpp \
+	src/metadata/mediumformat.cpp src/metadata/minolta.cpp \
+	src/metadata/misc_parsers.cpp src/metadata/nikon.cpp \
+	src/metadata/normalize_model.cpp src/metadata/olympus.cpp \
+	src/metadata/hasselblad_model.cpp \
+	src/metadata/p1.cpp src/metadata/pentax.cpp src/metadata/samsung.cpp \
+	src/metadata/sony.cpp src/metadata/tiff.cpp \
+	src/postprocessing/aspect_ratio.cpp \
+	src/postprocessing/dcraw_process.cpp src/postprocessing/mem_image.cpp \
+	src/postprocessing/postprocessing_aux.cpp \
+	src/postprocessing/postprocessing_utils_dcrdefs.cpp \
+	src/postprocessing/postprocessing_utils.cpp \
+	src/preprocessing/ext_preprocess.cpp src/preprocessing/raw2image.cpp \
+	src/preprocessing/subtract_black.cpp src/tables/cameralist.cpp \
+	src/tables/colorconst.cpp src/tables/colordata.cpp \
+	src/tables/wblists.cpp src/utils/curves.cpp \
+	src/utils/decoder_info.cpp src/utils/init_close_utils.cpp \
+	src/utils/open.cpp src/utils/phaseone_processing.cpp \
+	src/utils/read_utils.cpp src/utils/thumb_utils.cpp \
+	src/utils/utils_dcraw.cpp src/utils/utils_libraw.cpp \
+	src/write/apply_profile.cpp src/write/file_write.cpp \
+	src/write/tiff_writer.cpp src/x3f/x3f_parse_process.cpp \
+	src/x3f/x3f_utils_patched.cpp 
+
+
+lib_libraw_r_a_CXXFLAGS = -pthread -w
+lib_libraw_r_a_CFLAGS = -pthread -w
+lib_libraw_la_SOURCES = $(lib_libraw_a_SOURCES)
+lib_libraw_r_la_SOURCES = $(lib_libraw_a_SOURCES)
+
+lib_libraw_la_LDFLAGS = -no-undefined -version-info $(LIBRAW_SHLIB_VER)
+lib_libraw_r_la_LDFLAGS = -no-undefined -version-info $(LIBRAW_SHLIB_VER)
+
+
+# Sample binaries
+if EXAMPLES
+bin_PROGRAMS =	bin/raw-identify \
+		bin/unprocessed_raw \
+		bin/4channels \
+		bin/rawtextdump \
+		bin/simple_dcraw \
+		bin/mem_image \
+		bin/dcraw_half \
+		bin/half_mt \
+		bin/multirender_test \
+		bin/postprocessing_benchmark \
+		bin/dcraw_emu
+endif
+
+bin_raw_identify_SOURCES = samples/raw-identify.cpp
+bin_raw_identify_CPPFLAGS = $(lib_libraw_a_CPPFLAGS)
+bin_raw_identify_LDADD = lib/libraw.la
+
+bin_unprocessed_raw_SOURCES = samples/unprocessed_raw.cpp
+bin_unprocessed_raw_CPPFLAGS = $(lib_libraw_a_CPPFLAGS)
+bin_unprocessed_raw_LDADD = lib/libraw.la
+
+bin_rawtextdump_SOURCES = samples/rawtextdump.cpp
+bin_rawtextdump_CPPFLAGS = $(lib_libraw_a_CPPFLAGS)
+bin_rawtextdump_LDADD = lib/libraw.la
+
+bin_4channels_SOURCES = samples/4channels.cpp
+bin_4channels_CPPFLAGS = $(lib_libraw_a_CPPFLAGS)
+bin_4channels_LDADD = lib/libraw.la
+
+bin_simple_dcraw_SOURCES = samples/simple_dcraw.cpp
+bin_simple_dcraw_CPPFLAGS = $(lib_libraw_a_CPPFLAGS)
+bin_simple_dcraw_LDADD = lib/libraw.la
+
+bin_multirender_test_SOURCES = samples/multirender_test.cpp
+bin_multirender_test_CPPFLAGS = $(lib_libraw_a_CPPFLAGS)
+bin_multirender_test_LDADD = lib/libraw.la
+
+bin_postprocessing_benchmark_SOURCES = samples/postprocessing_benchmark.cpp
+bin_postprocessing_benchmark_CPPFLAGS = $(lib_libraw_a_CPPFLAGS)
+bin_postprocessing_benchmark_LDADD = lib/libraw.la
+
+bin_mem_image_SOURCES = samples/mem_image_sample.cpp
+bin_mem_image_CPPFLAGS = $(lib_libraw_a_CPPFLAGS)
+bin_mem_image_LDADD = lib/libraw.la
+
+bin_dcraw_half_SOURCES = samples/dcraw_half.c
+bin_dcraw_half_CPPFLAGS = $(lib_libraw_a_CPPFLAGS)
+bin_dcraw_half_LDADD = lib/libraw.la
+
+bin_half_mt_SOURCES = samples/half_mt.c
+bin_half_mt_CFLAGS = $(lib_libraw_r_a_CXXFLAGS)
+bin_half_mt_LDADD = lib/libraw_r.la
+
+bin_dcraw_emu_SOURCES = samples/dcraw_emu.cpp
+bin_dcraw_emu_CPPFLAGS = $(lib_libraw_a_CPPFLAGS)
+bin_dcraw_emu_LDADD = lib/libraw.la

+ 491 - 0
raw.mod/libraw/Makefile.devel

@@ -0,0 +1,491 @@
+all: library all_samples
+
+CC=clang
+CXX=clang++
+
+#CC=gcc
+#CXX=g++
+
+LDADD+=-lz
+
+CFLAGS=-DLIBRAW_USE_AUTOPTR
+CFLAGS+= -g -I. -pedantic -Wno-long-long -Wno-overflow -O3
+
+# macOS dual arch
+# CFLAGS+=-arch x86_64 -arch arm64
+
+# RawSpeed Support
+# CFLAGS+=-DUSE_RAWSPEED -I../RawSpeed -I/opt/local/include/libxml2
+# LDADD+=-L../RawSpeed/RawSpeed/release -lrawspeed -L/opt/local/include -ljpeg -lxml2
+# RAWSPEED_DATA=../RawSpeed/data/cameras.xml
+
+# DNG SDK Support
+# CFLAGS+=-DUSE_DNGSDK -I../dng_sdk/source
+# LDADDD+=-L../dng_sdk/release -ldng -ljpeg -lz
+
+# LCMS support
+# For lcms2 set -DUSE_LCMS2
+#CFLAGS+=-DUSE_LCMS2 -I/opt/local/include
+#LDADD+=-L/opt/local/lib -llcms
+
+# Jasper support for RedCine
+#CFLAGS+=-DUSE_JASPER -I/opt/local/include
+#LDADD+=-L/opt/local/lib -ljasper
+
+# ZLIB support (FP dng)
+CFLAGS+=-DUSE_ZLIB
+LDADD+=-lz
+
+# JPEG support for DNG and Kodak
+CFLAGS+=-DUSE_JPEG -I/usr/local/include
+LDADD+=-L/usr/local/lib -ljpeg
+
+# LIBJPEG8:
+CFLAGS+=-DUSE_JPEG8
+
+CSTFLAGS=$(CFLAGS) -DLIBRAW_NOTHREADS
+HEADERS=libraw/libraw.h libraw/libraw_alloc.h libraw/libraw_const.h \
+  libraw/libraw_datastream.h libraw/libraw_internal.h  \
+  libraw/libraw_types.h libraw/libraw_version.h \
+  internal/dcraw_defs.h internal/dcraw_fileio_defs.h internal/defines.h \
+  internal/dmp_include.h internal/libraw_cameraids.h internal/libraw_cxx_defs.h \
+  internal/libraw_internal_funcs.h internal/var_defines.h internal/x3f_tools.h
+
+LIB_OBJECTS= object/libraw_datastream.o object/libraw_c_api.o \
+  object/cameralist.o object/fuji_compressed.o \
+  object/crx.o object/fp_dng.o object/decoders_libraw.o \
+  object/unpack.o object/unpack_thumb.o \
+  object/rawspeed_glue.o object/dngsdk_glue.o \
+  object/colorconst.o object/utils_libraw.o object/init_close_utils.o \
+  object/decoder_info.o object/open.o object/phaseone_processing.o \
+  object/thumb_utils.o \
+  object/tiff_writer.o object/subtract_black.o object/postprocessing_utils.o \
+  object/dcraw_process.o object/raw2image.o object/mem_image.o \
+  object/x3f_utils_patched.o object/x3f_parse_process.o \
+  object/read_utils.o object/curves.o object/utils_dcraw.o \
+  object/colordata.o \
+  object/canon_600.o  object/decoders_dcraw.o \
+  object/decoders_libraw_dcrdefs.o  object/generic.o \
+  object/kodak_decoders.o object/dng.o object/smal.o \
+  object/load_mfbacks.o \
+  object/sony.o object/nikon.o object/samsung.o object/cr3_parser.o \
+  object/canon.o  object/epson.o object/olympus.o object/leica.o \
+  object/fuji.o object/adobepano.o object/pentax.o object/p1.o \
+  object/makernotes.o object/exif_gps.o object/kodak.o \
+  object/tiff.o object/ciff.o object/mediumformat.o object/minolta.o \
+  object/identify_tools.o \
+  object/hasselblad_model.o object/normalize_model.o object/identify.o \
+  object/misc_parsers.o object/wblists.o \
+  object/postprocessing_aux.o object/postprocessing_utils_dcrdefs.o \
+  object/aspect_ratio.o \
+  object/misc_demosaic.o object/xtrans_demosaic.o object/ahd_demosaic.o \
+  object/dht_demosaic.o  object/aahd_demosaic.o  object/dcb_demosaic.o \
+  object/file_write.o \
+  object/ext_preprocess.o   object/apply_profile.o
+
+
+LIB_MT_OBJECTS= object/libraw_datastream.mt.o object/libraw_c_api.mt.o \
+  object/cameralist.mt.o object/fuji_compressed.mt.o \
+  object/crx.mt.o object/fp_dng.mt.o object/decoders_libraw.mt.o \
+  object/unpack.mt.o object/unpack_thumb.mt.o \
+  object/rawspeed_glue.mt.o object/dngsdk_glue.mt.o \
+  object/colorconst.mt.o object/utils_libraw.mt.o \
+  object/init_close_utils.mt.o \
+  object/decoder_info.mt.o object/open.mt.o object/phaseone_processing.mt.o \
+  object/thumb_utils.mt.o \
+  object/tiff_writer.mt.o object/subtract_black.mt.o \
+  object/postprocessing_utils.mt.o object/dcraw_process.mt.o \
+  object/raw2image.mt.o object/mem_image.mt.o \
+  object/x3f_utils_patched.mt.o object/x3f_parse_process.mt.o \
+  object/read_utils.mt.o object/curves.mt.o object/utils_dcraw.mt.o \
+  object/colordata.mt.o \
+  object/canon_600.mt.o  object/decoders_dcraw.mt.o \
+  object/decoders_libraw_dcrdefs.mt.o  object/generic.mt.o \
+  object/kodak_decoders.mt.o object/dng.mt.o object/smal.mt.o \
+  object/load_mfbacks.mt.o \
+  object/sony.mt.o object/nikon.mt.o object/samsung.mt.o \
+  object/cr3_parser.mt.o object/canon.mt.o  object/epson.mt.o \
+  object/olympus.mt.o object/leica.mt.o \
+  object/fuji.mt.o object/adobepano.mt.o object/pentax.mt.o object/p1.mt.o \
+  object/makernotes.mt.o object/exif_gps.mt.o object/kodak.mt.o \
+  object/tiff.mt.o object/ciff.mt.o object/mediumformat.mt.o \
+  object/minolta.mt.o \
+  object/identify_tools.mt.o \
+  object/hasselblad_model.mt.o object/normalize_model.mt.o object/identify.mt.o \
+  object/misc_parsers.mt.o object/wblists.mt.o \
+  object/postprocessing_aux.mt.o object/postprocessing_utils_dcrdefs.mt.o \
+  object/aspect_ratio.mt.o \
+  object/misc_demosaic.mt.o object/xtrans_demosaic.mt.o \
+  object/ahd_demosaic.mt.o object/dht_demosaic.mt.o \
+  object/aahd_demosaic.mt.o object/dcb_demosaic.mt.o \
+  object/file_write.mt.o \
+  object/ext_preprocess.mt.o   object/apply_profile.mt.o
+
+
+LR_INCLUDES=libraw/libraw.h libraw/libraw_alloc.h \
+  libraw/libraw_const.h libraw/libraw_datastream.h \
+  libraw/libraw_internal.h libraw/libraw_types.h \
+  libraw/libraw_version.h
+
+library: lib/libraw.a lib/libraw_r.a
+
+all_samples: bin/raw-identify bin/simple_dcraw  bin/dcraw_emu \
+	     bin/dcraw_half bin/half_mt bin/mem_image \
+             bin/unprocessed_raw bin/4channels bin/multirender_test \
+	     bin/postprocessing_benchmark bin/rawtextdump
+
+## RawSpeed xml file
+
+RawSpeed/rawspeed_xmldata.cpp: ${RAWSPEED_DATA}
+	./rsxml2c.sh ${RAWSPEED_DATA} > RawSpeed/rawspeed_xmldata.cpp
+
+## Samples ##
+bin/raw-identify: lib/libraw.a samples/raw-identify.cpp $(HEADERS)
+	$(CXX) ${CFLAGS} -o bin/raw-identify samples/raw-identify.cpp -L./lib -lraw  -lm  ${LDADD}
+
+bin/simple_dcraw: lib/libraw.a samples/simple_dcraw.cpp $(HEADERS)
+	$(CXX) -DLIBRAW_NOTHREADS ${CFLAGS} -o bin/simple_dcraw samples/simple_dcraw.cpp -L./lib -lraw  -lm  ${LDADD}
+
+bin/multirender_test: lib/libraw.a samples/multirender_test.cpp $(HEADERS)
+	$(CXX) -DLIBRAW_NOTHREADS ${CFLAGS} -o bin/multirender_test samples/multirender_test.cpp -L./lib -lraw  -lm  ${LDADD}
+
+bin/postprocessing_benchmark: lib/libraw.a samples/postprocessing_benchmark.cpp $(HEADERS)
+	$(CXX) -DLIBRAW_NOTHREADS ${CFLAGS} -o bin/postprocessing_benchmark samples/postprocessing_benchmark.cpp -L./lib -lraw  -lm  ${LDADD}
+
+bin/unprocessed_raw: lib/libraw.a samples/unprocessed_raw.cpp $(HEADERS)
+	$(CXX) -DLIBRAW_NOTHREADS ${CFLAGS} -o bin/unprocessed_raw samples/unprocessed_raw.cpp -L./lib -lraw  -lm  ${LDADD}
+
+bin/rawtextdump: lib/libraw.a samples/rawtextdump.cpp $(HEADERS)
+	${CXX} -DLIBRAW_NOTHREADS  ${CFLAGS} -o bin/rawtextdump samples/rawtextdump.cpp -L./lib -lraw  -lm  ${LDADD}
+
+bin/4channels: lib/libraw.a samples/4channels.cpp $(HEADERS)
+	$(CXX) -DLIBRAW_NOTHREADS ${CFLAGS} -o bin/4channels samples/4channels.cpp -L./lib -lraw  -lm  ${LDADD}
+
+bin/mem_image: lib/libraw.a samples/mem_image_sample.cpp $(HEADERS)
+	$(CXX) ${CFLAGS} -o bin/mem_image samples/mem_image_sample.cpp -L./lib -lraw  -lm  ${LDADD}
+
+bin/dcraw_half: lib/libraw.a samples/dcraw_half.c $(HEADERS)
+	$(CC) ${CFLAGS} -o bin/dcraw_half samples/dcraw_half.c -L./lib -lraw  -lm -lstdc++  ${LDADD}
+
+bin/half_mt: lib/libraw_r.a samples/half_mt.c $(HEADERS)
+	$(CC) -pthread ${CFLAGS} -o bin/half_mt samples/half_mt.c -L./lib -lraw_r  -lm -lstdc++  ${LDADD}
+
+bin/dcraw_emu: lib/libraw.a samples/dcraw_emu.cpp $(HEADERS)
+	$(CXX) ${CFLAGS} -o bin/dcraw_emu samples/dcraw_emu.cpp -L./lib -lraw_r  -lm ${LDADD}
+
+lib/libraw.a: ${LIB_OBJECTS}
+	rm -f lib/libraw.a
+	ar crv lib/libraw.a ${LIB_OBJECTS}
+	ranlib lib/libraw.a
+
+lib/libraw_r.a: ${LIB_MT_OBJECTS}
+	rm -f lib/libraw_r.a
+	ar crv lib/libraw_r.a ${LIB_MT_OBJECTS}
+	ranlib lib/libraw_r.a
+
+clean:
+	rm -fr bin/*.dSYM
+	rm -f *.o *~ src/*~ samples/*~ internal/*~ libraw/*~ lib/lib*.a bin/[4a-z]* object/*.o object/*.mto dcraw/*~ doc/*~ bin/*~ src/*/*~
+
+## script-created rules
+object/libraw_c_api.o: src/libraw_c_api.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/libraw_c_api.o src/libraw_c_api.cpp
+object/libraw_c_api.mt.o: src/libraw_c_api.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/libraw_c_api.mt.o src/libraw_c_api.cpp
+
+object/libraw_datastream.o: src/libraw_datastream.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/libraw_datastream.o src/libraw_datastream.cpp
+object/libraw_datastream.mt.o: src/libraw_datastream.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/libraw_datastream.mt.o src/libraw_datastream.cpp
+object/canon_600.o: src/decoders/canon_600.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/canon_600.o src/decoders/canon_600.cpp
+object/canon_600.mt.o: src/decoders/canon_600.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/canon_600.mt.o src/decoders/canon_600.cpp
+object/crx.o: src/decoders/crx.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/crx.o src/decoders/crx.cpp
+object/crx.mt.o: src/decoders/crx.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/crx.mt.o src/decoders/crx.cpp
+object/decoders_dcraw.o: src/decoders/decoders_dcraw.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/decoders_dcraw.o src/decoders/decoders_dcraw.cpp
+object/decoders_dcraw.mt.o: src/decoders/decoders_dcraw.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/decoders_dcraw.mt.o src/decoders/decoders_dcraw.cpp
+object/decoders_libraw_dcrdefs.o: src/decoders/decoders_libraw_dcrdefs.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/decoders_libraw_dcrdefs.o src/decoders/decoders_libraw_dcrdefs.cpp
+object/decoders_libraw_dcrdefs.mt.o: src/decoders/decoders_libraw_dcrdefs.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/decoders_libraw_dcrdefs.mt.o src/decoders/decoders_libraw_dcrdefs.cpp
+object/decoders_libraw.o: src/decoders/decoders_libraw.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/decoders_libraw.o src/decoders/decoders_libraw.cpp
+object/decoders_libraw.mt.o: src/decoders/decoders_libraw.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/decoders_libraw.mt.o src/decoders/decoders_libraw.cpp
+object/dng.o: src/decoders/dng.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/dng.o src/decoders/dng.cpp
+object/dng.mt.o: src/decoders/dng.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/dng.mt.o src/decoders/dng.cpp
+object/fp_dng.o: src/decoders/fp_dng.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/fp_dng.o src/decoders/fp_dng.cpp
+object/fp_dng.mt.o: src/decoders/fp_dng.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/fp_dng.mt.o src/decoders/fp_dng.cpp
+object/fuji_compressed.o: src/decoders/fuji_compressed.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/fuji_compressed.o src/decoders/fuji_compressed.cpp
+object/fuji_compressed.mt.o: src/decoders/fuji_compressed.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/fuji_compressed.mt.o src/decoders/fuji_compressed.cpp
+object/generic.o: src/decoders/generic.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/generic.o src/decoders/generic.cpp
+object/generic.mt.o: src/decoders/generic.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/generic.mt.o src/decoders/generic.cpp
+object/kodak_decoders.o: src/decoders/kodak_decoders.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/kodak_decoders.o src/decoders/kodak_decoders.cpp
+object/kodak_decoders.mt.o: src/decoders/kodak_decoders.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/kodak_decoders.mt.o src/decoders/kodak_decoders.cpp
+object/load_mfbacks.o: src/decoders/load_mfbacks.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/load_mfbacks.o src/decoders/load_mfbacks.cpp
+object/load_mfbacks.mt.o: src/decoders/load_mfbacks.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/load_mfbacks.mt.o src/decoders/load_mfbacks.cpp
+object/smal.o: src/decoders/smal.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/smal.o src/decoders/smal.cpp 
+object/smal.mt.o: src/decoders/smal.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/smal.mt.o src/decoders/smal.cpp
+object/unpack_thumb.o: src/decoders/unpack_thumb.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/unpack_thumb.o src/decoders/unpack_thumb.cpp
+object/unpack_thumb.mt.o: src/decoders/unpack_thumb.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/unpack_thumb.mt.o src/decoders/unpack_thumb.cpp
+object/unpack.o: src/decoders/unpack.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/unpack.o src/decoders/unpack.cpp
+object/unpack.mt.o: src/decoders/unpack.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/unpack.mt.o src/decoders/unpack.cpp
+object/aahd_demosaic.o: src/demosaic/aahd_demosaic.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/aahd_demosaic.o src/demosaic/aahd_demosaic.cpp
+object/aahd_demosaic.mt.o: src/demosaic/aahd_demosaic.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/aahd_demosaic.mt.o src/demosaic/aahd_demosaic.cpp
+object/ahd_demosaic.o: src/demosaic/ahd_demosaic.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/ahd_demosaic.o src/demosaic/ahd_demosaic.cpp
+object/ahd_demosaic.mt.o: src/demosaic/ahd_demosaic.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/ahd_demosaic.mt.o src/demosaic/ahd_demosaic.cpp
+object/dcb_demosaic.o: src/demosaic/dcb_demosaic.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/dcb_demosaic.o src/demosaic/dcb_demosaic.cpp
+object/dcb_demosaic.mt.o: src/demosaic/dcb_demosaic.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/dcb_demosaic.mt.o src/demosaic/dcb_demosaic.cpp
+object/dht_demosaic.o: src/demosaic/dht_demosaic.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/dht_demosaic.o src/demosaic/dht_demosaic.cpp
+object/dht_demosaic.mt.o: src/demosaic/dht_demosaic.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/dht_demosaic.mt.o src/demosaic/dht_demosaic.cpp
+object/misc_demosaic.o: src/demosaic/misc_demosaic.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/misc_demosaic.o src/demosaic/misc_demosaic.cpp
+object/misc_demosaic.mt.o: src/demosaic/misc_demosaic.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/misc_demosaic.mt.o src/demosaic/misc_demosaic.cpp
+object/xtrans_demosaic.o: src/demosaic/xtrans_demosaic.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/xtrans_demosaic.o src/demosaic/xtrans_demosaic.cpp
+object/xtrans_demosaic.mt.o: src/demosaic/xtrans_demosaic.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/xtrans_demosaic.mt.o src/demosaic/xtrans_demosaic.cpp
+object/dngsdk_glue.o: src/integration/dngsdk_glue.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/dngsdk_glue.o src/integration/dngsdk_glue.cpp
+object/dngsdk_glue.mt.o: src/integration/dngsdk_glue.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/dngsdk_glue.mt.o src/integration/dngsdk_glue.cpp
+object/rawspeed_glue.o: src/integration/rawspeed_glue.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/rawspeed_glue.o src/integration/rawspeed_glue.cpp
+object/rawspeed_glue.mt.o: src/integration/rawspeed_glue.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/rawspeed_glue.mt.o src/integration/rawspeed_glue.cpp
+object/adobepano.o: src/metadata/adobepano.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/adobepano.o src/metadata/adobepano.cpp
+object/adobepano.mt.o: src/metadata/adobepano.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/adobepano.mt.o src/metadata/adobepano.cpp
+object/canon.o: src/metadata/canon.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/canon.o src/metadata/canon.cpp
+object/canon.mt.o: src/metadata/canon.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/canon.mt.o src/metadata/canon.cpp
+object/ciff.o: src/metadata/ciff.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/ciff.o src/metadata/ciff.cpp
+object/ciff.mt.o: src/metadata/ciff.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/ciff.mt.o src/metadata/ciff.cpp
+object/cr3_parser.o: src/metadata/cr3_parser.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/cr3_parser.o src/metadata/cr3_parser.cpp
+object/cr3_parser.mt.o: src/metadata/cr3_parser.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/cr3_parser.mt.o src/metadata/cr3_parser.cpp
+object/epson.o: src/metadata/epson.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/epson.o src/metadata/epson.cpp
+object/epson.mt.o: src/metadata/epson.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/epson.mt.o src/metadata/epson.cpp
+object/exif_gps.o: src/metadata/exif_gps.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/exif_gps.o src/metadata/exif_gps.cpp
+object/exif_gps.mt.o: src/metadata/exif_gps.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/exif_gps.mt.o src/metadata/exif_gps.cpp
+object/fuji.o: src/metadata/fuji.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/fuji.o src/metadata/fuji.cpp
+object/fuji.mt.o: src/metadata/fuji.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/fuji.mt.o src/metadata/fuji.cpp
+object/identify_tools.o: src/metadata/identify_tools.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/identify_tools.o src/metadata/identify_tools.cpp
+object/identify_tools.mt.o: src/metadata/identify_tools.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/identify_tools.mt.o src/metadata/identify_tools.cpp
+object/identify.o: src/metadata/identify.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/identify.o src/metadata/identify.cpp
+object/identify.mt.o: src/metadata/identify.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/identify.mt.o src/metadata/identify.cpp
+object/kodak.o: src/metadata/kodak.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/kodak.o src/metadata/kodak.cpp
+object/kodak.mt.o: src/metadata/kodak.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/kodak.mt.o src/metadata/kodak.cpp
+object/leica.o: src/metadata/leica.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/leica.o src/metadata/leica.cpp
+object/leica.mt.o: src/metadata/leica.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/leica.mt.o src/metadata/leica.cpp
+object/makernotes.o: src/metadata/makernotes.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/makernotes.o src/metadata/makernotes.cpp
+object/makernotes.mt.o: src/metadata/makernotes.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/makernotes.mt.o src/metadata/makernotes.cpp
+object/mediumformat.o: src/metadata/mediumformat.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/mediumformat.o src/metadata/mediumformat.cpp
+object/mediumformat.mt.o: src/metadata/mediumformat.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/mediumformat.mt.o src/metadata/mediumformat.cpp
+object/minolta.o: src/metadata/minolta.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/minolta.o src/metadata/minolta.cpp
+object/minolta.mt.o: src/metadata/minolta.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/minolta.mt.o src/metadata/minolta.cpp
+object/misc_parsers.o: src/metadata/misc_parsers.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/misc_parsers.o src/metadata/misc_parsers.cpp
+object/misc_parsers.mt.o: src/metadata/misc_parsers.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/misc_parsers.mt.o src/metadata/misc_parsers.cpp
+object/nikon.o: src/metadata/nikon.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/nikon.o src/metadata/nikon.cpp
+object/nikon.mt.o: src/metadata/nikon.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/nikon.mt.o src/metadata/nikon.cpp
+object/hasselblad_model.o: src/metadata/hasselblad_model.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/hasselblad_model.o src/metadata/hasselblad_model.cpp
+object/hasselblad_model.mt.o: src/metadata/hasselblad_model.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/hasselblad_model.mt.o src/metadata/hasselblad_model.cpp
+object/normalize_model.o: src/metadata/normalize_model.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/normalize_model.o src/metadata/normalize_model.cpp
+object/normalize_model.mt.o: src/metadata/normalize_model.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/normalize_model.mt.o src/metadata/normalize_model.cpp
+object/olympus.o: src/metadata/olympus.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/olympus.o src/metadata/olympus.cpp
+object/olympus.mt.o: src/metadata/olympus.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/olympus.mt.o src/metadata/olympus.cpp
+object/p1.o: src/metadata/p1.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/p1.o src/metadata/p1.cpp
+object/p1.mt.o: src/metadata/p1.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/p1.mt.o src/metadata/p1.cpp
+object/pentax.o: src/metadata/pentax.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/pentax.o src/metadata/pentax.cpp
+object/pentax.mt.o: src/metadata/pentax.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/pentax.mt.o src/metadata/pentax.cpp
+object/samsung.o: src/metadata/samsung.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/samsung.o src/metadata/samsung.cpp
+object/samsung.mt.o: src/metadata/samsung.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/samsung.mt.o src/metadata/samsung.cpp
+object/sony.o: src/metadata/sony.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/sony.o src/metadata/sony.cpp
+object/sony.mt.o: src/metadata/sony.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/sony.mt.o src/metadata/sony.cpp
+object/tiff.o: src/metadata/tiff.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/tiff.o src/metadata/tiff.cpp
+object/tiff.mt.o: src/metadata/tiff.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/tiff.mt.o src/metadata/tiff.cpp
+object/aspect_ratio.o: src/postprocessing/aspect_ratio.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/aspect_ratio.o src/postprocessing/aspect_ratio.cpp
+object/aspect_ratio.mt.o: src/postprocessing/aspect_ratio.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/aspect_ratio.mt.o src/postprocessing/aspect_ratio.cpp
+object/dcraw_process.o: src/postprocessing/dcraw_process.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/dcraw_process.o src/postprocessing/dcraw_process.cpp
+object/dcraw_process.mt.o: src/postprocessing/dcraw_process.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/dcraw_process.mt.o src/postprocessing/dcraw_process.cpp
+object/mem_image.o: src/postprocessing/mem_image.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/mem_image.o src/postprocessing/mem_image.cpp
+object/mem_image.mt.o: src/postprocessing/mem_image.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/mem_image.mt.o src/postprocessing/mem_image.cpp
+object/postprocessing_aux.o: src/postprocessing/postprocessing_aux.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/postprocessing_aux.o src/postprocessing/postprocessing_aux.cpp
+object/postprocessing_aux.mt.o: src/postprocessing/postprocessing_aux.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/postprocessing_aux.mt.o src/postprocessing/postprocessing_aux.cpp
+object/postprocessing_utils_dcrdefs.o: src/postprocessing/postprocessing_utils_dcrdefs.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/postprocessing_utils_dcrdefs.o src/postprocessing/postprocessing_utils_dcrdefs.cpp
+object/postprocessing_utils_dcrdefs.mt.o: src/postprocessing/postprocessing_utils_dcrdefs.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/postprocessing_utils_dcrdefs.mt.o src/postprocessing/postprocessing_utils_dcrdefs.cpp
+object/postprocessing_utils.o: src/postprocessing/postprocessing_utils.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/postprocessing_utils.o src/postprocessing/postprocessing_utils.cpp
+object/postprocessing_utils.mt.o: src/postprocessing/postprocessing_utils.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/postprocessing_utils.mt.o src/postprocessing/postprocessing_utils.cpp
+object/raw2image.o: src/preprocessing/raw2image.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/raw2image.o src/preprocessing/raw2image.cpp
+object/raw2image.mt.o: src/preprocessing/raw2image.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/raw2image.mt.o src/preprocessing/raw2image.cpp
+object/ext_preprocess.o: src/preprocessing/ext_preprocess.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/ext_preprocess.o src/preprocessing/ext_preprocess.cpp
+object/ext_preprocess.mt.o: src/preprocessing/ext_preprocess.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/ext_preprocess.mt.o src/preprocessing/ext_preprocess.cpp
+object/subtract_black.o: src/preprocessing/subtract_black.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/subtract_black.o src/preprocessing/subtract_black.cpp
+object/subtract_black.mt.o: src/preprocessing/subtract_black.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/subtract_black.mt.o src/preprocessing/subtract_black.cpp
+object/cameralist.o: src/tables/cameralist.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/cameralist.o src/tables/cameralist.cpp
+object/cameralist.mt.o: src/tables/cameralist.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/cameralist.mt.o src/tables/cameralist.cpp
+object/colorconst.o: src/tables/colorconst.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/colorconst.o src/tables/colorconst.cpp
+object/colorconst.mt.o: src/tables/colorconst.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/colorconst.mt.o src/tables/colorconst.cpp
+object/colordata.o: src/tables/colordata.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/colordata.o src/tables/colordata.cpp
+object/colordata.mt.o: src/tables/colordata.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/colordata.mt.o src/tables/colordata.cpp
+object/wblists.o: src/tables/wblists.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/wblists.o src/tables/wblists.cpp
+object/wblists.mt.o: src/tables/wblists.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/wblists.mt.o src/tables/wblists.cpp
+object/curves.o: src/utils/curves.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/curves.o src/utils/curves.cpp
+object/curves.mt.o: src/utils/curves.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/curves.mt.o src/utils/curves.cpp
+object/decoder_info.o: src/utils/decoder_info.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/decoder_info.o src/utils/decoder_info.cpp
+object/decoder_info.mt.o: src/utils/decoder_info.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/decoder_info.mt.o src/utils/decoder_info.cpp
+object/init_close_utils.o: src/utils/init_close_utils.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/init_close_utils.o src/utils/init_close_utils.cpp
+object/init_close_utils.mt.o: src/utils/init_close_utils.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/init_close_utils.mt.o src/utils/init_close_utils.cpp
+object/open.o: src/utils/open.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/open.o src/utils/open.cpp
+object/open.mt.o: src/utils/open.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/open.mt.o src/utils/open.cpp
+object/phaseone_processing.o: src/utils/phaseone_processing.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/phaseone_processing.o src/utils/phaseone_processing.cpp
+object/phaseone_processing.mt.o: src/utils/phaseone_processing.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/phaseone_processing.mt.o src/utils/phaseone_processing.cpp
+object/read_utils.o: src/utils/read_utils.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/read_utils.o src/utils/read_utils.cpp
+object/read_utils.mt.o: src/utils/read_utils.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/read_utils.mt.o src/utils/read_utils.cpp
+object/thumb_utils.o: src/utils/thumb_utils.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/thumb_utils.o src/utils/thumb_utils.cpp
+object/thumb_utils.mt.o: src/utils/thumb_utils.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/thumb_utils.mt.o src/utils/thumb_utils.cpp
+object/utils_dcraw.o: src/utils/utils_dcraw.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/utils_dcraw.o src/utils/utils_dcraw.cpp
+object/utils_dcraw.mt.o: src/utils/utils_dcraw.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/utils_dcraw.mt.o src/utils/utils_dcraw.cpp
+object/utils_libraw.o: src/utils/utils_libraw.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/utils_libraw.o src/utils/utils_libraw.cpp
+object/utils_libraw.mt.o: src/utils/utils_libraw.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/utils_libraw.mt.o src/utils/utils_libraw.cpp
+object/apply_profile.o: src/write/apply_profile.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/apply_profile.o src/write/apply_profile.cpp
+object/apply_profile.mt.o: src/write/apply_profile.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/apply_profile.mt.o src/write/apply_profile.cpp
+object/file_write.o: src/write/file_write.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/file_write.o src/write/file_write.cpp
+object/file_write.mt.o: src/write/file_write.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/file_write.mt.o src/write/file_write.cpp
+object/tiff_writer.o: src/write/tiff_writer.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/tiff_writer.o src/write/tiff_writer.cpp
+object/tiff_writer.mt.o: src/write/tiff_writer.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/tiff_writer.mt.o src/write/tiff_writer.cpp
+object/x3f_parse_process.o: src/x3f/x3f_parse_process.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/x3f_parse_process.o src/x3f/x3f_parse_process.cpp
+object/x3f_parse_process.mt.o: src/x3f/x3f_parse_process.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/x3f_parse_process.mt.o src/x3f/x3f_parse_process.cpp
+object/x3f_utils_patched.o: src/x3f/x3f_utils_patched.cpp $(HEADERS)
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/x3f_utils_patched.o src/x3f/x3f_utils_patched.cpp
+object/x3f_utils_patched.mt.o: src/x3f/x3f_utils_patched.cpp $(HEADERS)
+	${CXX} -c ${CFLAGS} -o object/x3f_utils_patched.mt.o src/x3f/x3f_utils_patched.cpp

+ 230 - 0
raw.mod/libraw/Makefile.devel.nopp

@@ -0,0 +1,230 @@
+all: library all_samples
+
+CC=clang
+CXX=clang++
+
+#CC=gcc
+#CXX=g++
+
+LDADD+=-lz
+
+CFLAGS=-DLIBRAW_USE_AUTOPTR
+CFLAGS+= -g -I. -pedantic -Wno-long-long -Wno-overflow -O3
+
+# RawSpeed Support
+# CFLAGS+=-DUSE_RAWSPEED -I../RawSpeed -I/opt/local/include/libxml2
+# LDADD+=-L../RawSpeed/RawSpeed/release -lrawspeed -L/opt/local/include -ljpeg -lxml2
+# RAWSPEED_DATA=../RawSpeed/data/cameras.xml
+
+# DNG SDK Support
+# CFLAGS+=-DUSE_DNGSDK -I../dng_sdk/source
+# LDADDD+=-L../dng_sdk/release -ldng -ljpeg -lz
+
+# LCMS support
+# For lcms2 set -DUSE_LCMS2
+#CFLAGS+=-DUSE_LCMS2 -I/opt/local/include
+#LDADD+=-L/opt/local/lib -llcms
+
+# Jasper support for RedCine
+#CFLAGS+=-DUSE_JASPER -I/opt/local/include
+#LDADD+=-L/opt/local/lib -ljasper
+
+# JPEG support for DNG and Kodak
+CFLAGS+=-DUSE_JPEG -I/usr/local/include
+LDADD+=-L/usr/local/lib -ljpeg
+
+# LIBJPEG8:
+CFLAGS+=-DUSE_JPEG8
+
+CSTFLAGS=$(CFLAGS) -DLIBRAW_NOTHREADS
+
+LIB_OBJECTS= object/libraw_datastream.o \
+  object/cameralist.o object/fuji_compressed.o \
+  object/crx.o object/fp_dng.o object/decoders_libraw.o \
+  object/unpack.o object/unpack_thumb.o \
+  object/rawspeed_glue.o object/dngsdk_glue.o \
+  object/colorconst.o object/utils_libraw.o object/init_close_utils.o \
+  object/decoder_info.o object/open.o object/phaseone_processing.o \
+  object/thumb_utils.o \
+  object/tiff_writer.o object/subtract_black.o \
+  object/raw2image.o  \
+  object/x3f_utils_patched.o object/x3f_parse_process.o \
+  object/read_utils.o object/curves.o object/utils_dcraw.o \
+  object/colordata.o \
+  object/canon_600.o  object/decoders_dcraw.o \
+  object/decoders_libraw_dcrdefs.o  object/generic.o \
+  object/kodak_decoders.o object/dng.o object/smal.o \
+  object/load_mfbacks.o \
+  object/sony.o object/nikon.o object/samsung.o object/cr3_parser.o \
+  object/canon.o  object/epson.o object/olympus.o object/leica.o \
+  object/fuji.o object/adobepano.o object/pentax.o object/p1.o \
+  object/makernotes.o object/exif_gps.o object/kodak.o \
+  object/tiff.o object/ciff.o object/mediumformat.o object/minolta.o \
+  object/identify_tools.o \
+  object/hasselblad_model.o object/normalize_model.o object/identify.o \
+  object/misc_parsers.o object/wblists.o \
+  object/file_write.o \
+  object/ext_preprocess.o \
+  object/postprocessing_ph.o \
+
+
+
+LR_INCLUDES=libraw/libraw.h libraw/libraw_alloc.h \
+  libraw/libraw_const.h libraw/libraw_datastream.h \
+  libraw/libraw_internal.h libraw/libraw_types.h \
+  libraw/libraw_version.h
+
+LRLIB=lib/libraw_nopp.a
+
+library: $(LRLIB)
+
+all_samples: bin/raw-identify bin/unprocessed_raw bin/4channels
+
+## Samples ##
+bin/raw-identify: $(LRLIB) samples/raw-identify.cpp
+	$(CXX) ${CFLAGS} -o bin/raw-identify samples/raw-identify.cpp -L./lib -lraw_nopp  -lm  ${LDADD}
+
+bin/unprocessed_raw: $(LRLIB) samples/unprocessed_raw.cpp
+	$(CXX) -DLIBRAW_NOTHREADS ${CFLAGS} -o bin/unprocessed_raw samples/unprocessed_raw.cpp -L./lib -lraw_nopp  -lm  ${LDADD}
+
+bin/4channels: $(LRLIB) samples/4channels.cpp
+	$(CXX) -DLIBRAW_NOTHREADS ${CFLAGS} -o bin/4channels samples/4channels.cpp -L./lib -lraw_nopp  -lm  ${LDADD}
+
+$(LRLIB): ${LIB_OBJECTS}
+	rm -f $(LRLIB)
+	ar crv $(LRLIB) ${LIB_OBJECTS}
+	ranlib $(LRLIB)
+
+clean:
+	rm -fr bin/*.dSYM
+	rm -f *.o *~ src/*~ samples/*~ internal/*~ libraw/*~ lib/lib*.a bin/[4a-z]* object/*.o  dcraw/*~ doc/*~ bin/*~ src/*/*~
+
+## script-created rules
+object/libraw_c_api.o: src/libraw_c_api.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/libraw_c_api.o src/libraw_c_api.cpp
+object/libraw_datastream.o: src/libraw_datastream.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/libraw_datastream.o src/libraw_datastream.cpp
+object/canon_600.o: src/decoders/canon_600.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/canon_600.o src/decoders/canon_600.cpp
+object/crx.o: src/decoders/crx.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/crx.o src/decoders/crx.cpp
+object/decoders_dcraw.o: src/decoders/decoders_dcraw.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/decoders_dcraw.o src/decoders/decoders_dcraw.cpp
+object/decoders_libraw_dcrdefs.o: src/decoders/decoders_libraw_dcrdefs.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/decoders_libraw_dcrdefs.o src/decoders/decoders_libraw_dcrdefs.cpp
+object/decoders_libraw.o: src/decoders/decoders_libraw.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/decoders_libraw.o src/decoders/decoders_libraw.cpp
+object/dng.o: src/decoders/dng.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/dng.o src/decoders/dng.cpp
+object/fp_dng.o: src/decoders/fp_dng.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/fp_dng.o src/decoders/fp_dng.cpp
+object/fuji_compressed.o: src/decoders/fuji_compressed.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/fuji_compressed.o src/decoders/fuji_compressed.cpp
+object/generic.o: src/decoders/generic.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/generic.o src/decoders/generic.cpp
+object/kodak_decoders.o: src/decoders/kodak_decoders.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/kodak_decoders.o src/decoders/kodak_decoders.cpp
+object/load_mfbacks.o: src/decoders/load_mfbacks.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/load_mfbacks.o src/decoders/load_mfbacks.cpp
+object/smal.o: src/decoders/smal.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/smal.o src/decoders/smal.cpp
+object/unpack_thumb.o: src/decoders/unpack_thumb.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/unpack_thumb.o src/decoders/unpack_thumb.cpp
+object/unpack.o: src/decoders/unpack.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/unpack.o src/decoders/unpack.cpp
+object/dngsdk_glue.o: src/integration/dngsdk_glue.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/dngsdk_glue.o src/integration/dngsdk_glue.cpp
+object/rawspeed_glue.o: src/integration/rawspeed_glue.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/rawspeed_glue.o src/integration/rawspeed_glue.cpp
+object/adobepano.o: src/metadata/adobepano.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/adobepano.o src/metadata/adobepano.cpp
+object/canon.o: src/metadata/canon.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/canon.o src/metadata/canon.cpp
+object/ciff.o: src/metadata/ciff.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/ciff.o src/metadata/ciff.cpp
+object/cr3_parser.o: src/metadata/cr3_parser.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/cr3_parser.o src/metadata/cr3_parser.cpp
+object/epson.o: src/metadata/epson.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/epson.o src/metadata/epson.cpp
+object/exif_gps.o: src/metadata/exif_gps.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/exif_gps.o src/metadata/exif_gps.cpp
+object/fuji.o: src/metadata/fuji.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/fuji.o src/metadata/fuji.cpp
+object/identify_tools.o: src/metadata/identify_tools.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/identify_tools.o src/metadata/identify_tools.cpp
+object/identify.o: src/metadata/identify.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/identify.o src/metadata/identify.cpp
+object/kodak.o: src/metadata/kodak.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/kodak.o src/metadata/kodak.cpp
+object/leica.o: src/metadata/leica.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/leica.o src/metadata/leica.cpp
+object/makernotes.o: src/metadata/makernotes.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/makernotes.o src/metadata/makernotes.cpp
+object/mediumformat.o: src/metadata/mediumformat.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/mediumformat.o src/metadata/mediumformat.cpp
+object/minolta.o: src/metadata/minolta.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/minolta.o src/metadata/minolta.cpp
+object/misc_parsers.o: src/metadata/misc_parsers.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/misc_parsers.o src/metadata/misc_parsers.cpp
+object/nikon.o: src/metadata/nikon.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/nikon.o src/metadata/nikon.cpp
+object/hasselblad_model.o: src/metadata/hasselblad_model.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/hasselblad_model.o src/metadata/hasselblad_model.cpp
+object/normalize_model.o: src/metadata/normalize_model.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/normalize_model.o src/metadata/normalize_model.cpp
+object/olympus.o: src/metadata/olympus.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/olympus.o src/metadata/olympus.cpp
+object/p1.o: src/metadata/p1.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/p1.o src/metadata/p1.cpp
+object/pentax.o: src/metadata/pentax.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/pentax.o src/metadata/pentax.cpp
+object/samsung.o: src/metadata/samsung.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/samsung.o src/metadata/samsung.cpp
+object/sony.o: src/metadata/sony.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/sony.o src/metadata/sony.cpp
+object/tiff.o: src/metadata/tiff.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/tiff.o src/metadata/tiff.cpp
+
+object/postprocessing_ph.o: src/postprocessing/postprocessing_ph.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/postprocessing_ph.o src/postprocessing/postprocessing_ph.cpp
+
+object/raw2image.o: src/preprocessing/raw2image.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/raw2image.o src/preprocessing/raw2image.cpp
+object/ext_preprocess.o: src/preprocessing/ext_preprocess.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/ext_preprocess.o src/preprocessing/ext_preprocess.cpp
+object/subtract_black.o: src/preprocessing/subtract_black.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/subtract_black.o src/preprocessing/subtract_black.cpp
+object/cameralist.o: src/tables/cameralist.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/cameralist.o src/tables/cameralist.cpp
+object/colorconst.o: src/tables/colorconst.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/colorconst.o src/tables/colorconst.cpp
+object/colordata.o: src/tables/colordata.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/colordata.o src/tables/colordata.cpp
+object/wblists.o: src/tables/wblists.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/wblists.o src/tables/wblists.cpp
+object/curves.o: src/utils/curves.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/curves.o src/utils/curves.cpp
+object/decoder_info.o: src/utils/decoder_info.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/decoder_info.o src/utils/decoder_info.cpp
+object/init_close_utils.o: src/utils/init_close_utils.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/init_close_utils.o src/utils/init_close_utils.cpp
+object/open.o: src/utils/open.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/open.o src/utils/open.cpp
+object/phaseone_processing.o: src/utils/phaseone_processing.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/phaseone_processing.o src/utils/phaseone_processing.cpp
+object/read_utils.o: src/utils/read_utils.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/read_utils.o src/utils/read_utils.cpp
+object/thumb_utils.o: src/utils/thumb_utils.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/thumb_utils.o src/utils/thumb_utils.cpp
+object/utils_dcraw.o: src/utils/utils_dcraw.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/utils_dcraw.o src/utils/utils_dcraw.cpp
+object/utils_libraw.o: src/utils/utils_libraw.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/utils_libraw.o src/utils/utils_libraw.cpp
+object/file_write.o: src/write/file_write.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/file_write.o src/write/file_write.cpp
+object/tiff_writer.o: src/write/tiff_writer.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/tiff_writer.o src/write/tiff_writer.cpp
+object/x3f_parse_process.o: src/x3f/x3f_parse_process.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/x3f_parse_process.o src/x3f/x3f_parse_process.cpp
+object/x3f_utils_patched.o: src/x3f/x3f_utils_patched.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/x3f_utils_patched.o src/x3f/x3f_utils_patched.cpp

+ 227 - 0
raw.mod/libraw/Makefile.devel.noppr2i

@@ -0,0 +1,227 @@
+all: library all_samples
+
+CC=clang
+CXX=clang++
+
+#CC=gcc
+#CXX=g++
+
+LDADD+=-lz
+
+CFLAGS=-DLIBRAW_USE_AUTOPTR
+CFLAGS+= -g -I. -pedantic -Wno-long-long -Wno-overflow -O3
+
+# RawSpeed Support
+# CFLAGS+=-DUSE_RAWSPEED -I../RawSpeed -I/opt/local/include/libxml2
+# LDADD+=-L../RawSpeed/RawSpeed/release -lrawspeed -L/opt/local/include -ljpeg -lxml2
+# RAWSPEED_DATA=../RawSpeed/data/cameras.xml
+
+# DNG SDK Support
+# CFLAGS+=-DUSE_DNGSDK -I../dng_sdk/source
+# LDADDD+=-L../dng_sdk/release -ldng -ljpeg -lz
+
+# LCMS support
+# For lcms2 set -DUSE_LCMS2
+#CFLAGS+=-DUSE_LCMS2 -I/opt/local/include
+#LDADD+=-L/opt/local/lib -llcms
+
+# Jasper support for RedCine
+#CFLAGS+=-DUSE_JASPER -I/opt/local/include
+#LDADD+=-L/opt/local/lib -ljasper
+
+# JPEG support for DNG and Kodak
+CFLAGS+=-DUSE_JPEG -I/usr/local/include
+LDADD+=-L/usr/local/lib -ljpeg
+
+# LIBJPEG8:
+CFLAGS+=-DUSE_JPEG8
+
+CSTFLAGS=$(CFLAGS) -DLIBRAW_NOTHREADS
+
+LIB_OBJECTS= object/libraw_datastream.o \
+  object/cameralist.o object/fuji_compressed.o \
+  object/crx.o object/fp_dng.o object/decoders_libraw.o \
+  object/unpack.o object/unpack_thumb.o \
+  object/rawspeed_glue.o object/dngsdk_glue.o \
+  object/colorconst.o object/utils_libraw.o object/init_close_utils.o \
+  object/decoder_info.o object/open.o object/phaseone_processing.o \
+  object/thumb_utils.o \
+  object/x3f_utils_patched.o object/x3f_parse_process.o \
+  object/read_utils.o object/curves.o object/utils_dcraw.o \
+  object/colordata.o \
+  object/canon_600.o  object/decoders_dcraw.o \
+  object/decoders_libraw_dcrdefs.o  object/generic.o \
+  object/kodak_decoders.o object/dng.o object/smal.o \
+  object/load_mfbacks.o \
+  object/sony.o object/nikon.o object/samsung.o object/cr3_parser.o \
+  object/canon.o  object/epson.o object/olympus.o object/leica.o \
+  object/fuji.o object/adobepano.o object/pentax.o object/p1.o \
+  object/makernotes.o object/exif_gps.o object/kodak.o \
+  object/tiff.o object/ciff.o object/mediumformat.o object/minolta.o \
+  object/identify_tools.o \
+  object/hasselblad_model.o object/normalize_model.o object/identify.o \
+  object/misc_parsers.o object/wblists.o \
+  object/write_ph.o \
+  object/postprocessing_ph.o \
+  object/preprocessing_ph.o \
+
+
+
+LR_INCLUDES=libraw/libraw.h libraw/libraw_alloc.h \
+  libraw/libraw_const.h libraw/libraw_datastream.h \
+  libraw/libraw_internal.h libraw/libraw_types.h \
+  libraw/libraw_version.h
+
+LRLIB=lib/libraw_noppr2i.a
+
+library: $(LRLIB)
+
+all_samples: bin/raw-identify
+
+## Samples ##
+bin/raw-identify: $(LRLIB) samples/raw-identify.cpp
+	$(CXX) ${CFLAGS} -o bin/raw-identify samples/raw-identify.cpp -L./lib -lraw_noppr2i  -lm  ${LDADD}
+
+$(LRLIB): ${LIB_OBJECTS}
+	rm -f $(LRLIB)
+	ar crv $(LRLIB) ${LIB_OBJECTS}
+	ranlib $(LRLIB)
+
+clean:
+	rm -fr bin/*.dSYM
+	rm -f *.o *~ src/*~ samples/*~ internal/*~ libraw/*~ lib/lib*.a bin/[4a-z]* object/*.o  dcraw/*~ doc/*~ bin/*~ src/*/*~
+
+## script-created rules
+object/libraw_c_api.o: src/libraw_c_api.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/libraw_c_api.o src/libraw_c_api.cpp
+object/libraw_datastream.o: src/libraw_datastream.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/libraw_datastream.o src/libraw_datastream.cpp
+object/canon_600.o: src/decoders/canon_600.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/canon_600.o src/decoders/canon_600.cpp
+object/crx.o: src/decoders/crx.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/crx.o src/decoders/crx.cpp
+object/decoders_dcraw.o: src/decoders/decoders_dcraw.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/decoders_dcraw.o src/decoders/decoders_dcraw.cpp
+object/decoders_libraw_dcrdefs.o: src/decoders/decoders_libraw_dcrdefs.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/decoders_libraw_dcrdefs.o src/decoders/decoders_libraw_dcrdefs.cpp
+object/decoders_libraw.o: src/decoders/decoders_libraw.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/decoders_libraw.o src/decoders/decoders_libraw.cpp
+object/dng.o: src/decoders/dng.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/dng.o src/decoders/dng.cpp
+object/fp_dng.o: src/decoders/fp_dng.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/fp_dng.o src/decoders/fp_dng.cpp
+object/fuji_compressed.o: src/decoders/fuji_compressed.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/fuji_compressed.o src/decoders/fuji_compressed.cpp
+object/generic.o: src/decoders/generic.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/generic.o src/decoders/generic.cpp
+object/kodak_decoders.o: src/decoders/kodak_decoders.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/kodak_decoders.o src/decoders/kodak_decoders.cpp
+object/load_mfbacks.o: src/decoders/load_mfbacks.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/load_mfbacks.o src/decoders/load_mfbacks.cpp
+object/smal.o: src/decoders/smal.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/smal.o src/decoders/smal.cpp
+object/unpack_thumb.o: src/decoders/unpack_thumb.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/unpack_thumb.o src/decoders/unpack_thumb.cpp
+object/unpack.o: src/decoders/unpack.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/unpack.o src/decoders/unpack.cpp
+object/dngsdk_glue.o: src/integration/dngsdk_glue.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/dngsdk_glue.o src/integration/dngsdk_glue.cpp
+object/rawspeed_glue.o: src/integration/rawspeed_glue.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/rawspeed_glue.o src/integration/rawspeed_glue.cpp
+object/adobepano.o: src/metadata/adobepano.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/adobepano.o src/metadata/adobepano.cpp
+object/canon.o: src/metadata/canon.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/canon.o src/metadata/canon.cpp
+object/ciff.o: src/metadata/ciff.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/ciff.o src/metadata/ciff.cpp
+object/cr3_parser.o: src/metadata/cr3_parser.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/cr3_parser.o src/metadata/cr3_parser.cpp
+object/epson.o: src/metadata/epson.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/epson.o src/metadata/epson.cpp
+object/exif_gps.o: src/metadata/exif_gps.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/exif_gps.o src/metadata/exif_gps.cpp
+object/fuji.o: src/metadata/fuji.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/fuji.o src/metadata/fuji.cpp
+object/identify_tools.o: src/metadata/identify_tools.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/identify_tools.o src/metadata/identify_tools.cpp
+object/identify.o: src/metadata/identify.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/identify.o src/metadata/identify.cpp
+object/kodak.o: src/metadata/kodak.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/kodak.o src/metadata/kodak.cpp
+object/leica.o: src/metadata/leica.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/leica.o src/metadata/leica.cpp
+object/makernotes.o: src/metadata/makernotes.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/makernotes.o src/metadata/makernotes.cpp
+object/mediumformat.o: src/metadata/mediumformat.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/mediumformat.o src/metadata/mediumformat.cpp
+object/minolta.o: src/metadata/minolta.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/minolta.o src/metadata/minolta.cpp
+object/misc_parsers.o: src/metadata/misc_parsers.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/misc_parsers.o src/metadata/misc_parsers.cpp
+object/nikon.o: src/metadata/nikon.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/nikon.o src/metadata/nikon.cpp
+object/hasselblad_model.o: src/metadata/hasselblad_model.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/hasselblad_model.o src/metadata/hasselblad_model.cpp
+object/normalize_model.o: src/metadata/normalize_model.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/normalize_model.o src/metadata/normalize_model.cpp
+object/olympus.o: src/metadata/olympus.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/olympus.o src/metadata/olympus.cpp
+object/p1.o: src/metadata/p1.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/p1.o src/metadata/p1.cpp
+object/pentax.o: src/metadata/pentax.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/pentax.o src/metadata/pentax.cpp
+object/samsung.o: src/metadata/samsung.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/samsung.o src/metadata/samsung.cpp
+object/sony.o: src/metadata/sony.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/sony.o src/metadata/sony.cpp
+object/tiff.o: src/metadata/tiff.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/tiff.o src/metadata/tiff.cpp
+
+object/preprocessing_ph.o: src/preprocessing/preprocessing_ph.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/preprocessing_ph.o src/preprocessing/preprocessing_ph.cpp
+
+object/postprocessing_ph.o: src/postprocessing/postprocessing_ph.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/postprocessing_ph.o src/postprocessing/postprocessing_ph.cpp
+
+object/raw2image.o: src/preprocessing/raw2image.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/raw2image.o src/preprocessing/raw2image.cpp
+object/ext_preprocess.o: src/preprocessing/ext_preprocess.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/ext_preprocess.o src/preprocessing/ext_preprocess.cpp
+object/subtract_black.o: src/preprocessing/subtract_black.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/subtract_black.o src/preprocessing/subtract_black.cpp
+object/cameralist.o: src/tables/cameralist.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/cameralist.o src/tables/cameralist.cpp
+object/colorconst.o: src/tables/colorconst.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/colorconst.o src/tables/colorconst.cpp
+object/colordata.o: src/tables/colordata.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/colordata.o src/tables/colordata.cpp
+object/wblists.o: src/tables/wblists.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/wblists.o src/tables/wblists.cpp
+object/curves.o: src/utils/curves.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/curves.o src/utils/curves.cpp
+object/decoder_info.o: src/utils/decoder_info.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/decoder_info.o src/utils/decoder_info.cpp
+object/init_close_utils.o: src/utils/init_close_utils.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/init_close_utils.o src/utils/init_close_utils.cpp
+object/open.o: src/utils/open.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/open.o src/utils/open.cpp
+object/phaseone_processing.o: src/utils/phaseone_processing.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/phaseone_processing.o src/utils/phaseone_processing.cpp
+object/read_utils.o: src/utils/read_utils.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/read_utils.o src/utils/read_utils.cpp
+object/thumb_utils.o: src/utils/thumb_utils.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/thumb_utils.o src/utils/thumb_utils.cpp
+object/utils_dcraw.o: src/utils/utils_dcraw.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/utils_dcraw.o src/utils/utils_dcraw.cpp
+object/utils_libraw.o: src/utils/utils_libraw.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/utils_libraw.o src/utils/utils_libraw.cpp
+object/write_ph.o: src/write/write_ph.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/write_ph.o src/write/write_ph.cpp
+object/file_write.o: src/write/file_write.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/file_write.o src/write/file_write.cpp
+object/tiff_writer.o: src/write/tiff_writer.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/tiff_writer.o src/write/tiff_writer.cpp
+object/x3f_parse_process.o: src/x3f/x3f_parse_process.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/x3f_parse_process.o src/x3f/x3f_parse_process.cpp
+object/x3f_utils_patched.o: src/x3f/x3f_utils_patched.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/x3f_utils_patched.o src/x3f/x3f_utils_patched.cpp

+ 497 - 0
raw.mod/libraw/Makefile.dist

@@ -0,0 +1,497 @@
+all: library all_samples
+
+#CFLAGS=-arch i386 -arch x86_64 -O3  -I. -w
+CFLAGS=-O3  -I. -w
+CC=gcc
+CXX=g++
+
+# OpenMP support
+#CFLAGS+=-fopenmp
+
+# RawSpeed Support
+#CFLAGS+=-pthread -DUSE_RAWSPEED -I../RawSpeed -I/usr/local/include/libxml2
+#LDADD+=-L../RawSpeed/RawSpeed -lrawspeed -L/usr/local/lib -ljpeg -lxml2
+#RAWSPEED_DATA=../RawSpeed/data/cameras.xml
+
+# DNG SDK Support
+# CFLAGS+=-DUSE_DNGSDK -I../dng_sdk/source
+# LDADDD+=-L../dng_sdk/release -ldng -lXMPCore -ljpeg -lz
+
+# Jasper support for RedCine
+#CFLAGS+=-DUSE_JASPER -I/usr/local/include
+#LDADD+=-L/usr/local/lib -ljasper
+
+# ZLIB support (FP dng)
+CFLAGS+=-DUSE_ZLIB
+LDADD+=-lz
+
+# JPEG support for lossy DNG
+#CFLAGS+=-DUSE_JPEG -I/usr/local/include
+#LDADD+=-L/usr/local/lib -ljpeg
+# LIBJPEG8:
+#CFLAGS+=-DUSE_JPEG8
+
+# LCMS support
+#CFLAGS+=-DUSE_LCMS -I/usr/local/include
+#LDADD+=-L/usr/local/lib -llcms
+
+# LCMS2.x support
+#CFLAGS+=-DUSE_LCMS2 -I/usr/local/include
+#LDADD+=-L/usr/local/lib -llcms2
+
+CSTFLAGS=$(CFLAGS) -DLIBRAW_NOTHREADS
+
+LIB_OBJECTS= object/libraw_datastream.o object/libraw_c_api.o \
+  object/cameralist.o object/fuji_compressed.o \
+  object/crx.o object/fp_dng.o object/decoders_libraw.o \
+  object/unpack.o object/unpack_thumb.o \
+  object/rawspeed_glue.o object/dngsdk_glue.o \
+  object/colorconst.o object/utils_libraw.o object/init_close_utils.o \
+  object/decoder_info.o object/open.o object/phaseone_processing.o \
+  object/thumb_utils.o \
+  object/tiff_writer.o object/subtract_black.o object/postprocessing_utils.o \
+  object/dcraw_process.o object/raw2image.o object/mem_image.o \
+  object/x3f_utils_patched.o object/x3f_parse_process.o \
+  object/read_utils.o object/curves.o object/utils_dcraw.o \
+  object/colordata.o \
+  object/canon_600.o  object/decoders_dcraw.o \
+  object/decoders_libraw_dcrdefs.o  object/generic.o \
+  object/kodak_decoders.o object/dng.o object/smal.o \
+  object/load_mfbacks.o \
+  object/sony.o object/nikon.o object/samsung.o object/cr3_parser.o \
+  object/canon.o  object/epson.o object/olympus.o object/leica.o \
+  object/fuji.o object/adobepano.o object/pentax.o object/p1.o \
+  object/makernotes.o object/exif_gps.o object/kodak.o \
+  object/tiff.o object/ciff.o object/mediumformat.o object/minolta.o \
+  object/identify_tools.o \
+  object/hasselblad_model.o object/normalize_model.o object/identify.o \
+  object/misc_parsers.o object/wblists.o \
+  object/postprocessing_aux.o object/postprocessing_utils_dcrdefs.o \
+  object/aspect_ratio.o \
+  object/misc_demosaic.o object/xtrans_demosaic.o object/ahd_demosaic.o \
+  object/dht_demosaic.o  object/aahd_demosaic.o  object/dcb_demosaic.o \
+  object/file_write.o \
+  object/ext_preprocess.o   object/apply_profile.o
+
+
+LIB_MT_OBJECTS= object/libraw_datastream.mt.o object/libraw_c_api.mt.o \
+  object/cameralist.mt.o object/fuji_compressed.mt.o \
+  object/crx.mt.o object/fp_dng.mt.o object/decoders_libraw.mt.o \
+  object/unpack.mt.o object/unpack_thumb.mt.o \
+  object/rawspeed_glue.mt.o object/dngsdk_glue.mt.o \
+  object/colorconst.mt.o object/utils_libraw.mt.o \
+  object/init_close_utils.mt.o \
+  object/decoder_info.mt.o object/open.mt.o object/phaseone_processing.mt.o \
+  object/thumb_utils.mt.o \
+  object/tiff_writer.mt.o object/subtract_black.mt.o \
+  object/postprocessing_utils.mt.o object/dcraw_process.mt.o \
+  object/raw2image.mt.o object/mem_image.mt.o \
+  object/x3f_utils_patched.mt.o object/x3f_parse_process.mt.o \
+  object/read_utils.mt.o object/curves.mt.o object/utils_dcraw.mt.o \
+  object/colordata.mt.o \
+  object/canon_600.mt.o  object/decoders_dcraw.mt.o \
+  object/decoders_libraw_dcrdefs.mt.o  object/generic.mt.o \
+  object/kodak_decoders.mt.o object/dng.mt.o object/smal.mt.o \
+  object/load_mfbacks.mt.o \
+  object/sony.mt.o object/nikon.mt.o object/samsung.mt.o \
+  object/cr3_parser.mt.o object/canon.mt.o  object/epson.mt.o \
+  object/olympus.mt.o object/leica.mt.o \
+  object/fuji.mt.o object/adobepano.mt.o object/pentax.mt.o object/p1.mt.o \
+  object/makernotes.mt.o object/exif_gps.mt.o object/kodak.mt.o \
+  object/tiff.mt.o object/ciff.mt.o object/mediumformat.mt.o \
+  object/minolta.mt.o \
+  object/identify_tools.mt.o \
+  object/hasselblad_model.o object/normalize_model.mt.o object/identify.mt.o \
+  object/misc_parsers.mt.o object/wblists.mt.o \
+  object/postprocessing_aux.mt.o object/postprocessing_utils_dcrdefs.mt.o \
+  object/aspect_ratio.mt.o \
+  object/misc_demosaic.mt.o object/xtrans_demosaic.mt.o \
+  object/ahd_demosaic.mt.o object/dht_demosaic.mt.o \
+  object/aahd_demosaic.mt.o object/dcb_demosaic.mt.o \
+  object/file_write.mt.o \
+  object/ext_preprocess.mt.o   object/apply_profile.mt.o
+
+
+LR_INCLUDES=libraw/libraw.h libraw/libraw_alloc.h \
+  libraw/libraw_const.h libraw/libraw_datastream.h \
+  libraw/libraw_internal.h libraw/libraw_types.h \
+  libraw/libraw_version.h
+
+library: lib/libraw.a lib/libraw_r.a
+
+all_samples: bin/raw-identify bin/simple_dcraw  bin/dcraw_emu bin/dcraw_half bin/half_mt bin/mem_image \
+             bin/unprocessed_raw bin/4channels bin/multirender_test bin/postprocessing_benchmark \
+	     bin/rawtextdump
+
+install: library
+	@if [ -d /usr/local/include ] ; then cp -R libraw /usr/local/include/ ; else echo 'no /usr/local/include' ; fi
+	@if [ -d /usr/local/lib ] ; then cp lib/libraw.a lib/libraw_r.a /usr/local/lib/ ; else echo 'no /usr/local/lib' ; fi
+
+install-binaries: all_samples
+	@if [ -d /usr/local/bin ] ; then cp bin/[a-z]* /usr/local/bin/ ; else echo 'no /usr/local/bin' ; fi
+
+
+## RawSpeed xml file
+
+RawSpeed/rawspeed_xmldata.cpp: ${RAWSPEED_DATA}
+	./rsxml2c.sh ${RAWSPEED_DATA} > RawSpeed/rawspeed_xmldata.cpp
+
+#binaries
+
+bin/raw-identify: lib/libraw.a samples/raw-identify.cpp
+	${CXX} -DLIBRAW_NOTHREADS  ${CFLAGS} -o bin/raw-identify samples/raw-identify.cpp -L./lib -lraw  -lm ${LDADD}
+
+bin/unprocessed_raw: lib/libraw.a samples/unprocessed_raw.cpp
+	${CXX} -DLIBRAW_NOTHREADS  ${CFLAGS} -o bin/unprocessed_raw samples/unprocessed_raw.cpp -L./lib -lraw  -lm  ${LDADD}
+
+bin/4channels: lib/libraw.a samples/4channels.cpp
+	${CXX} -DLIBRAW_NOTHREADS  ${CFLAGS} -o bin/4channels samples/4channels.cpp -L./lib -lraw  -lm  ${LDADD}
+
+bin/rawtextdump: lib/libraw.a samples/rawtextdump.cpp
+	${CXX} -DLIBRAW_NOTHREADS  ${CFLAGS} -o bin/rawtextdump samples/rawtextdump.cpp -L./lib -lraw  -lm  ${LDADD}
+
+bin/simple_dcraw: lib/libraw.a samples/simple_dcraw.cpp
+	${CXX} -DLIBRAW_NOTHREADS   ${CFLAGS} -o bin/simple_dcraw samples/simple_dcraw.cpp -L./lib -lraw  -lm  ${LDADD}
+
+bin/multirender_test: lib/libraw.a samples/multirender_test.cpp
+	${CXX} -DLIBRAW_NOTHREADS   ${CFLAGS} -o bin/multirender_test samples/multirender_test.cpp -L./lib -lraw  -lm  ${LDADD}
+
+bin/postprocessing_benchmark: lib/libraw.a samples/postprocessing_benchmark.cpp
+	${CXX} -DLIBRAW_NOTHREADS   ${CFLAGS} -o bin/postprocessing_benchmark samples/postprocessing_benchmark.cpp -L./lib -lraw  -lm  ${LDADD}
+
+bin/mem_image: lib/libraw.a samples/mem_image_sample.cpp
+	${CXX} -DLIBRAW_NOTHREADS  ${CFLAGS} -o bin/mem_image samples/mem_image_sample.cpp -L./lib -lraw  -lm  ${LDADD}
+
+bin/dcraw_half: lib/libraw.a object/dcraw_half.o
+	${CC} -DLIBRAW_NOTHREADS  ${CFLAGS} -o bin/dcraw_half object/dcraw_half.o -L./lib -lraw  -lm -lstdc++  ${LDADD}
+
+bin/half_mt: lib/libraw_r.a object/half_mt.o
+	${CC}   -pthread ${CFLAGS} -o bin/half_mt object/half_mt.o -L./lib -lraw_r  -lm -lstdc++  ${LDADD}
+
+bin/dcraw_emu: lib/libraw.a samples/dcraw_emu.cpp
+	${CXX} -DLIBRAW_NOTHREADS  ${CFLAGS} -o bin/dcraw_emu samples/dcraw_emu.cpp -L./lib -lraw  -lm  ${LDADD}
+
+#objects
+
+object/dcraw_half.o: samples/dcraw_half.c
+	${CC} -c -DLIBRAW_NOTHREADS   ${CFLAGS} -o object/dcraw_half.o samples/dcraw_half.c
+
+object/half_mt.o: samples/half_mt.c
+	${CC} -c -pthread   ${CFLAGS} -o object/half_mt.o samples/half_mt.c
+
+
+lib/libraw.a: ${LIB_OBJECTS}
+	rm -f lib/libraw.a
+	ar crv lib/libraw.a ${LIB_OBJECTS}
+	ranlib lib/libraw.a
+
+lib/libraw_r.a: ${LIB_MT_OBJECTS}
+	rm -f lib/libraw_r.a
+	ar crv lib/libraw_r.a ${LIB_MT_OBJECTS}
+	ranlib lib/libraw_r.a
+
+clean:
+	rm -fr bin/*.dSYM
+	rm -f *.o *~ src/*~ samples/*~ internal/*~ libraw/*~ lib/lib*.a bin/[4a-z]* object/*o dcraw/*~ doc/*~ bin/*~ src/*/*~
+
+### generated
+object/libraw_c_api.o: src/libraw_c_api.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/libraw_c_api.o src/libraw_c_api.cpp
+object/libraw_c_api.mt.o: src/libraw_c_api.cpp
+	${CXX} -c ${CFLAGS} -o object/libraw_c_api.mt.o src/libraw_c_api.cpp
+object/libraw_datastream.o: src/libraw_datastream.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/libraw_datastream.o src/libraw_datastream.cpp
+object/libraw_datastream.mt.o: src/libraw_datastream.cpp
+	${CXX} -c ${CFLAGS} -o object/libraw_datastream.mt.o src/libraw_datastream.cpp
+object/canon_600.o: src/decoders/canon_600.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/canon_600.o src/decoders/canon_600.cpp
+object/canon_600.mt.o: src/decoders/canon_600.cpp
+	${CXX} -c ${CFLAGS} -o object/canon_600.mt.o src/decoders/canon_600.cpp
+object/crx.o: src/decoders/crx.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/crx.o src/decoders/crx.cpp
+object/crx.mt.o: src/decoders/crx.cpp
+	${CXX} -c ${CFLAGS} -o object/crx.mt.o src/decoders/crx.cpp
+object/decoders_dcraw.o: src/decoders/decoders_dcraw.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/decoders_dcraw.o src/decoders/decoders_dcraw.cpp
+object/decoders_dcraw.mt.o: src/decoders/decoders_dcraw.cpp
+	${CXX} -c ${CFLAGS} -o object/decoders_dcraw.mt.o src/decoders/decoders_dcraw.cpp
+object/decoders_libraw_dcrdefs.o: src/decoders/decoders_libraw_dcrdefs.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/decoders_libraw_dcrdefs.o src/decoders/decoders_libraw_dcrdefs.cpp
+object/decoders_libraw_dcrdefs.mt.o: src/decoders/decoders_libraw_dcrdefs.cpp
+	${CXX} -c ${CFLAGS} -o object/decoders_libraw_dcrdefs.mt.o src/decoders/decoders_libraw_dcrdefs.cpp
+object/decoders_libraw.o: src/decoders/decoders_libraw.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/decoders_libraw.o src/decoders/decoders_libraw.cpp
+object/decoders_libraw.mt.o: src/decoders/decoders_libraw.cpp
+	${CXX} -c ${CFLAGS} -o object/decoders_libraw.mt.o src/decoders/decoders_libraw.cpp
+object/dng.o: src/decoders/dng.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/dng.o src/decoders/dng.cpp
+object/dng.mt.o: src/decoders/dng.cpp
+	${CXX} -c ${CFLAGS} -o object/dng.mt.o src/decoders/dng.cpp
+object/fp_dng.o: src/decoders/fp_dng.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/fp_dng.o src/decoders/fp_dng.cpp
+object/fp_dng.mt.o: src/decoders/fp_dng.cpp
+	${CXX} -c ${CFLAGS} -o object/fp_dng.mt.o src/decoders/fp_dng.cpp
+object/fuji_compressed.o: src/decoders/fuji_compressed.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/fuji_compressed.o src/decoders/fuji_compressed.cpp
+object/fuji_compressed.mt.o: src/decoders/fuji_compressed.cpp
+	${CXX} -c ${CFLAGS} -o object/fuji_compressed.mt.o src/decoders/fuji_compressed.cpp
+object/generic.o: src/decoders/generic.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/generic.o src/decoders/generic.cpp
+object/generic.mt.o: src/decoders/generic.cpp
+	${CXX} -c ${CFLAGS} -o object/generic.mt.o src/decoders/generic.cpp
+object/kodak_decoders.o: src/decoders/kodak_decoders.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/kodak_decoders.o src/decoders/kodak_decoders.cpp
+object/kodak_decoders.mt.o: src/decoders/kodak_decoders.cpp
+	${CXX} -c ${CFLAGS} -o object/kodak_decoders.mt.o src/decoders/kodak_decoders.cpp
+object/load_mfbacks.o: src/decoders/load_mfbacks.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/load_mfbacks.o src/decoders/load_mfbacks.cpp
+object/load_mfbacks.mt.o: src/decoders/load_mfbacks.cpp
+	${CXX} -c ${CFLAGS} -o object/load_mfbacks.mt.o src/decoders/load_mfbacks.cpp
+object/smal.o: src/decoders/smal.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/smal.o src/decoders/smal.cpp
+object/smal.mt.o: src/decoders/smal.cpp
+	${CXX} -c ${CFLAGS} -o object/smal.mt.o src/decoders/smal.cpp
+object/unpack_thumb.o: src/decoders/unpack_thumb.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/unpack_thumb.o src/decoders/unpack_thumb.cpp
+object/unpack_thumb.mt.o: src/decoders/unpack_thumb.cpp
+	${CXX} -c ${CFLAGS} -o object/unpack_thumb.mt.o src/decoders/unpack_thumb.cpp
+object/unpack.o: src/decoders/unpack.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/unpack.o src/decoders/unpack.cpp
+object/unpack.mt.o: src/decoders/unpack.cpp
+	${CXX} -c ${CFLAGS} -o object/unpack.mt.o src/decoders/unpack.cpp
+object/aahd_demosaic.o: src/demosaic/aahd_demosaic.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/aahd_demosaic.o src/demosaic/aahd_demosaic.cpp
+object/aahd_demosaic.mt.o: src/demosaic/aahd_demosaic.cpp
+	${CXX} -c ${CFLAGS} -o object/aahd_demosaic.mt.o src/demosaic/aahd_demosaic.cpp
+object/ahd_demosaic.o: src/demosaic/ahd_demosaic.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/ahd_demosaic.o src/demosaic/ahd_demosaic.cpp
+object/ahd_demosaic.mt.o: src/demosaic/ahd_demosaic.cpp
+	${CXX} -c ${CFLAGS} -o object/ahd_demosaic.mt.o src/demosaic/ahd_demosaic.cpp
+object/dcb_demosaic.o: src/demosaic/dcb_demosaic.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/dcb_demosaic.o src/demosaic/dcb_demosaic.cpp
+object/dcb_demosaic.mt.o: src/demosaic/dcb_demosaic.cpp
+	${CXX} -c ${CFLAGS} -o object/dcb_demosaic.mt.o src/demosaic/dcb_demosaic.cpp
+object/dht_demosaic.o: src/demosaic/dht_demosaic.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/dht_demosaic.o src/demosaic/dht_demosaic.cpp
+object/dht_demosaic.mt.o: src/demosaic/dht_demosaic.cpp
+	${CXX} -c ${CFLAGS} -o object/dht_demosaic.mt.o src/demosaic/dht_demosaic.cpp
+object/misc_demosaic.o: src/demosaic/misc_demosaic.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/misc_demosaic.o src/demosaic/misc_demosaic.cpp
+object/misc_demosaic.mt.o: src/demosaic/misc_demosaic.cpp
+	${CXX} -c ${CFLAGS} -o object/misc_demosaic.mt.o src/demosaic/misc_demosaic.cpp
+object/xtrans_demosaic.o: src/demosaic/xtrans_demosaic.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/xtrans_demosaic.o src/demosaic/xtrans_demosaic.cpp
+object/xtrans_demosaic.mt.o: src/demosaic/xtrans_demosaic.cpp
+	${CXX} -c ${CFLAGS} -o object/xtrans_demosaic.mt.o src/demosaic/xtrans_demosaic.cpp
+object/dngsdk_glue.o: src/integration/dngsdk_glue.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/dngsdk_glue.o src/integration/dngsdk_glue.cpp
+object/dngsdk_glue.mt.o: src/integration/dngsdk_glue.cpp
+	${CXX} -c ${CFLAGS} -o object/dngsdk_glue.mt.o src/integration/dngsdk_glue.cpp
+object/rawspeed_glue.o: src/integration/rawspeed_glue.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/rawspeed_glue.o src/integration/rawspeed_glue.cpp
+object/rawspeed_glue.mt.o: src/integration/rawspeed_glue.cpp
+	${CXX} -c ${CFLAGS} -o object/rawspeed_glue.mt.o src/integration/rawspeed_glue.cpp
+object/adobepano.o: src/metadata/adobepano.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/adobepano.o src/metadata/adobepano.cpp
+object/adobepano.mt.o: src/metadata/adobepano.cpp
+	${CXX} -c ${CFLAGS} -o object/adobepano.mt.o src/metadata/adobepano.cpp
+object/canon.o: src/metadata/canon.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/canon.o src/metadata/canon.cpp
+object/canon.mt.o: src/metadata/canon.cpp
+	${CXX} -c ${CFLAGS} -o object/canon.mt.o src/metadata/canon.cpp
+object/ciff.o: src/metadata/ciff.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/ciff.o src/metadata/ciff.cpp
+object/ciff.mt.o: src/metadata/ciff.cpp
+	${CXX} -c ${CFLAGS} -o object/ciff.mt.o src/metadata/ciff.cpp
+object/cr3_parser.o: src/metadata/cr3_parser.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/cr3_parser.o src/metadata/cr3_parser.cpp
+object/cr3_parser.mt.o: src/metadata/cr3_parser.cpp
+	${CXX} -c ${CFLAGS} -o object/cr3_parser.mt.o src/metadata/cr3_parser.cpp
+object/epson.o: src/metadata/epson.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/epson.o src/metadata/epson.cpp
+object/epson.mt.o: src/metadata/epson.cpp
+	${CXX} -c ${CFLAGS} -o object/epson.mt.o src/metadata/epson.cpp
+object/exif_gps.o: src/metadata/exif_gps.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/exif_gps.o src/metadata/exif_gps.cpp
+object/exif_gps.mt.o: src/metadata/exif_gps.cpp
+	${CXX} -c ${CFLAGS} -o object/exif_gps.mt.o src/metadata/exif_gps.cpp
+object/fuji.o: src/metadata/fuji.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/fuji.o src/metadata/fuji.cpp
+object/fuji.mt.o: src/metadata/fuji.cpp
+	${CXX} -c ${CFLAGS} -o object/fuji.mt.o src/metadata/fuji.cpp
+object/identify_tools.o: src/metadata/identify_tools.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/identify_tools.o src/metadata/identify_tools.cpp
+object/identify_tools.mt.o: src/metadata/identify_tools.cpp
+	${CXX} -c ${CFLAGS} -o object/identify_tools.mt.o src/metadata/identify_tools.cpp
+object/identify.o: src/metadata/identify.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/identify.o src/metadata/identify.cpp
+object/identify.mt.o: src/metadata/identify.cpp
+	${CXX} -c ${CFLAGS} -o object/identify.mt.o src/metadata/identify.cpp
+object/kodak.o: src/metadata/kodak.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/kodak.o src/metadata/kodak.cpp
+object/kodak.mt.o: src/metadata/kodak.cpp
+	${CXX} -c ${CFLAGS} -o object/kodak.mt.o src/metadata/kodak.cpp
+object/leica.o: src/metadata/leica.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/leica.o src/metadata/leica.cpp
+object/leica.mt.o: src/metadata/leica.cpp
+	${CXX} -c ${CFLAGS} -o object/leica.mt.o src/metadata/leica.cpp
+object/makernotes.o: src/metadata/makernotes.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/makernotes.o src/metadata/makernotes.cpp
+object/makernotes.mt.o: src/metadata/makernotes.cpp
+	${CXX} -c ${CFLAGS} -o object/makernotes.mt.o src/metadata/makernotes.cpp
+object/mediumformat.o: src/metadata/mediumformat.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/mediumformat.o src/metadata/mediumformat.cpp
+object/mediumformat.mt.o: src/metadata/mediumformat.cpp
+	${CXX} -c ${CFLAGS} -o object/mediumformat.mt.o src/metadata/mediumformat.cpp
+object/minolta.o: src/metadata/minolta.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/minolta.o src/metadata/minolta.cpp
+object/minolta.mt.o: src/metadata/minolta.cpp
+	${CXX} -c ${CFLAGS} -o object/minolta.mt.o src/metadata/minolta.cpp
+object/misc_parsers.o: src/metadata/misc_parsers.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/misc_parsers.o src/metadata/misc_parsers.cpp
+object/misc_parsers.mt.o: src/metadata/misc_parsers.cpp
+	${CXX} -c ${CFLAGS} -o object/misc_parsers.mt.o src/metadata/misc_parsers.cpp
+object/nikon.o: src/metadata/nikon.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/nikon.o src/metadata/nikon.cpp
+object/nikon.mt.o: src/metadata/nikon.cpp
+	${CXX} -c ${CFLAGS} -o object/nikon.mt.o src/metadata/nikon.cpp
+object/hasselblad_model.o: src/metadata/hasselblad_model.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/hasselblad_model.o src/metadata/hasselblad_model.cpp
+object/hasselblad_model.mt.o: src/metadata/hasselblad_model.cpp
+	${CXX} -c ${CFLAGS} -o object/hasselblad_model.mt.o src/metadata/hasselblad_model.cpp
+object/normalize_model.o: src/metadata/normalize_model.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/normalize_model.o src/metadata/normalize_model.cpp
+object/normalize_model.mt.o: src/metadata/normalize_model.cpp
+	${CXX} -c ${CFLAGS} -o object/normalize_model.mt.o src/metadata/normalize_model.cpp
+object/olympus.o: src/metadata/olympus.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/olympus.o src/metadata/olympus.cpp
+object/olympus.mt.o: src/metadata/olympus.cpp
+	${CXX} -c ${CFLAGS} -o object/olympus.mt.o src/metadata/olympus.cpp
+object/p1.o: src/metadata/p1.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/p1.o src/metadata/p1.cpp
+object/p1.mt.o: src/metadata/p1.cpp
+	${CXX} -c ${CFLAGS} -o object/p1.mt.o src/metadata/p1.cpp
+object/pentax.o: src/metadata/pentax.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/pentax.o src/metadata/pentax.cpp
+object/pentax.mt.o: src/metadata/pentax.cpp
+	${CXX} -c ${CFLAGS} -o object/pentax.mt.o src/metadata/pentax.cpp
+object/samsung.o: src/metadata/samsung.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/samsung.o src/metadata/samsung.cpp
+object/samsung.mt.o: src/metadata/samsung.cpp
+	${CXX} -c ${CFLAGS} -o object/samsung.mt.o src/metadata/samsung.cpp
+object/sony.o: src/metadata/sony.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/sony.o src/metadata/sony.cpp
+object/sony.mt.o: src/metadata/sony.cpp
+	${CXX} -c ${CFLAGS} -o object/sony.mt.o src/metadata/sony.cpp
+object/tiff.o: src/metadata/tiff.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/tiff.o src/metadata/tiff.cpp
+object/tiff.mt.o: src/metadata/tiff.cpp
+	${CXX} -c ${CFLAGS} -o object/tiff.mt.o src/metadata/tiff.cpp
+object/aspect_ratio.o: src/postprocessing/aspect_ratio.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/aspect_ratio.o src/postprocessing/aspect_ratio.cpp
+object/aspect_ratio.mt.o: src/postprocessing/aspect_ratio.cpp
+	${CXX} -c ${CFLAGS} -o object/aspect_ratio.mt.o src/postprocessing/aspect_ratio.cpp
+object/dcraw_process.o: src/postprocessing/dcraw_process.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/dcraw_process.o src/postprocessing/dcraw_process.cpp
+object/dcraw_process.mt.o: src/postprocessing/dcraw_process.cpp
+	${CXX} -c ${CFLAGS} -o object/dcraw_process.mt.o src/postprocessing/dcraw_process.cpp
+object/mem_image.o: src/postprocessing/mem_image.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/mem_image.o src/postprocessing/mem_image.cpp
+object/mem_image.mt.o: src/postprocessing/mem_image.cpp
+	${CXX} -c ${CFLAGS} -o object/mem_image.mt.o src/postprocessing/mem_image.cpp
+object/postprocessing_aux.o: src/postprocessing/postprocessing_aux.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/postprocessing_aux.o src/postprocessing/postprocessing_aux.cpp
+object/postprocessing_aux.mt.o: src/postprocessing/postprocessing_aux.cpp
+	${CXX} -c ${CFLAGS} -o object/postprocessing_aux.mt.o src/postprocessing/postprocessing_aux.cpp
+object/postprocessing_utils_dcrdefs.o: src/postprocessing/postprocessing_utils_dcrdefs.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/postprocessing_utils_dcrdefs.o src/postprocessing/postprocessing_utils_dcrdefs.cpp
+object/postprocessing_utils_dcrdefs.mt.o: src/postprocessing/postprocessing_utils_dcrdefs.cpp
+	${CXX} -c ${CFLAGS} -o object/postprocessing_utils_dcrdefs.mt.o src/postprocessing/postprocessing_utils_dcrdefs.cpp
+object/postprocessing_utils.o: src/postprocessing/postprocessing_utils.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/postprocessing_utils.o src/postprocessing/postprocessing_utils.cpp
+object/postprocessing_utils.mt.o: src/postprocessing/postprocessing_utils.cpp
+	${CXX} -c ${CFLAGS} -o object/postprocessing_utils.mt.o src/postprocessing/postprocessing_utils.cpp
+object/raw2image.o: src/preprocessing/raw2image.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/raw2image.o src/preprocessing/raw2image.cpp
+object/raw2image.mt.o: src/preprocessing/raw2image.cpp
+	${CXX} -c ${CFLAGS} -o object/raw2image.mt.o src/preprocessing/raw2image.cpp
+object/ext_preprocess.o: src/preprocessing/ext_preprocess.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/ext_preprocess.o src/preprocessing/ext_preprocess.cpp
+object/ext_preprocess.mt.o: src/preprocessing/ext_preprocess.cpp
+	${CXX} -c ${CFLAGS} -o object/ext_preprocess.mt.o src/preprocessing/ext_preprocess.cpp
+object/subtract_black.o: src/preprocessing/subtract_black.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/subtract_black.o src/preprocessing/subtract_black.cpp
+object/subtract_black.mt.o: src/preprocessing/subtract_black.cpp
+	${CXX} -c ${CFLAGS} -o object/subtract_black.mt.o src/preprocessing/subtract_black.cpp
+object/cameralist.o: src/tables/cameralist.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/cameralist.o src/tables/cameralist.cpp
+object/cameralist.mt.o: src/tables/cameralist.cpp
+	${CXX} -c ${CFLAGS} -o object/cameralist.mt.o src/tables/cameralist.cpp
+object/colorconst.o: src/tables/colorconst.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/colorconst.o src/tables/colorconst.cpp
+object/colorconst.mt.o: src/tables/colorconst.cpp
+	${CXX} -c ${CFLAGS} -o object/colorconst.mt.o src/tables/colorconst.cpp
+object/colordata.o: src/tables/colordata.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/colordata.o src/tables/colordata.cpp
+object/colordata.mt.o: src/tables/colordata.cpp
+	${CXX} -c ${CFLAGS} -o object/colordata.mt.o src/tables/colordata.cpp
+object/wblists.o: src/tables/wblists.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/wblists.o src/tables/wblists.cpp
+object/wblists.mt.o: src/tables/wblists.cpp
+	${CXX} -c ${CFLAGS} -o object/wblists.mt.o src/tables/wblists.cpp
+object/curves.o: src/utils/curves.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/curves.o src/utils/curves.cpp
+object/curves.mt.o: src/utils/curves.cpp
+	${CXX} -c ${CFLAGS} -o object/curves.mt.o src/utils/curves.cpp
+object/decoder_info.o: src/utils/decoder_info.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/decoder_info.o src/utils/decoder_info.cpp
+object/decoder_info.mt.o: src/utils/decoder_info.cpp
+	${CXX} -c ${CFLAGS} -o object/decoder_info.mt.o src/utils/decoder_info.cpp
+object/init_close_utils.o: src/utils/init_close_utils.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/init_close_utils.o src/utils/init_close_utils.cpp
+object/init_close_utils.mt.o: src/utils/init_close_utils.cpp
+	${CXX} -c ${CFLAGS} -o object/init_close_utils.mt.o src/utils/init_close_utils.cpp
+object/open.o: src/utils/open.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/open.o src/utils/open.cpp
+object/open.mt.o: src/utils/open.cpp
+	${CXX} -c ${CFLAGS} -o object/open.mt.o src/utils/open.cpp
+object/phaseone_processing.o: src/utils/phaseone_processing.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/phaseone_processing.o src/utils/phaseone_processing.cpp
+object/phaseone_processing.mt.o: src/utils/phaseone_processing.cpp
+	${CXX} -c ${CFLAGS} -o object/phaseone_processing.mt.o src/utils/phaseone_processing.cpp
+object/read_utils.o: src/utils/read_utils.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/read_utils.o src/utils/read_utils.cpp
+object/read_utils.mt.o: src/utils/read_utils.cpp
+	${CXX} -c ${CFLAGS} -o object/read_utils.mt.o src/utils/read_utils.cpp
+object/thumb_utils.o: src/utils/thumb_utils.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/thumb_utils.o src/utils/thumb_utils.cpp
+object/thumb_utils.mt.o: src/utils/thumb_utils.cpp
+	${CXX} -c ${CFLAGS} -o object/thumb_utils.mt.o src/utils/thumb_utils.cpp
+object/utils_dcraw.o: src/utils/utils_dcraw.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/utils_dcraw.o src/utils/utils_dcraw.cpp
+object/utils_dcraw.mt.o: src/utils/utils_dcraw.cpp
+	${CXX} -c ${CFLAGS} -o object/utils_dcraw.mt.o src/utils/utils_dcraw.cpp
+object/utils_libraw.o: src/utils/utils_libraw.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/utils_libraw.o src/utils/utils_libraw.cpp
+object/utils_libraw.mt.o: src/utils/utils_libraw.cpp
+	${CXX} -c ${CFLAGS} -o object/utils_libraw.mt.o src/utils/utils_libraw.cpp
+object/apply_profile.o: src/write/apply_profile.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/apply_profile.o src/write/apply_profile.cpp
+object/apply_profile.mt.o: src/write/apply_profile.cpp
+	${CXX} -c ${CFLAGS} -o object/apply_profile.mt.o src/write/apply_profile.cpp
+object/file_write.o: src/write/file_write.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/file_write.o src/write/file_write.cpp
+object/file_write.mt.o: src/write/file_write.cpp
+	${CXX} -c ${CFLAGS} -o object/file_write.mt.o src/write/file_write.cpp
+object/tiff_writer.o: src/write/tiff_writer.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/tiff_writer.o src/write/tiff_writer.cpp
+object/tiff_writer.mt.o: src/write/tiff_writer.cpp
+	${CXX} -c ${CFLAGS} -o object/tiff_writer.mt.o src/write/tiff_writer.cpp
+object/x3f_parse_process.o: src/x3f/x3f_parse_process.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/x3f_parse_process.o src/x3f/x3f_parse_process.cpp
+object/x3f_parse_process.mt.o: src/x3f/x3f_parse_process.cpp
+	${CXX} -c ${CFLAGS} -o object/x3f_parse_process.mt.o src/x3f/x3f_parse_process.cpp
+object/x3f_utils_patched.o: src/x3f/x3f_utils_patched.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/x3f_utils_patched.o src/x3f/x3f_utils_patched.cpp
+object/x3f_utils_patched.mt.o: src/x3f/x3f_utils_patched.cpp
+	${CXX} -c ${CFLAGS} -o object/x3f_utils_patched.mt.o src/x3f/x3f_utils_patched.cpp

+ 297 - 0
raw.mod/libraw/Makefile.mingw

@@ -0,0 +1,297 @@
+all: library all_samples
+
+CFLAGS=-O3  -I. -w
+CC=gcc
+CXX=g++
+
+# OpenMP support
+#CFLAGS+=-fopenmp
+
+# RawSpeed Support
+#CFLAGS+=-pthread -DUSE_RAWSPEED -I../RawSpeed -I/usr/local/include/libxml2
+#LDADD+=-L../RawSpeed/RawSpeed -lrawspeed -L/usr/local/lib -ljpeg -lxml2
+#RAWSPEED_DATA=../RawSpeed/data/cameras.xml
+
+# DNG SDK Support
+# CFLAGS+=-DUSE_DNGSDK -I../dng_sdk/source
+# LDADDD+=-L../dng_sdk/release -ldng -lXMPCore -ljpeg -lz
+
+# Jasper support for RedCine
+#CFLAGS+=-DUSE_JASPER -I/usr/local/include
+#LDADD+=-L/usr/local/lib -ljasper
+
+# JPEG support for lossy DNG
+#CFLAGS+=-DUSE_JPEG -I/usr/local/include
+#LDADD+=-L/usr/local/lib -ljpeg
+# LIBJPEG8:
+#CFLAGS+=-DUSE_JPEG8
+
+# LCMS support
+#CFLAGS+=-DUSE_LCMS -I/usr/local/include
+#LDADD+=-L/usr/local/lib -llcms
+
+# LCMS2.x support
+#CFLAGS+=-DUSE_LCMS2 -I/usr/local/include
+#LDADD+=-L/usr/local/lib -llcms2
+
+CSTFLAGS=$(CFLAGS) -DLIBRAW_NOTHREADS
+
+LIB_OBJECTS= object/libraw_datastream.o object/libraw_c_api.o \
+  object/cameralist.o object/fuji_compressed.o \
+  object/crx.o object/fp_dng.o object/decoders_libraw.o \
+  object/unpack.o object/unpack_thumb.o \
+  object/rawspeed_glue.o object/dngsdk_glue.o \
+  object/colorconst.o object/utils_libraw.o object/init_close_utils.o \
+  object/decoder_info.o object/open.o object/phaseone_processing.o \
+  object/thumb_utils.o \
+  object/tiff_writer.o object/subtract_black.o object/postprocessing_utils.o \
+  object/dcraw_process.o object/raw2image.o object/mem_image.o \
+  object/x3f_utils_patched.o object/x3f_parse_process.o \
+  object/read_utils.o object/curves.o object/utils_dcraw.o \
+  object/colordata.o \
+  object/canon_600.o  object/decoders_dcraw.o \
+  object/decoders_libraw_dcrdefs.o  object/generic.o \
+  object/kodak_decoders.o object/dng.o object/smal.o \
+  object/load_mfbacks.o \
+  object/sony.o object/nikon.o object/samsung.o object/cr3_parser.o \
+  object/canon.o  object/epson.o object/olympus.o object/leica.o \
+  object/fuji.o object/adobepano.o object/pentax.o object/p1.o \
+  object/makernotes.o object/exif_gps.o object/kodak.o \
+  object/tiff.o object/ciff.o object/mediumformat.o object/minolta.o \
+  object/identify_tools.o \
+  object/hasselblad_model.o object/normalize_model.o object/identify.o \
+  object/misc_parsers.o object/wblists.o \
+  object/postprocessing_aux.o object/postprocessing_utils_dcrdefs.o \
+  object/aspect_ratio.o \
+  object/misc_demosaic.o object/xtrans_demosaic.o object/ahd_demosaic.o \
+  object/dht_demosaic.o  object/aahd_demosaic.o  object/dcb_demosaic.o \
+  object/file_write.o \
+  object/ext_preprocess.o   object/apply_profile.o
+
+
+
+LR_INCLUDES=libraw/libraw.h libraw/libraw_alloc.h \
+  libraw/libraw_const.h libraw/libraw_datastream.h \
+  libraw/libraw_internal.h libraw/libraw_types.h \
+  libraw/libraw_version.h
+
+library: lib/libraw.a
+
+all_samples: bin/raw-identify bin/simple_dcraw  bin/dcraw_emu bin/dcraw_half bin/mem_image \
+             bin/unprocessed_raw bin/4channels bin/multirender_test bin/postprocessing_benchmark \
+             bin/rawtextdump
+
+install: library
+	@if [ -d /usr/local/include ] ; then cp -R libraw /usr/local/include/ ; else echo 'no /usr/local/include' ; fi
+	@if [ -d /usr/local/lib ] ; then cp lib/libraw.a lib/libraw_r.a /usr/local/lib/ ; else echo 'no /usr/local/lib' ; fi
+
+install-binaries: all_samples
+	@if [ -d /usr/local/bin ] ; then cp bin/[a-z]* /usr/local/bin/ ; else echo 'no /usr/local/bin' ; fi
+
+
+#binaries
+
+bin/raw-identify: lib/libraw.a samples/raw-identify.cpp
+	${CXX} -DLIBRAW_NOTHREADS  ${CFLAGS} -o bin/raw-identify samples/raw-identify.cpp -L./lib -lraw  -lws2_32 -lm ${LDADD}
+
+bin/unprocessed_raw: lib/libraw.a samples/unprocessed_raw.cpp
+	${CXX} -DLIBRAW_NOTHREADS  ${CFLAGS} -o bin/unprocessed_raw samples/unprocessed_raw.cpp -L./lib -lraw  -lws2_32 -lm  ${LDADD}
+
+bin/4channels: lib/libraw.a samples/4channels.cpp
+	${CXX} -DLIBRAW_NOTHREADS  ${CFLAGS} -o bin/4channels samples/4channels.cpp -L./lib -lraw  -lws2_32 -lm  ${LDADD}
+
+bin/rawtextdump: lib/libraw.a samples/rawtextdump.cpp
+	${CXX} -DLIBRAW_NOTHREADS  ${CFLAGS} -o bin/rawtextdump samples/rawtextdump.cpp -L./lib -lraw  -lws2_32 -lm  ${LDADD}
+
+bin/simple_dcraw: lib/libraw.a samples/simple_dcraw.cpp
+	${CXX} -DLIBRAW_NOTHREADS   ${CFLAGS} -o bin/simple_dcraw samples/simple_dcraw.cpp -L./lib -lraw  -lws2_32 -lm  ${LDADD}
+
+bin/multirender_test: lib/libraw.a samples/multirender_test.cpp
+	${CXX} -DLIBRAW_NOTHREADS   ${CFLAGS} -o bin/multirender_test samples/multirender_test.cpp -L./lib -lraw  -lws2_32 -lm  ${LDADD}
+
+bin/postprocessing_benchmark: lib/libraw.a samples/postprocessing_benchmark.cpp
+	${CXX} -DLIBRAW_NOTHREADS   ${CFLAGS} -o bin/postprocessing_benchmark samples/postprocessing_benchmark.cpp -L./lib -lraw  -lws2_32 -lm  ${LDADD}
+
+bin/mem_image: lib/libraw.a samples/mem_image_sample.cpp
+	${CXX} -DLIBRAW_NOTHREADS  ${CFLAGS} -o bin/mem_image samples/mem_image_sample.cpp -L./lib -lraw  -lws2_32 -lm  ${LDADD}
+
+bin/dcraw_half: lib/libraw.a object/dcraw_half.o
+	${CC} -DLIBRAW_NOTHREADS  ${CFLAGS} -o bin/dcraw_half object/dcraw_half.o -L./lib -lraw  -lws2_32 -lm -lstdc++  ${LDADD}
+
+bin/dcraw_emu: lib/libraw.a samples/dcraw_emu.cpp
+	${CXX} -DLIBRAW_NOTHREADS  ${CFLAGS} -o bin/dcraw_emu samples/dcraw_emu.cpp -L./lib -lraw  -lws2_32 -lm  ${LDADD}
+
+#objects
+
+object/dcraw_half.o: samples/dcraw_half.c
+	${CC} -c -DLIBRAW_NOTHREADS   ${CFLAGS} -o object/dcraw_half.o samples/dcraw_half.c
+
+object/half_mt.o: samples/half_mt.c
+	${CC} -c -pthread   ${CFLAGS} -o object/half_mt.o samples/half_mt.c
+
+
+lib/libraw.a: ${LIB_OBJECTS}
+	rm -f lib/libraw.a
+	ar crv lib/libraw.a ${LIB_OBJECTS}
+	ranlib lib/libraw.a
+
+lib/libraw_r.a: ${LIB_MT_OBJECTS}
+	rm -f lib/libraw_r.a
+	ar crv lib/libraw_r.a ${LIB_MT_OBJECTS}
+	ranlib lib/libraw_r.a
+
+clean:
+	rm -fr bin/*.dSYM
+	rm -f *.o *~ src/*~ samples/*~ internal/*~ libraw/*~ lib/lib*.a bin/[4a-z]* object/*o dcraw/*~ doc/*~ bin/*~ src/*/*~
+
+### generated
+object/libraw_c_api.o: src/libraw_c_api.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/libraw_c_api.o src/libraw_c_api.cpp
+object/libraw_datastream.o: src/libraw_datastream.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/libraw_datastream.o src/libraw_datastream.cpp
+object/canon_600.o: src/decoders/canon_600.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/canon_600.o src/decoders/canon_600.cpp
+object/crx.o: src/decoders/crx.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/crx.o src/decoders/crx.cpp
+object/decoders_dcraw.o: src/decoders/decoders_dcraw.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/decoders_dcraw.o src/decoders/decoders_dcraw.cpp
+object/decoders_libraw_dcrdefs.o: src/decoders/decoders_libraw_dcrdefs.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/decoders_libraw_dcrdefs.o src/decoders/decoders_libraw_dcrdefs.cpp
+object/decoders_libraw.o: src/decoders/decoders_libraw.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/decoders_libraw.o src/decoders/decoders_libraw.cpp
+object/dng.o: src/decoders/dng.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/dng.o src/decoders/dng.cpp
+object/fp_dng.o: src/decoders/fp_dng.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/fp_dng.o src/decoders/fp_dng.cpp
+object/fuji_compressed.o: src/decoders/fuji_compressed.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/fuji_compressed.o src/decoders/fuji_compressed.cpp
+object/generic.o: src/decoders/generic.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/generic.o src/decoders/generic.cpp
+object/kodak_decoders.o: src/decoders/kodak_decoders.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/kodak_decoders.o src/decoders/kodak_decoders.cpp
+object/load_mfbacks.o: src/decoders/load_mfbacks.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/load_mfbacks.o src/decoders/load_mfbacks.cpp
+object/smal.o: src/decoders/smal.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/smal.o src/decoders/smal.cpp
+object/unpack_thumb.o: src/decoders/unpack_thumb.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/unpack_thumb.o src/decoders/unpack_thumb.cpp
+object/unpack.o: src/decoders/unpack.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/unpack.o src/decoders/unpack.cpp
+object/aahd_demosaic.o: src/demosaic/aahd_demosaic.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/aahd_demosaic.o src/demosaic/aahd_demosaic.cpp
+object/ahd_demosaic.o: src/demosaic/ahd_demosaic.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/ahd_demosaic.o src/demosaic/ahd_demosaic.cpp
+object/dcb_demosaic.o: src/demosaic/dcb_demosaic.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/dcb_demosaic.o src/demosaic/dcb_demosaic.cpp
+object/dht_demosaic.o: src/demosaic/dht_demosaic.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/dht_demosaic.o src/demosaic/dht_demosaic.cpp
+object/misc_demosaic.o: src/demosaic/misc_demosaic.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/misc_demosaic.o src/demosaic/misc_demosaic.cpp
+object/xtrans_demosaic.o: src/demosaic/xtrans_demosaic.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/xtrans_demosaic.o src/demosaic/xtrans_demosaic.cpp
+object/dngsdk_glue.o: src/integration/dngsdk_glue.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/dngsdk_glue.o src/integration/dngsdk_glue.cpp
+object/rawspeed_glue.o: src/integration/rawspeed_glue.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/rawspeed_glue.o src/integration/rawspeed_glue.cpp
+object/adobepano.o: src/metadata/adobepano.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/adobepano.o src/metadata/adobepano.cpp
+object/canon.o: src/metadata/canon.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/canon.o src/metadata/canon.cpp
+object/ciff.o: src/metadata/ciff.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/ciff.o src/metadata/ciff.cpp
+object/cr3_parser.o: src/metadata/cr3_parser.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/cr3_parser.o src/metadata/cr3_parser.cpp
+object/epson.o: src/metadata/epson.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/epson.o src/metadata/epson.cpp
+object/exif_gps.o: src/metadata/exif_gps.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/exif_gps.o src/metadata/exif_gps.cpp
+object/fuji.o: src/metadata/fuji.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/fuji.o src/metadata/fuji.cpp
+object/identify_tools.o: src/metadata/identify_tools.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/identify_tools.o src/metadata/identify_tools.cpp
+object/identify.o: src/metadata/identify.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/identify.o src/metadata/identify.cpp
+object/kodak.o: src/metadata/kodak.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/kodak.o src/metadata/kodak.cpp
+object/leica.o: src/metadata/leica.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/leica.o src/metadata/leica.cpp
+object/makernotes.o: src/metadata/makernotes.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/makernotes.o src/metadata/makernotes.cpp
+object/mediumformat.o: src/metadata/mediumformat.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/mediumformat.o src/metadata/mediumformat.cpp
+object/minolta.o: src/metadata/minolta.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/minolta.o src/metadata/minolta.cpp
+object/misc_parsers.o: src/metadata/misc_parsers.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/misc_parsers.o src/metadata/misc_parsers.cpp
+object/nikon.o: src/metadata/nikon.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/nikon.o src/metadata/nikon.cpp
+object/hasselblad_model.o: src/metadata/hasselblad_model.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/hasselblad_model.o src/metadata/hasselblad_model.cpp
+object/normalize_model.o: src/metadata/normalize_model.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/normalize_model.o src/metadata/normalize_model.cpp
+object/olympus.o: src/metadata/olympus.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/olympus.o src/metadata/olympus.cpp
+object/p1.o: src/metadata/p1.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/p1.o src/metadata/p1.cpp
+object/pentax.o: src/metadata/pentax.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/pentax.o src/metadata/pentax.cpp
+object/samsung.o: src/metadata/samsung.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/samsung.o src/metadata/samsung.cpp
+object/sony.o: src/metadata/sony.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/sony.o src/metadata/sony.cpp
+object/tiff.o: src/metadata/tiff.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/tiff.o src/metadata/tiff.cpp
+object/aspect_ratio.o: src/postprocessing/aspect_ratio.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/aspect_ratio.o src/postprocessing/aspect_ratio.cpp
+object/dcraw_process.o: src/postprocessing/dcraw_process.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/dcraw_process.o src/postprocessing/dcraw_process.cpp
+object/mem_image.o: src/postprocessing/mem_image.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/mem_image.o src/postprocessing/mem_image.cpp
+object/postprocessing_aux.o: src/postprocessing/postprocessing_aux.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/postprocessing_aux.o src/postprocessing/postprocessing_aux.cpp
+object/postprocessing_utils_dcrdefs.o: src/postprocessing/postprocessing_utils_dcrdefs.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/postprocessing_utils_dcrdefs.o src/postprocessing/postprocessing_utils_dcrdefs.cpp
+object/postprocessing_utils.o: src/postprocessing/postprocessing_utils.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/postprocessing_utils.o src/postprocessing/postprocessing_utils.cpp
+object/raw2image.o: src/preprocessing/raw2image.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/raw2image.o src/preprocessing/raw2image.cpp
+object/ext_preprocess.o: src/preprocessing/ext_preprocess.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/ext_preprocess.o src/preprocessing/ext_preprocess.cpp
+object/subtract_black.o: src/preprocessing/subtract_black.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/subtract_black.o src/preprocessing/subtract_black.cpp
+object/cameralist.o: src/tables/cameralist.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/cameralist.o src/tables/cameralist.cpp
+object/colorconst.o: src/tables/colorconst.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/colorconst.o src/tables/colorconst.cpp
+object/colordata.o: src/tables/colordata.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/colordata.o src/tables/colordata.cpp
+object/wblists.o: src/tables/wblists.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/wblists.o src/tables/wblists.cpp
+object/curves.o: src/utils/curves.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/curves.o src/utils/curves.cpp
+object/decoder_info.o: src/utils/decoder_info.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/decoder_info.o src/utils/decoder_info.cpp
+object/init_close_utils.o: src/utils/init_close_utils.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/init_close_utils.o src/utils/init_close_utils.cpp
+object/open.o: src/utils/open.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/open.o src/utils/open.cpp
+object/phaseone_processing.o: src/utils/phaseone_processing.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/phaseone_processing.o src/utils/phaseone_processing.cpp
+object/read_utils.o: src/utils/read_utils.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/read_utils.o src/utils/read_utils.cpp
+object/thumb_utils.o: src/utils/thumb_utils.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/thumb_utils.o src/utils/thumb_utils.cpp
+object/utils_dcraw.o: src/utils/utils_dcraw.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/utils_dcraw.o src/utils/utils_dcraw.cpp
+object/utils_libraw.o: src/utils/utils_libraw.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/utils_libraw.o src/utils/utils_libraw.cpp
+object/apply_profile.o: src/write/apply_profile.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/apply_profile.o src/write/apply_profile.cpp
+object/file_write.o: src/write/file_write.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/file_write.o src/write/file_write.cpp
+object/tiff_writer.o: src/write/tiff_writer.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/tiff_writer.o src/write/tiff_writer.cpp
+object/x3f_parse_process.o: src/x3f/x3f_parse_process.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/x3f_parse_process.o src/x3f/x3f_parse_process.cpp
+object/x3f_utils_patched.o: src/x3f/x3f_utils_patched.cpp
+	${CXX} -c -DLIBRAW_NOTHREADS  ${CFLAGS} -o object/x3f_utils_patched.o src/x3f/x3f_utils_patched.cpp

+ 628 - 0
raw.mod/libraw/Makefile.msvc

@@ -0,0 +1,628 @@
+# Additional compiler flags (OpenMP, SSEx, AVX, ...)
+
+#COPT_OPT=/arch:SSE2 /arch:AVX
+
+# Compile with RawSpeed support
+#CFLAGS_RAWSPEED=/DUSE_RAWSPEED /I"..\\RawSpeed" /I"..\\RawSpeed\include" /I"..\\RawSpeed\include\libjpeg"
+#LDFLAGS_RAWSPEED=..\RawSpeed\lib\rawspeed.lib ..\RawSpeed\lib\libxml2.lib ..\RawSpeed\lib\iconv.lib ..\RawSpeed\lib\charset.lib ..\RawSpeed\lib\turbojpeg-static.lib
+
+# Compile with DNG SDK support
+#CFLAGS_DNG=/DUSE_DNGSDK /I"..\\dng_sdk\\source"
+#LDFLAGS_DNG=..\\dng_sdk\\release\\libdng.lib  ..\\dng_sdk\\release\\XMPCore.lib
+# you may also need to specify zlib.lib and jpeg.lib in the line above
+
+# LCMS 1.x support
+#LCMS_DEF=/DUSE_LCMS /DCMS_DLL /I..\lcms-1.19\include
+#LCMS_LIB=..\lcms-1.19\bin\lcms.lib
+
+# LCMS 2.x support
+#LCMS_DEF=/DUSE_LCMS2 /DCMS_DLL /I..\lcms2-2.3\include
+#LCMS_LIB=..\lcms2-2.3\bin\lcms2_dll.lib
+
+# JPEG support for DNG
+#JPEG_DEF=/DUSE_JPEG /I..\jpeg-8d
+#JPEG_LIB=..\jpeg-8d\Release\jpeg.lib
+
+
+SAMPLES=bin\raw-identify.exe bin\simple_dcraw.exe  bin\dcraw_emu.exe bin\dcraw_half.exe \
+        bin\half_mt.exe bin\mem_image.exe bin\unprocessed_raw.exe bin\4channels.exe \
+        bin\multirender_test.exe bin\postprocessing_benchmark.exe bin\openbayer_sample.exe \
+	bin\rawtextdump.exe
+
+LIBSTATIC=lib\libraw_static.lib
+DLL=bin\libraw.dll
+LIBDLL=lib\libraw.lib
+
+all: $(DLL) $(LIBSTATIC) $(SAMPLES)
+
+$(LIBDLL): $(DLL)
+
+# Guess LIBPATH from $INCLUDE
+
+LIB_OBJECTS= object\libraw_datastream_st.obj object\libraw_c_api_st.obj \
+  object\cameralist_st.obj object\fuji_compressed_st.obj \
+  object\crx_st.obj object\fp_dng_st.obj object\decoders_libraw_st.obj \
+  object\unpack_st.obj object\unpack_thumb_st.obj \
+  object\rawspeed_glue_st.obj object\dngsdk_glue_st.obj \
+  object\colorconst_st.obj object\utils_libraw_st.obj object\init_close_utils_st.obj \
+  object\decoder_info_st.obj object\open_st.obj object\phaseone_processing_st.obj \
+  object\thumb_utils_st.obj \
+  object\tiff_writer_st.obj object\subtract_black_st.obj object\postprocessing_utils_st.obj \
+  object\dcraw_process_st.obj object\raw2image_st.obj object\mem_image_st.obj \
+  object\x3f_utils_patched_st.obj object\x3f_parse_process_st.obj \
+  object\read_utils_st.obj object\curves_st.obj object\utils_dcraw_st.obj \
+  object\colordata_st.obj \
+  object\canon_600_st.obj  object\decoders_dcraw_st.obj \
+  object\decoders_libraw_dcrdefs_st.obj  object\generic_st.obj \
+  object\kodak_decoders_st.obj object\dng_st.obj object\smal_st.obj \
+  object\load_mfbacks_st.obj \
+  object\sony_st.obj object\nikon_st.obj object\samsung_st.obj object\cr3_parser_st.obj \
+  object\canon_st.obj  object\epson_st.obj object\olympus_st.obj object\leica_st.obj \
+  object\fuji_st.obj object\adobepano_st.obj object\pentax_st.obj object\p1_st.obj \
+  object\makernotes_st.obj object\exif_gps_st.obj object\kodak_st.obj \
+  object\tiff_st.obj object\ciff_st.obj object\mediumformat_st.obj object\minolta_st.obj \
+  object\identify_tools_st.obj \
+  object\hasselblad_model_st.obj object\normalize_model_st.obj object\identify_st.obj \
+  object\misc_parsers_st.obj object\wblists_st.obj \
+  object\postprocessing_aux_st.obj object\postprocessing_utils_dcrdefs_st.obj \
+  object\aspect_ratio_st.obj \
+  object\misc_demosaic_st.obj object\xtrans_demosaic_st.obj object\ahd_demosaic_st.obj \
+  object\dht_demosaic_st.obj  object\aahd_demosaic_st.obj  object\dcb_demosaic_st.obj \
+  object\file_write_st.obj \
+  object\ext_preprocess_st.obj   object\apply_profile_st.obj
+
+
+DLL_OBJECTS= object\libraw_datastream.obj object\libraw_c_api.obj \
+  object\cameralist.obj object\fuji_compressed.obj \
+  object\crx.obj object\fp_dng.obj object\decoders_libraw.obj \
+  object\unpack.obj object\unpack_thumb.obj \
+  object\rawspeed_glue.obj object\dngsdk_glue.obj \
+  object\colorconst.obj object\utils_libraw.obj \
+  object\init_close_utils.obj \
+  object\decoder_info.obj object\open.obj object\phaseone_processing.obj \
+  object\thumb_utils.obj \
+  object\tiff_writer.obj object\subtract_black.obj \
+  object\postprocessing_utils.obj object\dcraw_process.obj \
+  object\raw2image.obj object\mem_image.obj \
+  object\x3f_utils_patched.obj object\x3f_parse_process.obj \
+  object\read_utils.obj object\curves.obj object\utils_dcraw.obj \
+  object\colordata.obj \
+  object\canon_600.obj  object\decoders_dcraw.obj \
+  object\decoders_libraw_dcrdefs.obj  object\generic.obj \
+  object\kodak_decoders.obj object\dng.obj object\smal.obj \
+  object\load_mfbacks.obj \
+  object\sony.obj object\nikon.obj object\samsung.obj \
+  object\cr3_parser.obj object\canon.obj  object\epson.obj \
+  object\olympus.obj object\leica.obj \
+  object\fuji.obj object\adobepano.obj object\pentax.obj object\p1.obj \
+  object\makernotes.obj object\exif_gps.obj object\kodak.obj \
+  object\tiff.obj object\ciff.obj object\mediumformat.obj \
+  object\minolta.obj \
+  object\identify_tools.obj \
+  object\hasselblad_model.obj object\normalize_model.obj object\identify.obj \
+  object\misc_parsers.obj object\wblists.obj \
+  object\postprocessing_aux.obj object\postprocessing_utils_dcrdefs.obj \
+  object\aspect_ratio.obj \
+  object\misc_demosaic.obj object\xtrans_demosaic.obj \
+  object\ahd_demosaic.obj object\dht_demosaic.obj \
+  object\aahd_demosaic.obj object\dcb_demosaic.obj \
+  object\file_write.obj \
+  object\ext_preprocess.obj   object\apply_profile.obj
+
+
+CC=cl.exe
+COPT=/EHsc /MP /MD /I. /DWIN32 /O2 /W0 /nologo $(COPT_OPT) $(CFLAGSG2) $(CFLAGSG3) $(LCMS_DEF) $(JPEG_DEF) $(CFLAGS_RAWSPEED) $(CFLAGS_DNG)
+
+LINKLIB=$(LIBDLL) $(LDFLAGS_RAWSPEED) $(LDFLAGS_DNG)
+
+
+
+# Samples - default to dynamic (DLL) link, uncomment next lines
+#CFLAGS2=/DLIBRAW_NODLL
+#LINKLIB=$(LIBSTATIC)
+
+bin\raw-identify.exe: $(LINKLIB) samples\raw-identify.cpp
+	$(CC) $(COPT) $(CFLAGS2) /Fe"bin\\raw-identify.exe" /Fo"object\\" samples\raw-identify.cpp $(LINKLIB)
+
+bin\unprocessed_raw.exe: $(LINKLIB) samples\unprocessed_raw.cpp
+	$(CC) $(COPT) $(CFLAGS2) /Fe"bin\\unprocessed_raw.exe" /Fo"object\\" samples\unprocessed_raw.cpp $(LINKLIB) ws2_32.lib
+
+bin\4channels.exe: $(LINKLIB) samples\4channels.cpp
+	$(CC) $(COPT) $(CFLAGS2) /Fe"bin\\4channels.exe" /Fo"object\\" samples\4channels.cpp $(LINKLIB)
+
+bin\rawtextdump.exe: $(LINKLIB) samples\rawtextdump.cpp
+	$(CC) $(COPT) $(CFLAGS2) /Fe"bin\\rawtextdump.exe" /Fo"object\\" samples\rawtextdump.cpp $(LINKLIB)
+
+bin\simple_dcraw.exe: $(LINKLIB) samples\simple_dcraw.cpp
+	$(CC) $(COPT) $(CFLAGS2) /Fe"bin\\simple_dcraw.exe" /Fo"object\\" samples\simple_dcraw.cpp $(LINKLIB)
+
+bin\postprocessing_benchmark.exe: $(LINKLIB) samples\postprocessing_benchmark.cpp
+	$(CC) $(COPT) $(CFLAGS2) /Fe"bin\\postprocessing_benchmark.exe" /Fo"object\\" samples\postprocessing_benchmark.cpp $(LINKLIB)
+
+bin\multirender_test.exe: $(LINKLIB) samples\multirender_test.cpp
+	$(CC) $(COPT) $(CFLAGS2) /Fe"bin\\multirender_test.exe" /Fo"object\\" samples\multirender_test.cpp $(LINKLIB)
+
+bin\openbayer_sample.exe: $(LINKLIB) samples\openbayer_sample.cpp
+	$(CC) $(COPT) $(CFLAGS2) /Fe"bin\\openbayer_sample.exe" /Fo"object\\" samples\openbayer_sample.cpp $(LINKLIB)
+
+bin\mem_image.exe: $(LINKLIB) samples\mem_image_sample.cpp
+	$(CC) $(COPT) $(CFLAGS2) /Fe"bin\\mem_image.exe" /Fo"object\\" samples\mem_image_sample.cpp $(LINKLIB)
+
+bin\dcraw_emu.exe: $(LINKLIB) samples\dcraw_emu.cpp
+	$(CC) $(COPT) $(CFLAGS2) /Fe"bin\\dcraw_emu.exe" /Fo"object\\" samples\dcraw_emu.cpp $(LINKLIB)
+
+bin\dcraw_half.exe: $(LINKLIB) samples\dcraw_half.c
+	$(CC) $(COPT) $(CFLAGS2) /Fe"bin\\dcraw_half.exe" /Fo"object\\" samples\dcraw_half.c $(LINKLIB)
+
+bin\half_mt.exe: $(LINKLIB) samples\half_mt_win32.c
+	$(CC) $(COPT) $(CFLAGS2) /Fe"bin\\half_mt.exe" /Fo"object\\" samples\half_mt_win32.c $(LINKLIB)
+
+# DLL build
+
+$(DLL): $(DLL_OBJECTS)
+	-del /f $(DLL) $(LIBDLL)
+	cl $(COPT) /LD $(DLL_OBJECTS) $(LDFLAGS_RAWSPEED) $(LDFLAGS_DNG) $(LCMS_LIB) $(JPEG_LIB) /link /out:"$(DLL)" /implib:"$(LIBDLL)"
+
+# LIBRARY BUILD
+$(LIBSTATIC): $(LIB_OBJECTS)
+        -del /f $(LIBSTATIC)
+	lib /OUT:$(LIBSTATIC) /LTCG $(LIB_OBJECTS)
+
+# clean
+clean:
+	-del $(LIBSTATIC) $(LIBDLL) lib\*.exp
+	-del $(LIB_OBJECTS) $(DLL_OBJECTS)
+        -del object\*.o
+	-del $(DLL) $(SAMPLES)
+
+# OBJ generation rules
+object\canon_600_st.obj: src\decoders\canon_600.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\canon_600_st.obj" /c src\decoders\canon_600.cpp
+
+object\canon_600.obj: src\decoders\canon_600.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\canon_600.obj" /c src\decoders\canon_600.cpp
+
+object\crx_st.obj: src\decoders\crx.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\crx_st.obj" /c src\decoders\crx.cpp
+
+object\crx.obj: src\decoders\crx.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\crx.obj" /c src\decoders\crx.cpp
+
+object\decoders_dcraw_st.obj: src\decoders\decoders_dcraw.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\decoders_dcraw_st.obj" /c src\decoders\decoders_dcraw.cpp
+
+object\decoders_dcraw.obj: src\decoders\decoders_dcraw.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\decoders_dcraw.obj" /c src\decoders\decoders_dcraw.cpp
+
+object\decoders_libraw_dcrdefs_st.obj: src\decoders\decoders_libraw_dcrdefs.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\decoders_libraw_dcrdefs_st.obj" /c src\decoders\decoders_libraw_dcrdefs.cpp
+
+object\decoders_libraw_dcrdefs.obj: src\decoders\decoders_libraw_dcrdefs.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\decoders_libraw_dcrdefs.obj" /c src\decoders\decoders_libraw_dcrdefs.cpp
+
+object\decoders_libraw_st.obj: src\decoders\decoders_libraw.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\decoders_libraw_st.obj" /c src\decoders\decoders_libraw.cpp
+
+object\decoders_libraw.obj: src\decoders\decoders_libraw.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\decoders_libraw.obj" /c src\decoders\decoders_libraw.cpp
+
+object\dng_st.obj: src\decoders\dng.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\dng_st.obj" /c src\decoders\dng.cpp
+
+object\dng.obj: src\decoders\dng.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\dng.obj" /c src\decoders\dng.cpp
+
+object\fp_dng_st.obj: src\decoders\fp_dng.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\fp_dng_st.obj" /c src\decoders\fp_dng.cpp
+
+object\fp_dng.obj: src\decoders\fp_dng.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\fp_dng.obj" /c src\decoders\fp_dng.cpp
+
+object\fuji_compressed_st.obj: src\decoders\fuji_compressed.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\fuji_compressed_st.obj" /c src\decoders\fuji_compressed.cpp
+
+object\fuji_compressed.obj: src\decoders\fuji_compressed.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\fuji_compressed.obj" /c src\decoders\fuji_compressed.cpp
+
+object\generic_st.obj: src\decoders\generic.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\generic_st.obj" /c src\decoders\generic.cpp
+
+object\generic.obj: src\decoders\generic.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\generic.obj" /c src\decoders\generic.cpp
+
+object\kodak_decoders_st.obj: src\decoders\kodak_decoders.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\kodak_decoders_st.obj" /c src\decoders\kodak_decoders.cpp
+
+object\kodak_decoders.obj: src\decoders\kodak_decoders.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\kodak_decoders.obj" /c src\decoders\kodak_decoders.cpp
+
+object\load_mfbacks_st.obj: src\decoders\load_mfbacks.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\load_mfbacks_st.obj" /c src\decoders\load_mfbacks.cpp
+
+object\load_mfbacks.obj: src\decoders\load_mfbacks.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\load_mfbacks.obj" /c src\decoders\load_mfbacks.cpp
+
+object\smal_st.obj: src\decoders\smal.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\smal_st.obj" /c src\decoders\smal.cpp
+
+object\smal.obj: src\decoders\smal.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\smal.obj" /c src\decoders\smal.cpp
+
+object\unpack_thumb_st.obj: src\decoders\unpack_thumb.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\unpack_thumb_st.obj" /c src\decoders\unpack_thumb.cpp
+
+object\unpack_thumb.obj: src\decoders\unpack_thumb.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\unpack_thumb.obj" /c src\decoders\unpack_thumb.cpp
+
+object\unpack_st.obj: src\decoders\unpack.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\unpack_st.obj" /c src\decoders\unpack.cpp
+
+object\unpack.obj: src\decoders\unpack.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\unpack.obj" /c src\decoders\unpack.cpp
+
+object\aahd_demosaic_st.obj: src\demosaic\aahd_demosaic.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\aahd_demosaic_st.obj" /c src\demosaic\aahd_demosaic.cpp
+
+object\aahd_demosaic.obj: src\demosaic\aahd_demosaic.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\aahd_demosaic.obj" /c src\demosaic\aahd_demosaic.cpp
+
+object\ahd_demosaic_st.obj: src\demosaic\ahd_demosaic.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\ahd_demosaic_st.obj" /c src\demosaic\ahd_demosaic.cpp
+
+object\ahd_demosaic.obj: src\demosaic\ahd_demosaic.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\ahd_demosaic.obj" /c src\demosaic\ahd_demosaic.cpp
+
+object\dcb_demosaic_st.obj: src\demosaic\dcb_demosaic.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\dcb_demosaic_st.obj" /c src\demosaic\dcb_demosaic.cpp
+
+object\dcb_demosaic.obj: src\demosaic\dcb_demosaic.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\dcb_demosaic.obj" /c src\demosaic\dcb_demosaic.cpp
+
+object\dht_demosaic_st.obj: src\demosaic\dht_demosaic.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\dht_demosaic_st.obj" /c src\demosaic\dht_demosaic.cpp
+
+object\dht_demosaic.obj: src\demosaic\dht_demosaic.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\dht_demosaic.obj" /c src\demosaic\dht_demosaic.cpp
+
+object\misc_demosaic_st.obj: src\demosaic\misc_demosaic.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\misc_demosaic_st.obj" /c src\demosaic\misc_demosaic.cpp
+
+object\misc_demosaic.obj: src\demosaic\misc_demosaic.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\misc_demosaic.obj" /c src\demosaic\misc_demosaic.cpp
+
+object\xtrans_demosaic_st.obj: src\demosaic\xtrans_demosaic.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\xtrans_demosaic_st.obj" /c src\demosaic\xtrans_demosaic.cpp
+
+object\xtrans_demosaic.obj: src\demosaic\xtrans_demosaic.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\xtrans_demosaic.obj" /c src\demosaic\xtrans_demosaic.cpp
+
+object\dngsdk_glue_st.obj: src\integration\dngsdk_glue.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\dngsdk_glue_st.obj" /c src\integration\dngsdk_glue.cpp
+
+object\dngsdk_glue.obj: src\integration\dngsdk_glue.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\dngsdk_glue.obj" /c src\integration\dngsdk_glue.cpp
+
+object\rawspeed_glue_st.obj: src\integration\rawspeed_glue.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\rawspeed_glue_st.obj" /c src\integration\rawspeed_glue.cpp
+
+object\rawspeed_glue.obj: src\integration\rawspeed_glue.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\rawspeed_glue.obj" /c src\integration\rawspeed_glue.cpp
+
+object\adobepano_st.obj: src\metadata\adobepano.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\adobepano_st.obj" /c src\metadata\adobepano.cpp
+
+object\adobepano.obj: src\metadata\adobepano.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\adobepano.obj" /c src\metadata\adobepano.cpp
+
+object\canon_st.obj: src\metadata\canon.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\canon_st.obj" /c src\metadata\canon.cpp
+
+object\canon.obj: src\metadata\canon.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\canon.obj" /c src\metadata\canon.cpp
+
+object\ciff_st.obj: src\metadata\ciff.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\ciff_st.obj" /c src\metadata\ciff.cpp
+
+object\ciff.obj: src\metadata\ciff.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\ciff.obj" /c src\metadata\ciff.cpp
+
+object\cr3_parser_st.obj: src\metadata\cr3_parser.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\cr3_parser_st.obj" /c src\metadata\cr3_parser.cpp
+
+object\cr3_parser.obj: src\metadata\cr3_parser.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\cr3_parser.obj" /c src\metadata\cr3_parser.cpp
+
+object\epson_st.obj: src\metadata\epson.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\epson_st.obj" /c src\metadata\epson.cpp
+
+object\epson.obj: src\metadata\epson.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\epson.obj" /c src\metadata\epson.cpp
+
+object\exif_gps_st.obj: src\metadata\exif_gps.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\exif_gps_st.obj" /c src\metadata\exif_gps.cpp
+
+object\exif_gps.obj: src\metadata\exif_gps.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\exif_gps.obj" /c src\metadata\exif_gps.cpp
+
+object\fuji_st.obj: src\metadata\fuji.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\fuji_st.obj" /c src\metadata\fuji.cpp
+
+object\fuji.obj: src\metadata\fuji.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\fuji.obj" /c src\metadata\fuji.cpp
+
+object\identify_tools_st.obj: src\metadata\identify_tools.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\identify_tools_st.obj" /c src\metadata\identify_tools.cpp
+
+object\identify_tools.obj: src\metadata\identify_tools.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\identify_tools.obj" /c src\metadata\identify_tools.cpp
+
+object\identify_st.obj: src\metadata\identify.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\identify_st.obj" /c src\metadata\identify.cpp
+
+object\identify.obj: src\metadata\identify.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\identify.obj" /c src\metadata\identify.cpp
+
+object\kodak_st.obj: src\metadata\kodak.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\kodak_st.obj" /c src\metadata\kodak.cpp
+
+object\kodak.obj: src\metadata\kodak.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\kodak.obj" /c src\metadata\kodak.cpp
+
+object\leica_st.obj: src\metadata\leica.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\leica_st.obj" /c src\metadata\leica.cpp
+
+object\leica.obj: src\metadata\leica.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\leica.obj" /c src\metadata\leica.cpp
+
+object\makernotes_st.obj: src\metadata\makernotes.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\makernotes_st.obj" /c src\metadata\makernotes.cpp
+
+object\makernotes.obj: src\metadata\makernotes.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\makernotes.obj" /c src\metadata\makernotes.cpp
+
+object\mediumformat_st.obj: src\metadata\mediumformat.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\mediumformat_st.obj" /c src\metadata\mediumformat.cpp
+
+object\mediumformat.obj: src\metadata\mediumformat.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\mediumformat.obj" /c src\metadata\mediumformat.cpp
+
+object\minolta_st.obj: src\metadata\minolta.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\minolta_st.obj" /c src\metadata\minolta.cpp
+
+object\minolta.obj: src\metadata\minolta.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\minolta.obj" /c src\metadata\minolta.cpp
+
+object\misc_parsers_st.obj: src\metadata\misc_parsers.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\misc_parsers_st.obj" /c src\metadata\misc_parsers.cpp
+
+object\misc_parsers.obj: src\metadata\misc_parsers.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\misc_parsers.obj" /c src\metadata\misc_parsers.cpp
+
+object\nikon_st.obj: src\metadata\nikon.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\nikon_st.obj" /c src\metadata\nikon.cpp
+
+object\nikon.obj: src\metadata\nikon.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\nikon.obj" /c src\metadata\nikon.cpp
+
+object\hasselblad_model_st.obj: src\metadata\hasselblad_model.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\hasselblad_model_st.obj" /c src\metadata\hasselblad_model.cpp
+
+object\hasselblad_model.obj: src\metadata\hasselblad_model.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\hasselblad_model.obj" /c src\metadata\hasselblad_model.cpp
+
+object\normalize_model_st.obj: src\metadata\normalize_model.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\normalize_model_st.obj" /c src\metadata\normalize_model.cpp
+
+object\normalize_model.obj: src\metadata\normalize_model.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\normalize_model.obj" /c src\metadata\normalize_model.cpp
+
+object\olympus_st.obj: src\metadata\olympus.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\olympus_st.obj" /c src\metadata\olympus.cpp
+
+object\olympus.obj: src\metadata\olympus.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\olympus.obj" /c src\metadata\olympus.cpp
+
+object\p1_st.obj: src\metadata\p1.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\p1_st.obj" /c src\metadata\p1.cpp
+
+object\p1.obj: src\metadata\p1.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\p1.obj" /c src\metadata\p1.cpp
+
+object\pentax_st.obj: src\metadata\pentax.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\pentax_st.obj" /c src\metadata\pentax.cpp
+
+object\pentax.obj: src\metadata\pentax.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\pentax.obj" /c src\metadata\pentax.cpp
+
+object\samsung_st.obj: src\metadata\samsung.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\samsung_st.obj" /c src\metadata\samsung.cpp
+
+object\samsung.obj: src\metadata\samsung.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\samsung.obj" /c src\metadata\samsung.cpp
+
+object\sony_st.obj: src\metadata\sony.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\sony_st.obj" /c src\metadata\sony.cpp
+
+object\sony.obj: src\metadata\sony.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\sony.obj" /c src\metadata\sony.cpp
+
+object\tiff_st.obj: src\metadata\tiff.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\tiff_st.obj" /c src\metadata\tiff.cpp
+
+object\tiff.obj: src\metadata\tiff.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\tiff.obj" /c src\metadata\tiff.cpp
+
+object\aspect_ratio_st.obj: src\postprocessing\aspect_ratio.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\aspect_ratio_st.obj" /c src\postprocessing\aspect_ratio.cpp
+
+object\aspect_ratio.obj: src\postprocessing\aspect_ratio.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\aspect_ratio.obj" /c src\postprocessing\aspect_ratio.cpp
+
+object\dcraw_process_st.obj: src\postprocessing\dcraw_process.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\dcraw_process_st.obj" /c src\postprocessing\dcraw_process.cpp
+
+object\dcraw_process.obj: src\postprocessing\dcraw_process.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\dcraw_process.obj" /c src\postprocessing\dcraw_process.cpp
+
+object\mem_image_st.obj: src\postprocessing\mem_image.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\mem_image_st.obj" /c src\postprocessing\mem_image.cpp
+
+object\mem_image.obj: src\postprocessing\mem_image.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\mem_image.obj" /c src\postprocessing\mem_image.cpp
+
+object\postprocessing_aux_st.obj: src\postprocessing\postprocessing_aux.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\postprocessing_aux_st.obj" /c src\postprocessing\postprocessing_aux.cpp
+
+object\postprocessing_aux.obj: src\postprocessing\postprocessing_aux.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\postprocessing_aux.obj" /c src\postprocessing\postprocessing_aux.cpp
+
+object\postprocessing_utils_dcrdefs_st.obj: src\postprocessing\postprocessing_utils_dcrdefs.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\postprocessing_utils_dcrdefs_st.obj" /c src\postprocessing\postprocessing_utils_dcrdefs.cpp
+
+object\postprocessing_utils_dcrdefs.obj: src\postprocessing\postprocessing_utils_dcrdefs.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\postprocessing_utils_dcrdefs.obj" /c src\postprocessing\postprocessing_utils_dcrdefs.cpp
+
+object\postprocessing_utils_st.obj: src\postprocessing\postprocessing_utils.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\postprocessing_utils_st.obj" /c src\postprocessing\postprocessing_utils.cpp
+
+object\postprocessing_utils.obj: src\postprocessing\postprocessing_utils.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\postprocessing_utils.obj" /c src\postprocessing\postprocessing_utils.cpp
+
+object\ext_preprocess_st.obj: src\preprocessing\ext_preprocess.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\ext_preprocess_st.obj" /c src\preprocessing\ext_preprocess.cpp
+
+object\ext_preprocess.obj: src\preprocessing\ext_preprocess.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\ext_preprocess.obj" /c src\preprocessing\ext_preprocess.cpp
+
+object\raw2image_st.obj: src\preprocessing\raw2image.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\raw2image_st.obj" /c src\preprocessing\raw2image.cpp
+
+object\raw2image.obj: src\preprocessing\raw2image.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\raw2image.obj" /c src\preprocessing\raw2image.cpp
+
+object\subtract_black_st.obj: src\preprocessing\subtract_black.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\subtract_black_st.obj" /c src\preprocessing\subtract_black.cpp
+
+object\subtract_black.obj: src\preprocessing\subtract_black.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\subtract_black.obj" /c src\preprocessing\subtract_black.cpp
+
+object\cameralist_st.obj: src\tables\cameralist.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\cameralist_st.obj" /c src\tables\cameralist.cpp
+
+object\cameralist.obj: src\tables\cameralist.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\cameralist.obj" /c src\tables\cameralist.cpp
+
+object\colorconst_st.obj: src\tables\colorconst.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\colorconst_st.obj" /c src\tables\colorconst.cpp
+
+object\colorconst.obj: src\tables\colorconst.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\colorconst.obj" /c src\tables\colorconst.cpp
+
+object\colordata_st.obj: src\tables\colordata.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\colordata_st.obj" /c src\tables\colordata.cpp
+
+object\colordata.obj: src\tables\colordata.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\colordata.obj" /c src\tables\colordata.cpp
+
+object\wblists_st.obj: src\tables\wblists.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\wblists_st.obj" /c src\tables\wblists.cpp
+
+object\wblists.obj: src\tables\wblists.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\wblists.obj" /c src\tables\wblists.cpp
+
+object\curves_st.obj: src\utils\curves.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\curves_st.obj" /c src\utils\curves.cpp
+
+object\curves.obj: src\utils\curves.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\curves.obj" /c src\utils\curves.cpp
+
+object\decoder_info_st.obj: src\utils\decoder_info.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\decoder_info_st.obj" /c src\utils\decoder_info.cpp
+
+object\decoder_info.obj: src\utils\decoder_info.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\decoder_info.obj" /c src\utils\decoder_info.cpp
+
+object\init_close_utils_st.obj: src\utils\init_close_utils.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\init_close_utils_st.obj" /c src\utils\init_close_utils.cpp
+
+object\init_close_utils.obj: src\utils\init_close_utils.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\init_close_utils.obj" /c src\utils\init_close_utils.cpp
+
+object\open_st.obj: src\utils\open.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\open_st.obj" /c src\utils\open.cpp
+
+object\open.obj: src\utils\open.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\open.obj" /c src\utils\open.cpp
+
+object\phaseone_processing_st.obj: src\utils\phaseone_processing.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\phaseone_processing_st.obj" /c src\utils\phaseone_processing.cpp
+
+object\phaseone_processing.obj: src\utils\phaseone_processing.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\phaseone_processing.obj" /c src\utils\phaseone_processing.cpp
+
+object\read_utils_st.obj: src\utils\read_utils.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\read_utils_st.obj" /c src\utils\read_utils.cpp
+
+object\read_utils.obj: src\utils\read_utils.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\read_utils.obj" /c src\utils\read_utils.cpp
+
+object\thumb_utils_st.obj: src\utils\thumb_utils.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\thumb_utils_st.obj" /c src\utils\thumb_utils.cpp
+
+object\thumb_utils.obj: src\utils\thumb_utils.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\thumb_utils.obj" /c src\utils\thumb_utils.cpp
+
+object\utils_dcraw_st.obj: src\utils\utils_dcraw.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\utils_dcraw_st.obj" /c src\utils\utils_dcraw.cpp
+
+object\utils_dcraw.obj: src\utils\utils_dcraw.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\utils_dcraw.obj" /c src\utils\utils_dcraw.cpp
+
+object\utils_libraw_st.obj: src\utils\utils_libraw.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\utils_libraw_st.obj" /c src\utils\utils_libraw.cpp
+
+object\utils_libraw.obj: src\utils\utils_libraw.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\utils_libraw.obj" /c src\utils\utils_libraw.cpp
+
+object\apply_profile_st.obj: src\write\apply_profile.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\apply_profile_st.obj" /c src\write\apply_profile.cpp
+
+object\apply_profile.obj: src\write\apply_profile.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\apply_profile.obj" /c src\write\apply_profile.cpp
+
+object\file_write_st.obj: src\write\file_write.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\file_write_st.obj" /c src\write\file_write.cpp
+
+object\file_write.obj: src\write\file_write.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\file_write.obj" /c src\write\file_write.cpp
+
+object\tiff_writer_st.obj: src\write\tiff_writer.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\tiff_writer_st.obj" /c src\write\tiff_writer.cpp
+
+object\tiff_writer.obj: src\write\tiff_writer.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\tiff_writer.obj" /c src\write\tiff_writer.cpp
+
+object\x3f_parse_process_st.obj: src\x3f\x3f_parse_process.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\x3f_parse_process_st.obj" /c src\x3f\x3f_parse_process.cpp
+
+object\x3f_parse_process.obj: src\x3f\x3f_parse_process.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\x3f_parse_process.obj" /c src\x3f\x3f_parse_process.cpp
+
+object\x3f_utils_patched_st.obj: src\x3f\x3f_utils_patched.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\x3f_utils_patched_st.obj" /c src\x3f\x3f_utils_patched.cpp
+
+object\x3f_utils_patched.obj: src\x3f\x3f_utils_patched.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\x3f_utils_patched.obj" /c src\x3f\x3f_utils_patched.cpp
+
+object\libraw_c_api_st.obj: src\libraw_c_api.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\libraw_c_api_st.obj" /c src\libraw_c_api.cpp
+
+object\libraw_c_api.obj: src\libraw_c_api.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\libraw_c_api.obj" /c src\libraw_c_api.cpp
+
+object\libraw_datastream_st.obj: src\libraw_datastream.cpp
+	$(CC) $(COPT) /DLIBRAW_NODLL /DLIBRAW_BUILDLIB /Fo"object\\libraw_datastream_st.obj" /c src\libraw_datastream.cpp
+
+object\libraw_datastream.obj: src\libraw_datastream.cpp
+	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\libraw_datastream.obj" /c src\libraw_datastream.cpp
+

+ 43 - 0
raw.mod/libraw/README.DNGSDK.txt

@@ -0,0 +1,43 @@
+LibRaw can decode most common DNG formats (Bayer/Linear, 16-bit integer and 
+floating point) by itself (you need to use zlib for deflate decompression 
+support and libjpeg for lossy compressed DNGs).
+
+Some rare flavours of DNG files (e.g. for 8-bit files) are not implemented in 
+LibRaw. These files never come from camera or DNG files created by 
+Adobe DNG Converter, but created by some processing software that uses DNG as
+intermediate format.
+
+To decode such files you need to compile LibRaw with Adobe DNG SDK. This SDK
+to be used internally, standard LibRaw API remains untouched (you may specify
+what kinds of DNG files you want to decode via Adobe code, see below).
+
+To build LibRaw with DNG SDK specify USE_DNGSDK in defines and adjust 
+include/linker path settings to point to DNG SDK's include and library folders.
+
+DNG SDK Version compatibility:
+ - Since LibRaw 0.20, DNG SDK 1.4 is required (DNG SDK 1.5 may work too, but 
+   have not tested w/ LibRaw).
+ - There are several DNG SDK 1.4 versions circulated, the oldest known is 
+   dated May 2012, you'll need the last one (dated June 2015).
+ - This version is available from Adobe site: 
+    http://download.adobe.com/pub/adobe/dng/dng_sdk_1_4.zip
+
+In your application
+ 
+ * create dng_host object (or derived object, e.g. with multithreaded) entity in your program;
+ * pass it to LibRaw via LibRaw::set_dng_host(dng_host *) call to enable DNG SDK use on runtime
+ * adjust imgdata.rawparams.use_dngsdk parameter with one of this values
+       (ORed bitwise):
+       LIBRAW_DNG_NONE - do not use DNG SDK for DNG processing
+       LIBRAW_DNG_FLOAT - process floating point DNGs via Adobe DNG SDK
+       LIBRAW_DNG_LINEAR - process 'linear DNG' (i.e. demosaiced)
+       LIBRAW_DNG_DEFLATE - process DNGs compressed with deflate (gzip)
+       LIBRAW_DNG_XTRANS - process Fuji X-Trans DNGs (6x6 CFA)
+       LIBRAW_DNG_OTHER - process other files (so usual 2x2 bayer)
+       LIBRAW_DNG_8BIT - process 8bit DNGs (e.g. JPEG compressed ones)
+
+    Default value for this field:
+       LIBRAW_DNG_DEFAULT=LIBRAW_DNG_FLOAT|LIBRAW_DNG_LINEAR|LIBRAW_DNG_DEFLATE | LIBRAW_DNG_8BIT
+
+    You also may use this macro to pass all supported DNGs to Adobe SDK:
+       LIBRAW_DNG_ALL = LIBRAW_DNG_FLOAT|LIBRAW_DNG_LINEAR|LIBRAW_DNG_XTRANS|LIBRAW_DNG_OTHER | LIBRAW_DNG_8BIT

+ 103 - 0
raw.mod/libraw/README.GoPro.txt

@@ -0,0 +1,103 @@
+GoPro HERO/Fusion .GPR files are DNG files by nature, but with own wavelet-based codec.
+
+GoPro provides GPR SDK for reading these files, available at https://github.com/gopro/gpr
+
+LibRaw is able to use this GPR SDK to read GoPro HERO/Fusion files.
+
+To enable this support:
+
+1. Build GPR SDK (see NOTES section below)
+2. Build LibRaw with -DUSE_DNGSDK and -DUSE_GPRSDK compiler flags
+   (you'll need to adjust INCLUDE path and linker flags to add GPR SDK files to compile/link).
+
+
+NOTES:
+I. GPR SDK comes with (patched) Adobe DNG SDK source (v1.4 but outdated).
+   This DNG SDK is *NOT* compatible with LibRaw since 0.20 due to
+   internals change .
+
+II. So, you need to patch actual Adobe DNG SDK v1.4 (dated 2015), this version
+   is available from Adobe:
+   http://download.adobe.com/pub/adobe/dng/dng_sdk_1_4.zip
+  
+  (most likely, this apply for v1.5 too, but not tested/checked):
+
+   a) You'll need to enable dng_ifd.fCompression value == 9 in 
+      dng_ifd::IsValidCFA() call
+      Use provided patch: LibRaw/GoPro/dng-sdk-allow-VC5-validate.diff 
+      (it may not apply to any Adobe DNG SDK version, if so apply it by hands).
+
+   b) Newer (than supplied w/ GPR SDK) Adobe SDK versions changes 
+     dng_read_image::ReadTile interface, please apply patches 
+     LibRaw/GoPro/gpr_read_image.cpp.diff 
+     and  LibRaw/GoPro/gpr_read_image.h.diff to your GPR SDK code
+
+   c) GPR SDK's gpr_sdk/private/gpr.cpp uses own (added) dng_host method 
+      GetGPMFPayload so it will not compile with Adobes (not patched) 
+      dng_host.h
+      LibRaw does not use high-level interface provided by gpr.cpp, so
+      possible problem solutions are:
+       - either compile GPR SDK without gpr_sdk/private/gpr.cpp file
+       - or provide GPR's dng_host.h while building GPR SDK.
+     (in our software we use 1st method).       
+
+   See Note VII below for detailed GPR SDK build instructions w/ Cmake
+
+III. LibRaw uses private gpr_read_image() interface
+    So you'll need to add PATH_TO/gpr_sdk/gpr_sdk/private to -I compiler flags.
+
+IV.  -DUSE_GPRSDK LibRaw build flag requires -DUSE_DNGSDK. LibRaw will not 
+     compile if USE_GPRSDK is set, but USE_DNGSDK is not
+
+V.  LibRaw will use DNG SDK to unpack GoPro files even if imgdata.params.use_dng_sdk is set to 0.
+
+VI. If LibRaw is built with -DUSE_GPRSDK, LibRaw::capabilities will return LIBRAW_CAPS_GPRSDK flag.
+
+VII. GPR SDK build using cmake (contributed by our user, great thanks)
+
+1. replace gopro's toplevel CMakeLists.txt with this one (this builds only a subset of the libraries):
+------------------------------------
+# minimum required cmake version
+cmake_minimum_required( VERSION 3.5 FATAL_ERROR )
+
+set(CMAKE_SUPPRESS_REGENERATION true)
+set(CMAKE_C_FLAGS "-std=c99")
+
+# project name
+project( gpr )
+
+option(DNGINCLUDEDIR "Adobe DNG toolkit include directory")
+INCLUDE_DIRECTORIES( ${DNGINCLUDEDIR} )
+
+# DNG toolkit requires C++11 minimum:
+set_property(GLOBAL PROPERTY CXX_STANDARD 17)
+
+# add needed subdirectories
+add_subdirectory( "source/lib/common" )
+add_subdirectory( "source/lib/vc5_common" )
+add_subdirectory( "source/lib/vc5_decoder" )
+add_subdirectory( "source/lib/gpr_sdk" )
+
+set_property(TARGET gpr_sdk PROPERTY CXX_STANDARD 17)
+
+IF (WIN32)
+TARGET_COMPILE_DEFINITIONS( gpr_sdk PUBLIC -DqWinOS=1 -DqMacOS=0 -DqLinux=0)
+ELSEIF (APPLE)
+TARGET_COMPILE_DEFINITIONS( gpr_sdk PUBLIC -DqWinOS=0 -DqMacOS=1 -DqLinux=0)
+ELSE()
+TARGET_COMPILE_DEFINITIONS( gpr_sdk PUBLIC -DqWinOS=0 -DqMacOS=0 -DqLinux=1)
+ENDIF()
+----------------------------------------
+
+2. apply the two patches of README.GoPro.txt section II b.
+the patch of section IIa is not needed with libdng1.5.
+
+3. delete these two files:
+/source/lib/gpr_sdk/private/gpr.cpp
+/source/lib/gpr_sdk/private/gpr_image_writer.cpp
+
+4. run CMAKE with -DDNGINCLUDEDIR, pointing to the headers from Adobe dng 1.5.
+
+5. build. You get 4 libraries "gpr_sdk", "vc5_common", "vc5_decoder", "common", the rest is ignored.
+
+

+ 62 - 0
raw.mod/libraw/README.RawSpeed.txt

@@ -0,0 +1,62 @@
+================= Compile LibRaw with RawSpeed support ========================
+
+0) RawSpeed version: 
+   LibRaw supports 'master' version of RawSpeed library: https://github.com/darktable-org/rawspeed/tree/master
+
+   Although this version is really outdated, newer versions does not looks stable enough for production
+   use (for example, this critical issue not fixed for 10+ months: https://github.com/darktable-org/rawspeed/issues/100 )
+   
+1) Prerequisites
+
+To build RawSpeed you need libxml2, iconv, and JPEG library installed on your 
+system.
+
+2) Build RawSpeed:
+
+  -- consult http://rawstudio.org/blog/?p=800 for details
+
+  -- Win32: you need POSIX Threads for Win32 installed on your system
+     (http://sources.redhat.com/pthreads-win32/)
+
+  -- use provided RawSpeed/rawspeed.samsung-decoder.patch  to fix
+     old Samsung decoder bug
+
+  -- you may use qmake .pro files supplied in LibRaw distribution
+     (RawSpeed/rawspeed.qmake-pro-files.patch)
+     Adjust path to libraries/includes according to your setup.
+
+  -- Win32: you need to add __declspec(..) to external C++ classes.
+     Use patch provided with LibRaw (RawSpeed/rawspeed.win32-dll.patch)
+
+  -- Unix: you need to define rawspeed_get_number_of_processor_cores() call
+     For most unix systems (Linux, MacOS X 10.4+, FreeBSD) patch provided
+     with LibRaw (RawSpeed/rawspeed.cpucount-unix.patch) should work.
+
+3) Build LibRaw with RawSpeed support:
+ 
+   Win32: 
+     --Uncomment CFLAGS_RAWSPEED and LDFLAGS_RAWSPEED lines in
+       Makefile.msvc. Adjust paths to libraries/includes if needed.
+     -- run nmake -f Makefile.msvc
+
+   Unix/MacOS:
+     -- Uncomment CFLAGS/LDADD lines in RawSpeed section in Makefile.dist
+     -- Uncomment RAWSPEED_DATA line if you wish to rebuild
+	internal copy of RawSpeed's cameras.xml
+     -- run make -f Makefile.dist
+
+   Compile options:
+    -- You may specify -DNOSONY_RAWSPEED define if you do not want to use 
+        RawSpeed's Sony formats decoder (because result of this decoder is 
+        different from  LibRaw's built-in decoder)
+
+4) Build/run your Apps with LibRaw+RawSpeed
+   
+   -- Build as usual, no changes required in your apps unless you
+      access LibRaw::imgdata.rawdata.raw_image[] directly
+
+   -- you may turn off RawSpeed support on runtime by setting 
+      imgdata.params.use_rawspeed to 0.
+
+   -- You'll need all shared libraries you linked to at runtime (libxml2,
+      iconv, LibJPEG, and posix threads on Win32).

+ 9 - 0
raw.mod/libraw/README.cmake

@@ -0,0 +1,9 @@
+Due to inability to support (user contributed) Cmake scripts,
+the cmake builds are not officially supported by LibRaw team
+since October 23, 2014
+
+The scripts are moved to separate github repository
+github.com:LibRaw/LibRaw-cmake.git
+
+Checkout from this repo if you want to use Cmake to build LibRaw.
+

+ 17 - 0
raw.mod/libraw/README.demosaic-packs

@@ -0,0 +1,17 @@
+======================= LibRaw demosaic pack(s) ===============================
+
+We were forced to stop supporting LibRaw demosaic packs: the contributed code
+is out of date for several years, inital contributors has no interest in it.
+
+We too: we (LibRaw team) focused on RAW decode and metadata extraction, but not
+on postprocessing (demosaic, noise suppression, etc).
+
+So, LibRaw-demosaic-pack-GPLn are abandoned now. We will be happy to convey 
+their support and development to any developer who will show interest.
+
+LibRaw 0.19 contains callback calls placed instead of calls to demosaic pack routines.
+So, adaptation of demosaic packs to new LibRaw should be easy (and, of course, we'll
+provide some support and/or implement additional callbacks if needed).
+
+
+                                                              

+ 106 - 0
raw.mod/libraw/README.md

@@ -0,0 +1,106 @@
+# LibRaw
+## Library for reading and processing of RAW digicam images
+
+ The LibRaw library provides a simple and unified interface for extracting out of RAW files generated by digital photo cameras the following:
+
+* RAW data (_pixel values)_
+* Metadata necessary for processing RAW (_geometry, CFA / Bayer pattern, black level, white balance, etc.)_
+* Embedded preview / thumbnail.
+
+The library is intended for use with programs that work with RAW files, such as:
+
+* RAW viewers
+* RAW converters
+* RAW data analyzers
+* Software for stitching and compositing multi-frame aggregates like panoramas and image stacks.
+
+Using the LibRaw library allows one to focus on the substantive part of processing the data contained in RAW files, without getting distracted by the wide variety of RAW file and metadata formats, compression algorithms, etc.
+
+The library’s development is focused on:
+
+* Support for new cameras and formats
+* Improving extraction of metadata necessary for RAW processing
+* Providing an interface for reading other types of metadata.
+
+Additionally, the LibRaw library offers some basic RAW conversion, intended for cases when such conversion is not the main function of the LibRaw-using application _(for example: a viewer for 500+ graphic file formats, including RAW)._ These methods are inherited from the Dave Coffin’s dcraw.c utility _(see below the “Project history” section);_ their further development is not currently planned, because we do not consider production-quality rendering to be in the scope of LibRaw’s functionality _(the methods are retained for compatibility with prior versions and for rapid-fire testing of RAW support and other aspects)._
+
+## Licensing
+
+
+The LibRaw library is distributed free of charge and with open-source code subject to two licenses:
+
+1\. GNU LESSER GENERAL PUBLIC LICENSE version 2.1
+
+2\. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+To use the LibRaw library in an application, you can choose the license that better suits your needs.
+
+If you modify/add/improve the LibRaw source code, then your patches can only be included into the library’s official source code if you agree to it being distributed under both of the above licenses.
+
+We do not guarantee that the licensing will not change in future versions of LibRaw.
+
+## Update policy
+
+
+### Major/minor releases
+
+* Major releases _(for example, 0.20)_ are published once every year and a half to two years.
+* When the first public beta version of a major release is published, the list of supported cameras and formats is frozen; we try (but do not guarantee) to freeze the API/ABI as well.
+* The public major release contains only that code which has been sufficiently tested on a wide user base (including in our commercial products). Something very new may not be included in it (but it will probably be included in a public snapshot, see below).
+* Minor updates _(0.20.1, 0.20.2…)_ do not change the API/ABI and new cameras are not added; generally they are just bugfixes.
+* Bugfixes are published as soon as possible in the [public GitHub repository](https://github.com/LibRaw/LibRaw).
+* Minor version increments: these are generally published if a serious error has been fixed, one that potentially affects many library users (for example, a possible stack overflow).
+
+### Public snapshots
+
+* Public snapshots are published every 7-9 months in the [public GitHub repository](https://github.com/LibRaw/LibRaw).
+* These versions contain support for new cameras that was added after the previous major release. The API/ABI of public snapshots is not frozen, and may change.
+* Public snapshots are always tested on a fairly large user base, and may be considered suitable for use in programs that work with files with known origins (that is, recorded directly by users’ digital cameras). However, public snapshots should not be considered sufficiently reliable for processing files that are specially constructed for vulnerability testing; that is, they should not be used in public services that allow for anonymous processing of files of unknown provenance
+
+## Support and feedback
+
+* You can submit a bug report in one of the following ways:
+    * [Issues](https://github.com/LibRaw/LibRaw/issues) on GitHub
+    * The libraw.org [forum](https://www.libraw.org/forum)
+    * [Feedback form](https://www.libraw.org/contact) on libraw.org
+    * E-mail us at [[email protected]](mailto:[email protected])
+* Questions can be asked on the forum, through the feedback form, and via the email indicated above.  
+    Please do not use Issues on GitHub for questions; it is intended specifically for problem reports.
+* We prefer to process additions to the source code via the [Pull Requests](https://github.com/LibRaw/LibRaw/pulls) on GitHub.
+
+We cannot guarantee any response to requests submitted via the above methods. If you need a guaranteed response for a bug report and/or for extending technical support, please use the Extended Support option.
+
+## Project history
+
+
+The LibRaw project was launched in 2008, based on the [dcraw.c](https://www.dechifro.org/dcraw/) (Dave Coffin) utility, with its goals being to:
+
+* Convert dcraw.c into a library that could be used by other programs, while also somewhat improving the structure of dcraw.c (removing global variables, making it thread-safe, etc.)
+* Import changes made to dcraw.c
+* Improve/expand the extraction of metadata.
+
+Unfortunately, support for dcraw.c was reduced to a minimum in 2015, and completely ceased in 2018. Since then, support for new cameras (including support for new formats) has been done entirely by the LibRaw team.
+
+The code that implements rendering of RAW to RGB is inherited from dcraw.c, without major changes (though a set of changes was implemented to speed up and parallelize this code).
+
+In the early-to-mid 2010s, we gladly expanded post-processing implemented in LibRaw, and readily accepted the input of outside developers (new/improved methods for debayerization/demosaicing, systematic noise reduction etc.).
+
+Experience has shown that the LibRaw team cannot support this added code on their own, while contributors do not provide support and development of the code they suggest and it ends up abandoned. As such, the majority of the modifications that are implemented by people outside the LibRaw team was moved to the [LibRaw-demosaic-pack-….](https://github.com/LibRaw?tab=repositories), where they remain in their original form (but these projects are still present in our GitHub).
+
+Thus, we arrive at our current status, described in the first part of this text.
+
+## Copyrights and Acknowledgements
+
+Copyright (C) 2008-2021 LibRaw LLC
+
+LibRaw uses code from Dave Coffin’s dcraw.c utility (without RESTRICTED/GPL2 code):
+
+Copyright 1997-2018 by Dave Coffin, dcoffin a cybercom o net
+
+LibRaw uses DCB demosaic code by Jaceck Gozdz distributed under BSD license:
+
+Copyright (C) 2010, Jacek Gozdz (mailto:[email protected])
+
+LibRaw uses Roland Karlsson’s X3F tools source code, licensed under BSD license:
+
+Copyright (c) 2010, Roland Karlsson ([email protected])

+ 15 - 0
raw.mod/libraw/RawSpeed/rawspeed.cpucount-unix.patch

@@ -0,0 +1,15 @@
+diff --git a/RawSpeed/Common.cpp b/RawSpeed/Common.cpp
+index abec232..6990c04 100644
+--- a/RawSpeed/Common.cpp
++++ b/RawSpeed/Common.cpp
+@@ -31,5 +31,10 @@ void* _aligned_malloc(size_t bytes, size_t alignment) {
+   else
+     return NULL;
+ }
++#include <unistd.h>
++int rawspeed_get_number_of_processor_cores()
++{
++  return sysconf( _SC_NPROCESSORS_ONLN );
++}
+ 
+ #endif

+ 84 - 0
raw.mod/libraw/RawSpeed/rawspeed.qmake-pro-files.patch

@@ -0,0 +1,84 @@
+diff --git a/RawSpeed/rawspeed-lib.pro b/RawSpeed/rawspeed-lib.pro
+new file mode 100644
+index 0000000..1599ddf
+--- /dev/null
++++ b/RawSpeed/rawspeed-lib.pro
+@@ -0,0 +1,42 @@
++TEMPLATE=lib
++TARGET=rawspeed
++
++win32:INCLUDEPATH+=d:/Qt/iconv/include d:/Qt/libxml2/include/libxml2 d:/Qt/pthreads/include d:/Qt/libjpeg-turbo/include
++win32:LIBS+=-Ld:/Qt/iconv/lib/x86 -liconv -Ld:/Qt/libxml2/lib/x86 -llibxml2 -Ld:/Qt/pthreads/lib/x86 -lpthreadVC2 -Ld:/Qt/libjpeg-turbo/lib/x86 -ljpeg8
++
++unix:INCLUDEPATH+=/usr/local/include /usr/local/include/libxml2
++unix:CONFIG+=staticlib
++
++INCLUDEPATH+=.
++
++HEADERS = ArwDecoder.h BitPumpJPEG.h BitPumpMSB.h BitPumpMSB32.h \
++	BitPumpPlain.h BlackArea.h ByteStream.h ByteStreamSwap.h \
++	Camera.h CameraMetaData.h CameraMetadataException.h   \
++	CameraSensorInfo.h ColorFilterArray.h Common.h Cr2Decoder.h \
++	DngDecoder.h DngDecoderSlices.h DngOpcodes.h  FileIOException.h \
++	FileMap.h FileReader.h IOException.h LJpegDecompressor.h \
++	LJpegPlain.h NefDecoder.h NikonDecompressor.h OrfDecoder.h \
++	PefDecoder.h PentaxDecompressor.h Point.h RawDecoder.h \
++	RawDecoderException.h RawImage.h RawParser.h Rw2Decoder.h SrwDecoder.h \
++	StdAfx.h TiffEntry.h TiffEntryBE.h TiffIFD.h TiffIFDBE.h TiffParser.h \
++	TiffParserException.h TiffParserHeaderless.h TiffParserOlympus.h \
++	TiffTag.h dlldef.h
++
++SOURCES = \
++	ArwDecoder.cpp BitPumpJPEG.cpp BitPumpMSB.cpp BitPumpMSB32.cpp \
++	BitPumpPlain.cpp BlackArea.cpp ByteStream.cpp ByteStreamSwap.cpp \
++	Camera.cpp CameraMetaData.cpp CameraMetadataException.cpp   \
++	CameraSensorInfo.cpp ColorFilterArray.cpp Common.cpp Cr2Decoder.cpp \
++	DngDecoder.cpp DngDecoderSlices.cpp DngOpcodes.cpp  \
++	FileIOException.cpp FileMap.cpp FileReader.cpp IOException.cpp \
++	LJpegDecompressor.cpp LJpegPlain.cpp NefDecoder.cpp \
++	NikonDecompressor.cpp OrfDecoder.cpp PefDecoder.cpp \
++	PentaxDecompressor.cpp RawDecoder.cpp RawDecoderException.cpp   \
++	RawImage.cpp RawImageDataFloat.cpp RawImageDataU16.cpp RawParser.cpp \
++	Rw2Decoder.cpp SrwDecoder.cpp TiffEntry.cpp TiffEntryBE.cpp\
++	TiffIFD.cpp TiffIFDBE.cpp TiffParser.cpp TiffParserException.cpp \
++	TiffParserHeaderless.cpp TiffParserOlympus.cpp         
++
++DEFINES+=RAWSPEED_BUILDLIB
++CONFIG-=qt
++win32:QMAKE_CXXFLAGS+=/O2 /arch:SSE2 /fp:fast /MP
+diff --git a/RawSpeed/rawspeed-test.pro b/RawSpeed/rawspeed-test.pro
+new file mode 100644
+index 0000000..518aa98
+--- /dev/null
++++ b/RawSpeed/rawspeed-test.pro
+@@ -0,0 +1,21 @@
++TEMPLATE=app
++TARGET=rawspeed-test
++
++SOURCES=RawSpeed.cpp
++
++win32:CONFIG(debug,debug|release) {
++	LIBDIR =  debug
++} else {
++	LIBDIR = release
++}
++
++
++INCLUDEPATH+=../
++
++unix:INCLUDEPATH+=/usr/local/include /usr/local/include/libxml2
++unix:LIBS+=-L. -lrawspeed -L/usr/local/lib -lxml2 -ljpeg
++win32:LIBS+=-L$$LIBDIR -llibrawspeed
++win32:LIBS+=-Ld:/Qt/iconv/lib/x86 -liconv -Ld:/Qt/libxml2/lib/x86 -llibxml2a -Ld:/Qt/pthreads/lib/x86 -lpthreadVC2 -Ld:/Qt/libjpeg-turbo/lib/x86 -ljpeg8
++win32:INCLUDEPATH+=d:/Qt/iconv/include d:/Qt/libxml2/include/libxml2 d:/Qt/pthreads/include d:/Qt/libjpeg-turbo/include
++CONFIG-=qt
++CONFIG+=console
+diff --git a/RawSpeed/rawspeed.pro b/RawSpeed/rawspeed.pro
+new file mode 100644
+index 0000000..df2a0b9
+--- /dev/null
++++ b/RawSpeed/rawspeed.pro
+@@ -0,0 +1,3 @@
++TEMPLATE=subdirs
++SUBDIRS=rawspeed-lib.pro rawspeed-test.pro
++

+ 39 - 0
raw.mod/libraw/RawSpeed/rawspeed.samsung-decoder.patch

@@ -0,0 +1,39 @@
+diff --git a/RawSpeed/SrwDecoder.cpp b/RawSpeed/SrwDecoder.cpp
+index fa46499..1aff689 100644
+--- a/RawSpeed/SrwDecoder.cpp
++++ b/RawSpeed/SrwDecoder.cpp
+@@ -141,7 +141,7 @@ void SrwDecoder::decodeCompressed( TiffIFD* raw )
+         // First we decode even pixels
+         for (int c = 0; c < 16; c += 2) {
+           int b = len[(c >> 3)];
+-          int32 adj = ((int32) bits.getBits(b) << (32-b) >> (32-b));
++          int32 adj = b > 0 ? ((int32) bits.getBits(b) << (32-b) >> (32-b)) :0;
+           img[c] = adj + img_up[c];
+         }
+         // Now we decode odd pixels
+@@ -149,7 +149,7 @@ void SrwDecoder::decodeCompressed( TiffIFD* raw )
+         // is beyond me, it will hurt compression a deal.
+         for (int c = 1; c < 16; c += 2) {
+           int b = len[2 | (c >> 3)];
+-          int32 adj = ((int32) bits.getBits(b) << (32-b) >> (32-b));
++          int32 adj = b > 0 ? ((int32) bits.getBits(b) << (32-b) >> (32-b)) :0;
+           img[c] = adj + img_up2[c];
+         }
+       } else {
+@@ -158,14 +158,14 @@ void SrwDecoder::decodeCompressed( TiffIFD* raw )
+         int pred_left = x ? img[-2] : 128;
+         for (int c = 0; c < 16; c += 2) {
+           int b = len[(c >> 3)];
+-          int32 adj = ((int32) bits.getBits(b) << (32-b) >> (32-b));
++          int32 adj = b > 0 ? ((int32) bits.getBits(b) << (32-b) >> (32-b)) :0;
+           img[c] = adj + pred_left;
+         }
+         // Now we decode odd pixels
+         pred_left = x ? img[-1] : 128;
+         for (int c = 1; c < 16; c += 2) {
+           int b = len[2 | (c >> 3)];
+-          int32 adj = ((int32) bits.getBits(b) << (32-b) >> (32-b));
++          int32 adj = b > 0 ? ((int32) bits.getBits(b) << (32-b) >> (32-b)) :0;
+           img[c] = adj + pred_left;
+         }
+       }

+ 13 - 0
raw.mod/libraw/RawSpeed/rawspeed.uncompressed-color-dng.patch

@@ -0,0 +1,13 @@
+diff --git a/RawSpeed/DngDecoder.cpp b/RawSpeed/DngDecoder.cpp
+index 56c701b..98f2474 100644
+--- a/RawSpeed/DngDecoder.cpp
++++ b/RawSpeed/DngDecoder.cpp
+@@ -216,7 +216,7 @@ RawImage DngDecoder::decodeRawInternal() {
+           if (bps != 8 && bps != 16)
+             big_endian = true;
+           try {
+-            readUncompressedRaw(in, size, pos, width*bps / 8, bps, big_endian ? BitOrder_Jpeg : BitOrder_Plain);
++            readUncompressedRaw(in, size, pos, mRaw->getCpp()*width*bps / 8, bps, big_endian ? BitOrder_Jpeg : BitOrder_Plain);
+           } catch(IOException &ex) {
+             if (i > 0)
+               mRaw->setError(ex.what());

+ 186 - 0
raw.mod/libraw/RawSpeed/rawspeed.win32-dll.patch

@@ -0,0 +1,186 @@
+diff --git a/RawSpeed/Camera.h b/RawSpeed/Camera.h
+index 7b3045d..4363c1b 100644
+--- a/RawSpeed/Camera.h
++++ b/RawSpeed/Camera.h
+@@ -6,6 +6,7 @@
+ #include <libxml/parser.h>
+ #include "BlackArea.h"
+ #include "CameraMetadataException.h"
++#include "dlldef.h"
+ /* 
+     RawSpeed - RAW file decoder.
+ 
+@@ -30,7 +31,7 @@
+ 
+ namespace RawSpeed {
+ 
+-class Camera
++class DllDef Camera
+ {
+ public:
+   Camera(xmlDocPtr doc, xmlNodePtr cur);
+diff --git a/RawSpeed/CameraMetaData.h b/RawSpeed/CameraMetaData.h
+index 616b2bb..c6b8031 100644
+--- a/RawSpeed/CameraMetaData.h
++++ b/RawSpeed/CameraMetaData.h
+@@ -27,9 +27,10 @@
+     http://www.klauspost.com
+ */
+ 
++#include "dlldef.h"
+ namespace RawSpeed {
+ 
+-class CameraMetaData
++class DllDef CameraMetaData
+ {
+ public:
+   CameraMetaData();
+diff --git a/RawSpeed/CameraMetadataException.h b/RawSpeed/CameraMetadataException.h
+index 55a2814..52d5ea1 100644
+--- a/RawSpeed/CameraMetadataException.h
++++ b/RawSpeed/CameraMetadataException.h
+@@ -22,10 +22,11 @@
+ #ifndef CAMERA_METADATA_EXCEPTION_H
+ #define CAMERA_METADATA_EXCEPTION_H
+ 
++#include "dlldef.h"
+ 
+ namespace RawSpeed {
+ 
+-void ThrowCME(const char* fmt, ...);
++void DllDef ThrowCME(const char* fmt, ...);
+ 
+ class CameraMetadataException :
+   public std::runtime_error
+diff --git a/RawSpeed/FileMap.h b/RawSpeed/FileMap.h
+index 5c15918..bcd2a79 100644
+--- a/RawSpeed/FileMap.h
++++ b/RawSpeed/FileMap.h
+@@ -25,6 +25,7 @@
+ */
+ 
+ #include "IOException.h"
++#include "dlldef.h"
+ 
+ namespace RawSpeed {
+ 
+@@ -36,7 +37,7 @@ namespace RawSpeed {
+  * This can also be done as a MemMap 
+  * 
+  *****************************/
+-class FileMap
++class DllDef FileMap
+ {
+ public:
+   FileMap(uint32 _size);                 // Allocates the data array itself
+diff --git a/RawSpeed/FileReader.h b/RawSpeed/FileReader.h
+index 7448ec2..fb42ac0 100644
+--- a/RawSpeed/FileReader.h
++++ b/RawSpeed/FileReader.h
+@@ -24,10 +24,11 @@
+ 
+ #include "FileIOException.h"
+ #include "FileMap.h"
++#include "dlldef.h"
+ 
+ namespace RawSpeed {
+ 
+-class FileReader
++class DllDef FileReader
+ {
+ public:
+ 	FileReader(LPCWSTR filename);
+diff --git a/RawSpeed/RawDecoder.h b/RawSpeed/RawDecoder.h
+index a6c4708..b35cae5 100644
+--- a/RawSpeed/RawDecoder.h
++++ b/RawSpeed/RawDecoder.h
+@@ -9,6 +9,7 @@
+ #include "BitPumpPlain.h"
+ #include "CameraMetaData.h"
+ #include "TiffIFD.h"
++#include "dlldef.h"
+ 
+ /* 
+     RawSpeed - RAW file decoder.
+@@ -48,7 +49,7 @@ class RawDecoderThread
+     RawDecoder* parent;
+ };
+ 
+-class RawDecoder 
++class DllDef RawDecoder 
+ {
+ public:
+   /* Construct decoder instance - FileMap is a filemap of the file to be decoded */
+diff --git a/RawSpeed/RawImage.h b/RawSpeed/RawImage.h
+index 5741760..74cea96 100644
+--- a/RawSpeed/RawImage.h
++++ b/RawSpeed/RawImage.h
+@@ -26,13 +26,15 @@
+     http://www.klauspost.com
+ */
+ 
++#include "dlldef.h"
++
+ namespace RawSpeed {
+ 
+ class RawImage;
+ class RawImageWorker;
+ typedef enum {TYPE_USHORT16, TYPE_FLOAT32} RawImageType;
+ 
+-class RawImageData
++class DllDef RawImageData
+ {
+   friend class RawImageWorker;
+ public:
+@@ -125,7 +127,7 @@ protected:
+   int end_y;
+ };
+ 
+- class RawImage {
++ class DllDef RawImage {
+  public:
+    static RawImage create(RawImageType type = TYPE_USHORT16);
+    static RawImage create(iPoint2D dim, RawImageType type = TYPE_USHORT16, uint32 componentsPerPixel = 1);
+diff --git a/RawSpeed/RawParser.h b/RawSpeed/RawParser.h
+index 9ef86e3..1b3cb83 100644
+--- a/RawSpeed/RawParser.h
++++ b/RawSpeed/RawParser.h
+@@ -25,10 +25,11 @@
+ 
+ #include "FileMap.h"
+ #include "RawDecoder.h"
++#include "dlldef.h"
+ 
+ namespace RawSpeed {
+ 
+-class RawParser 
++class DllDef RawParser 
+ {
+ public:
+   RawParser(FileMap* input);
+diff --git a/RawSpeed/dlldef.h b/RawSpeed/dlldef.h
+new file mode 100644
+index 0000000..c806451
+--- /dev/null
++++ b/RawSpeed/dlldef.h
+@@ -0,0 +1,20 @@
++#ifndef DLLDEF_H
++#define DLLDEF_H
++
++#ifdef _WIN32
++#ifdef _MSC_VER
++#pragma warning( disable: 4251 )
++#endif
++#ifdef RAWSPEED_NODLL
++# define DllDef
++#else
++# ifdef RAWSPEED_BUILDLIB
++#    define DllDef   __declspec( dllexport )
++# else
++#    define DllDef   __declspec( dllimport )
++# endif
++#endif
++#else
++#  define DllDef
++#endif
++#endif

+ 4115 - 0
raw.mod/libraw/RawSpeed/rawspeed_xmldata.cpp

@@ -0,0 +1,4115 @@
+const char *_rawspeed_data_xml[]={
+"<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n",
+"<?xml-stylesheet type=\"text/xsl\" href=\"showcameras.xsl\" ?>\n",
+"<!--\n",
+"\t\tLicense: CC-BY-SA 3.0\n",
+"\n",
+"\t\tThis work is licensed under a\n",
+"\t\tCreative Commons Attribution-ShareAlike 3.0 Unported License.\n",
+"\n",
+"\t\tSee more at:\n",
+"\t\thttp://creativecommons.org/licenses/by-sa/3.0/\n",
+"-->\n",
+"\n",
+"<!DOCTYPE Cameras [\n",
+"<!ELEMENT BlackAreas ( Vertical*, Horizontal* ) >\n",
+"\n",
+"<!ELEMENT Camera ( CFA?, Crop, Sensor+, BlackAreas?, Aliases?, Hints? ) >\n",
+"<!ATTLIST Camera make CDATA #REQUIRED >\n",
+"<!ATTLIST Camera model CDATA #REQUIRED >\n",
+"<!ATTLIST Camera supported CDATA #IMPLIED >\n",
+"<!ATTLIST Camera mode CDATA #IMPLIED >\n",
+"<!ATTLIST Camera decoder_version CDATA #IMPLIED >\n",
+"\n",
+"<!ELEMENT Cameras ( Camera+ ) >\n",
+"<!ATTLIST Cameras version CDATA #IMPLIED >\n",
+"\n",
+"<!ELEMENT CFA ( Color+ ) >\n",
+"<!ATTLIST CFA height NMTOKEN #REQUIRED >\n",
+"<!ATTLIST CFA width NMTOKEN #REQUIRED >\n",
+"\n",
+"<!ELEMENT Color ( #PCDATA ) >\n",
+"<!ATTLIST Color x NMTOKEN #REQUIRED >\n",
+"<!ATTLIST Color y NMTOKEN #REQUIRED >\n",
+"\n",
+"<!ELEMENT Crop EMPTY >\n",
+"<!ATTLIST Crop height NMTOKEN #REQUIRED >\n",
+"<!ATTLIST Crop width NMTOKEN #REQUIRED >\n",
+"<!ATTLIST Crop x NMTOKEN #REQUIRED >\n",
+"<!ATTLIST Crop y NMTOKEN #REQUIRED >\n",
+"\n",
+"<!ELEMENT Horizontal EMPTY >\n",
+"<!ATTLIST Horizontal height NMTOKEN #REQUIRED >\n",
+"<!ATTLIST Horizontal y NMTOKEN #REQUIRED >\n",
+"\n",
+"<!ELEMENT Sensor EMPTY >\n",
+"<!ATTLIST Sensor white NMTOKEN #REQUIRED >\n",
+"<!ATTLIST Sensor black NMTOKEN #REQUIRED >\n",
+"<!ATTLIST Sensor black_colors NMTOKEN #IMPLIED >\n",
+"<!ATTLIST Sensor iso_list NMTOKENS #IMPLIED >\n",
+"<!ATTLIST Sensor iso_min NMTOKEN #IMPLIED >\n",
+"<!ATTLIST Sensor iso_max NMTOKEN #IMPLIED >\n",
+"\n",
+"<!ELEMENT Vertical EMPTY >\n",
+"<!ATTLIST Vertical width NMTOKEN #REQUIRED >\n",
+"<!ATTLIST Vertical x NMTOKEN #REQUIRED >\n",
+"\n",
+"<!ELEMENT Hints ( Hint+ ) >\n",
+"<!ELEMENT Hint EMPTY >\n",
+"<!ATTLIST Hint name CDATA #REQUIRED >\n",
+"<!ATTLIST Hint value CDATA #REQUIRED >\n",
+"\n",
+"<!ELEMENT Aliases ( Alias+ ) >\n",
+"<!ELEMENT Alias (#PCDATA) >\n",
+"]>\n",
+"\n",
+"<Cameras>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 100D\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"72\" y=\"52\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"16383\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"72\"/>\n",
+"			<Horizontal y=\"8\" height=\"44\"/>\n",
+"		</BlackAreas>\n",
+"		<Aliases>\n",
+"			<Alias>Canon EOS REBEL SL1</Alias>\n",
+"			<Alias>Canon EOS Kiss X7</Alias>\n",
+"		</Aliases>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 20D\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"74\" y=\"12\" width=\"3522\" height=\"2348\"/>\n",
+"		<Sensor black=\"126\" white=\"4095\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"72\"/>\n",
+"			<Horizontal y=\"2\" height=\"8\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 30D\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"74\" y=\"12\" width=\"3522\" height=\"2348\"/>\n",
+"		<Sensor black=\"127\" white=\"3398\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"72\"/>\n",
+"			<Horizontal y=\"2\" height=\"8\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 350D DIGITAL\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"42\" y=\"14\" width=\"3474\" height=\"2314\"/>\n",
+"		<Sensor black=\"255\" white=\"4095\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"40\"/>\n",
+"			<Horizontal y=\"0\" height=\"12\"/>\n",
+"		</BlackAreas>\n",
+"		<Aliases>\n",
+"			<Alias>Canon EOS DIGITAL REBEL XT</Alias>\n",
+"			<Alias>Canon EOS Kiss Digital N</Alias>\n",
+"			<Alias>Canon EOS 350D</Alias>\n",
+"		</Aliases>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 40D\" decoder_version=\"2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"30\" y=\"18\" width=\"3908\" height=\"2602\"/>\n",
+"		<Sensor black=\"1021\" white=\"13600\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"28\"/>\n",
+"			<Horizontal y=\"4\" height=\"12\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 40D\" mode=\"sRaw1\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"65535\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"sraw_40d\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 40D\" mode=\"sRaw2\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"1944\" height=\"1296\"/>\n",
+"		<Sensor black=\"0\" white=\"65535\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"sraw_40d\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 450D\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"22\" y=\"18\" width=\"4290\" height=\"2856\"/>\n",
+"		<Sensor black=\"1020\" white=\"14500\"/>\n",
+"		<Aliases>\n",
+"			<Alias>Canon EOS DIGITAL REBEL XSi</Alias>\n",
+"			<Alias>Canon EOS Kiss Digital X2</Alias>\n",
+"			<Alias>Canon EOS Kiss X2</Alias>\n",
+"		</Aliases>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 50D\" decoder_version=\"1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"64\" y=\"52\" width=\"4752\" height=\"3158\"/>\n",
+"		<Sensor black=\"1020\" white=\"13653\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"60\"/>\n",
+"			<Horizontal y=\"2\" height=\"46\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 50D\" mode=\"sRaw1\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3272\" height=\"2178\"/>\n",
+"		<Sensor black=\"0\" white=\"53000\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 50D\" mode=\"sRaw2\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"2376\" height=\"1584\"/>\n",
+"		<Sensor black=\"0\" white=\"53000\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 60D\" decoder_version=\"1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"146\" y=\"54\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"2026\" white=\"14200\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"140\"/>\n",
+"			<Horizontal y=\"4\" height=\"46\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 60D\" mode=\"sRaw1\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"65535\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 60D\" mode=\"sRaw2\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"65535\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 70D\" decoder_version=\"1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"72\" y=\"38\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"2026\" white=\"13653\" iso_min=\"0\" iso_max=\"199\"/>\n",
+"		<Sensor black=\"2026\" white=\"16383\" iso_min=\"6400\" iso_max=\"25600\"/>\n",
+"		<Sensor black=\"2026\" white=\"15387\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"72\"/>\n",
+"			<Horizontal y=\"0\" height=\"38\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 70D\" mode=\"sRaw1\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"53000\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"sraw_new\" value=\"\"/>\n",
+"			<Hint name=\"invert_sraw_wb\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 70D\" mode=\"sRaw2\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"53000\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"sraw_new\" value=\"\"/>\n",
+"			<Hint name=\"invert_sraw_wb\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 700D\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"72\" y=\"52\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"2026\" white=\"13584\" iso_min=\"0\" iso_max = \"199\"/>\n",
+"		<Sensor black=\"2026\" white=\"16383\" iso_min=\"6400\" iso_max = \"25600\"/>\n",
+"		<Sensor black=\"2026\" white=\"15304\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"70\"/>\n",
+"			<Horizontal y=\"4\" height=\"50\"/>\n",
+"		</BlackAreas>\n",
+"		<Aliases>\n",
+"			<Alias>Canon EOS REBEL T5i</Alias>\n",
+"			<Alias>Canon EOS Kiss X7i</Alias>\n",
+"		</Aliases>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 500D\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"62\" y=\"30\" width=\"4722\" height=\"3142\"/>\n",
+"		<Sensor black=\"1020\" white=\"16000\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"56\"/>\n",
+"			<Horizontal y=\"2\" height=\"22\"/>\n",
+"		</BlackAreas>\n",
+"		<Aliases>\n",
+"			<Alias>Canon EOS REBEL T1i</Alias>\n",
+"			<Alias>Canon EOS Kiss X3</Alias>\n",
+"		</Aliases>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 550D\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"148\" y=\"54\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"2048\" white=\"15831\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"140\"/>\n",
+"			<Horizontal y=\"4\" height=\"44\"/>\n",
+"		</BlackAreas>\n",
+"		<Aliases>\n",
+"			<Alias>Canon EOS REBEL T2i</Alias>\n",
+"			<Alias>Canon EOS Kiss X4</Alias>\n",
+"		</Aliases>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 600D\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"146\" y=\"54\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"2026\" white=\"13584\" iso_min=\"0\" iso_max = \"199\"/>\n",
+"		<Sensor black=\"2026\" white=\"15304\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"140\"/>\n",
+"			<Horizontal y=\"4\" height=\"44\"/>\n",
+"		</BlackAreas>\n",
+"		<Aliases>\n",
+"			<Alias>Canon EOS REBEL T3i</Alias>\n",
+"			<Alias>Canon EOS Kiss X5</Alias>\n",
+"		</Aliases>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 650D\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"76\" y=\"56\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"2026\" white=\"13584\" iso_min=\"0\" iso_max = \"199\"/>\n",
+"		<Sensor black=\"2026\" white=\"15304\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"70\"/>\n",
+"			<Horizontal y=\"4\" height=\"44\"/>\n",
+"		</BlackAreas>\n",
+"		<Aliases>\n",
+"			<Alias>Canon EOS REBEL T4i</Alias>\n",
+"			<Alias>Canon EOS Kiss X6i</Alias>\n",
+"		</Aliases>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 5D\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"90\" y=\"34\" width=\"4386\" height=\"2920\"/>\n",
+"		<Sensor black=\"127\" white=\"3692\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"88\"/>\n",
+"			<Horizontal y=\"2\" height=\"30\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 5D Mark II\" decoder_version=\"1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"158\" y=\"51\" width=\"5634\" height=\"3753\"/>\n",
+"		<Sensor black=\"1024\" white=\"12995\" iso_list=\"160 320 640 1250\"/>\n",
+"		<Sensor black=\"1024\" white=\"15950\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"156\"/>\n",
+"			<Horizontal y=\"2\" height=\"48\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 5D Mark II\" mode=\"sRaw1\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3872\" height=\"2574\"/>\n",
+"		<Sensor black=\"0\" white=\"57200\" iso_list=\"160 320 640 1250\"/>\n",
+"		<Sensor black=\"0\" white=\"64948\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 5D Mark II\" mode=\"sRaw2\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"2808\" height=\"1872\"/>\n",
+"		<Sensor black=\"0\" white=\"57200\" iso_list=\"160 320 640 1250\"/>\n",
+"		<Sensor black=\"0\" white=\"64948\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 5D Mark III\" decoder_version=\"2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"124\" y=\"82\" width=\"-2\" height=\"0\"/>\n",
+"		<Sensor black=\"2060\" white=\"16383\"/>\n",
+"		<Sensor black=\"2060\" white=\"15700\" iso_list=\"400 500 1600\"/>\n",
+"		<Sensor black=\"2060\" white=\"15200\" iso_list=\"100 125 200 250 800 2000\"/>\n",
+"		<Sensor black=\"2060\" white=\"15100\" iso_list=\"2500 10000\"/>\n",
+"		<Sensor black=\"2060\" white=\"13700\" iso_list=\"160 320 1250\"/>\n",
+"		<Sensor black=\"2060\" white=\"14200\" iso_list=\"640 5000\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"120\"/>\n",
+"			<Horizontal y=\"2\" height=\"78\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 5D Mark III\" mode=\"sRaw1\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+" 		<Sensor black=\"0\" white=\"44112\" iso_list=\"160 320 640 1250 2500 5000 10000\"/>\n",
+"		<Sensor black=\"0\" white=\"50300\" iso_list=\"100 20000\"/>\n",
+"		<Sensor black=\"0\" white=\"55128\" iso_list=\"25600 51200 65535\"/>\n",
+"		<Sensor black=\"0\" white=\"53220\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"sraw_new\" value=\"\"/>\n",
+"			<Hint name=\"invert_sraw_wb\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 5D Mark III\" mode=\"sRaw2\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"44112\" iso_list=\"160 320 640 1250 2500 5000 10000\"/>\n",
+"		<Sensor black=\"0\" white=\"51300\" iso_list=\"250\"/>\n",
+"		<Sensor black=\"0\" white=\"55028\" iso_list=\"25600 51200 65535\"/>\n",
+"		<Sensor black=\"0\" white=\"53000\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"sraw_new\" value=\"\"/>\n",
+"			<Hint name=\"invert_sraw_wb\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 6D\" decoder_version=\"2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"74\" y=\"40\" width=\"0\" height=\"-2\"/>\n",
+"		<Sensor black=\"2048\" white=\"16383\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"68\"/>\n",
+"			<Horizontal y=\"2\" height=\"36\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<!---Guess -->\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 6D\" mode=\"sRaw1\" decoder_version=\"3\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"48664\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"sraw_new\" value=\"\"/>\n",
+"			<Hint name=\"invert_sraw_wb\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<!---Guess -->\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 6D\" mode=\"sRaw2\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"48664\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"sraw_new\" value=\"\"/>\n",
+"			<Hint name=\"invert_sraw_wb\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 7D\" decoder_version=\"1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"158\" y=\"52\" width=\"5202\" height=\"3464\"/>\n",
+"		<Sensor black=\"1025\" white=\"8150\" iso_min=\"12800\" iso_max=\"12800\"/>\n",
+"		<Sensor black=\"2050\" white=\"16300\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"8\" width=\"156\"/>\n",
+"			<Horizontal y=\"32\" height=\"18\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 7D\" mode=\"sRaw1\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"44200\" iso_list=\"100 125 160 320 640 1250\"/>\n",
+"		<Sensor black=\"0\" white=\"54000\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 7D\" mode=\"sRaw2\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"44200\" iso_list=\"100 125 160 320 640 1250\"/>\n",
+"		<Sensor black=\"0\" white=\"54000\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 1000D\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"42\" y=\"18\" width=\"3906\" height=\"2602\"/>\n",
+"		<Sensor black=\"255\" white=\"3650\" iso_min=\"0\" iso_max=\"199\"/>\n",
+"		<Sensor black=\"255\" white=\"4036\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"41\"/>\n",
+"			<Horizontal y=\"2\" height=\"14\"/>\n",
+"		</BlackAreas>\n",
+"		<Aliases>\n",
+"			<Alias>Canon EOS DIGITAL REBEL XS</Alias>\n",
+"			<Alias>Canon EOS Kiss Digital F</Alias>\n",
+"		</Aliases>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 1100D\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"64\" y=\"20\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"2036\" white=\"15500\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"58\"/>\n",
+"			<Horizontal y=\"4\" height=\"12\"/>\n",
+"		</BlackAreas>\n",
+"		<Aliases>\n",
+"			<Alias>Canon EOS REBEL T3</Alias>\n",
+"		</Aliases>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 1200D\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"146\" y=\"54\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"2046\" white=\"12279\" iso_min=\"0\" iso_max = \"199\"/>\n",
+"		<Sensor black=\"2046\" white=\"15000\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"140\"/>\n",
+"			<Horizontal y=\"4\" height=\"44\"/>\n",
+"		</BlackAreas>\n",
+"		<Aliases>\n",
+"			<Alias>Canon EOS REBEL T5</Alias>\n",
+"			<Alias>Canon EOS Kiss X70</Alias>\n",
+"		</Aliases>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS 400D DIGITAL\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"42\" y=\"18\" width=\"3906\" height=\"2602\"/>\n",
+"		<Sensor black=\"255\" white=\"3726\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"40\"/>\n",
+"			<Horizontal y=\"4\" height=\"12\"/>\n",
+"		</BlackAreas>\n",
+"		<Aliases>\n",
+"			<Alias>Canon EOS DIGITAL REBEL XTi</Alias>\n",
+"			<Alias>Canon EOS Kiss Digital X</Alias>\n",
+"		</Aliases>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS M\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"76\" y=\"56\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"2026\" white=\"13584\" iso_min=\"0\" iso_max = \"199\"/>\n",
+"		<Sensor black=\"2026\" white=\"15304\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"70\"/>\n",
+"			<Horizontal y=\"4\" height=\"44\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS-1D Mark II\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"74\" y=\"12\" width=\"3522\" height=\"2348\"/>\n",
+"		<Sensor black=\"127\" white=\"3700\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"72\"/>\n",
+"			<Horizontal y=\"2\" height=\"8\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS-1D Mark II N\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"74\" y=\"12\" width=\"3522\" height=\"2348\"/>\n",
+"		<Sensor black=\"127\" white=\"3700\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"72\"/>\n",
+"			<Horizontal y=\"2\" height=\"8\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS-1D Mark III\" decoder_version=\"1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"78\" y=\"20\" width=\"3906\" height=\"2600\"/>\n",
+"		<Sensor black=\"1023\" white=\"15100\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"2\" width=\"74\"/>\n",
+"			<Horizontal y=\"4\" height=\"14\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS-1D Mark III\" mode=\"sRaw1\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"65535\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS-1D Mark III\" mode=\"sRaw2\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"65535\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS-1D Mark IV\" decoder_version=\"1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"144\" y=\"46\" width=\"-64\" height=\"-2\"/>\n",
+"		<Sensor black=\"2000\" white=\"13000\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"140\"/>\n",
+"			<Horizontal y=\"26\" height=\"16\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS-1D Mark IV\" mode=\"sRaw1\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"65535\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS-1D Mark IV\" mode=\"sRaw2\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"65535\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS-1Ds Mark II\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"98\" y=\"13\" width=\"5010\" height=\"3336\"/>\n",
+"		<Sensor black=\"126\" white=\"4060\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"96\"/>\n",
+"			<Horizontal y=\"2\" height=\"10\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS-1Ds Mark III\" decoder_version=\"1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"62\" y=\"20\" width=\"5640\" height=\"3752\"/>\n",
+"		<Sensor black=\"1021\" white=\"15100\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"60\"/>\n",
+"			<Horizontal y=\"4\" height=\"14\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS-1Ds Mark III\" mode=\"sRaw1\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"65535\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS-1Ds Mark III\" mode=\"sRaw2\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"65535\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS-1D X\" decoder_version=\"1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"128\" y=\"102\" width=\"0\" height=\"-2\"/>\n",
+"		<Sensor black=\"2050\" white=\"15100\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"120\"/>\n",
+"			<Horizontal y=\"0\" height=\"98\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS-1D X\" mode=\"sRaw1\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"65535\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"sraw_new\" value=\"\"/>\n",
+"			<Hint name=\"invert_sraw_wb\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon EOS-1D X\" mode=\"sRaw2\">\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"65535\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"sraw_new\" value=\"\"/>\n",
+"			<Hint name=\"invert_sraw_wb\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon PowerShot G1 X\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"82\" y=\"52\" width=\"-14\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"16383\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"68\"/>\n",
+"			<Horizontal y=\"0\" height=\"46\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon PowerShot G1 X Mark II\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"82\" y=\"52\" width=\"-14\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"16000\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"68\"/>\n",
+"			<Horizontal y=\"0\" height=\"46\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon PowerShot G12\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"54\" y=\"14\" width=\"-12\" height=\"-18\"/>\n",
+"		<Sensor black=\"120\" white=\"4095\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"50\"/>\n",
+"			<Horizontal y=\"0\" height=\"10\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon PowerShot G11\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"10\" y=\"18\" width=\"-56\" height=\"-14\"/>\n",
+"		<Sensor black=\"120\" white=\"4095\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"10\"/>\n",
+"			<Vertical x=\"3696\" width=\"48\"/>\n",
+"			<Horizontal y=\"0\" height=\"14\"/>\n",
+"			<Horizontal y=\"2778\" height=\"6\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon PowerShot G10\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"12\" y=\"13\" width=\"4432\" height=\"3323\"/>\n",
+"		<Sensor black=\"128\" white=\"4095\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"10\"/>\n",
+"			<Horizontal y=\"0\" height=\"8\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon PowerShot G9\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"48\" y=\"12\" width=\"4032\" height=\"3024\"/>\n",
+"		<Sensor black=\"125\" white=\"4095\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"46\"/>\n",
+"			<Horizontal y=\"0\" height=\"8\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon PowerShot G15\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"106\" y=\"12\" width=\"-10\" height=\"-66\"/>\n",
+"		<Sensor black=\"500\" white=\"2800\" iso_min=\"12800\" iso_max=\"12800\"/>\n",
+"		<Sensor black=\"128\" white=\"4095\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"100\"/>\n",
+"			<Horizontal y=\"3062\" height=\"60\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon PowerShot G16\" decoder_version=\"4\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"96\" y=\"18\" width=\"-24\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"80\"/>\n",
+"			<Horizontal y=\"0\" height=\"16\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon PowerShot SX1 IS\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"192\" y=\"12\" width=\"3958\" height=\"2760\"/>\n",
+"		<Sensor black=\"125\" white=\"4095\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"188\"/>\n",
+"			<Horizontal y=\"0\" height=\"10\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon PowerShot S90\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"10\" y=\"18\" width=\"-54\" height=\"-10\"/>\n",
+"		<Sensor black=\"125\" white=\"4095\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"6\"/>\n",
+"			<Horizontal y=\"0\" height=\"14\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon PowerShot S95\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"66\" y=\"24\" width=\"-20\" height=\"-24\"/>\n",
+"		<Sensor black=\"125\" white=\"4095\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"50\"/>\n",
+"			<Vertical x=\"3738\" width=\"6\"/>\n",
+"			<Horizontal y=\"0\" height=\"10\"/>\n",
+"			<Horizontal y=\"2774\" height=\"10\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon PowerShot S100\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"104\" y=\"12\" width=\"-10\" height=\"-66\"/>\n",
+"		<Sensor black=\"125\" white=\"4095\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"100\"/>\n",
+"			<Horizontal y=\"0\" height=\"10\"/>\n",
+"			<Horizontal y=\"3062\" height=\"60\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon PowerShot S110\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"106\" y=\"12\" width=\"-10\" height=\"-66\"/>\n",
+"		<Sensor black=\"500\" white=\"3072\" iso_min=\"12800\" iso_max=\"12800\"/>\n",
+"		<Sensor black=\"128\" white=\"4095\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"100\"/>\n",
+"			<Horizontal y=\"3062\" height=\"60\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"Canon\" model=\"Canon PowerShot SX50 HS\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"100\" y=\"20\" width=\"-10\" height=\"0\"/>\n",
+"		<Sensor black=\"127\" white=\"4095\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"6\" width=\"70\"/>\n",
+"			<Horizontal y=\"0\" height=\"16\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D100\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"2\" y=\"0\" width=\"3030\" height=\"2024\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"2000\" height=\"1312\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D1H\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"2012\" height=\"1324\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D1X\" supported=\"no\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"4024\" height=\"1324\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D200\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"2\" y=\"0\" width=\"3898\" height=\"2616\"/>\n",
+"		<Sensor black=\"0\" white=\"3880\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D2H\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"6\" y=\"0\" width=\"-8\" height=\"1648\"/>\n",
+"		<Sensor black=\"0\" white=\"3880\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D2Hs\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"6\" y=\"0\" width=\"-8\" height=\"1648\"/>\n",
+"		<Sensor black=\"0\" white=\"3880\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D2X\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-32\" height=\"-8\"/>\n",
+"		<Sensor black=\"0\" white=\"3880\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"2\" y=\"0\" width=\"4282\" height=\"2844\"/>\n",
+"		<Sensor black=\"0\" white=\"16384\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D3S\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"16384\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D3X\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"6080\" height=\"4044\"/>\n",
+"		<Sensor black=\"0\" white=\"16384\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D300\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"4320\" height=\"2868\"/>\n",
+"		<Sensor black=\"0\" white=\"15236\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D300S\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"4320\" height=\"2868\"/>\n",
+"		<Sensor black=\"0\" white=\"15236\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D3000\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3898\" height=\"2610\"/>\n",
+"		<Sensor black=\"0\" white=\"16383\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D3200\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-48\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"16383\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D3300\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"8\" y=\"8\" width=\"-8\" height=\"-8\"/>\n",
+"		<Sensor black=\"150\" white=\"3880\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"nikon_override_auto_black\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D4\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"2\" y=\"0\" width=\"-50\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"16383\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"4984\" width=\"8\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON Df\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"2\" y=\"0\" width=\"-50\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"16383\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"4984\" width=\"8\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D5100\"\tdecoder_version=\"2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-46\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"65536\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D3100\"\tdecoder_version=\"2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"8\" y=\"2\" width=\"-24\" height=\"-2\"/>\n",
+"		<Sensor black=\"0\" white=\"16383\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D40\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3038\" height=\"2014\"/>\n",
+"		<Sensor black=\"0\" white=\"3880\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D40X\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"4\" y=\"0\" width=\"3896\" height=\"2613\"/>\n",
+"		<Sensor black=\"0\" white=\"3880\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D50\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-2\" height=\"-2\"/>\n",
+"		<Sensor black=\"0\" white=\"3880\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D5000\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"4310\" height=\"2868\"/>\n",
+"		<Sensor black=\"0\" white=\"4096\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D5200\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"4096\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D5300\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"600\" white=\"15892\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"nikon_override_auto_black\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D60\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3900\" height=\"2613\"/>\n",
+"		<Sensor black=\"0\" white=\"3880\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D600\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-50\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"16383\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D610\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-50\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"16383\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D70\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3038\" height=\"2014\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D700\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"2\" y=\"0\" width=\"4282\" height=\"2844\"/>\n",
+"		<Sensor black=\"0\" white=\"3972\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D700\" mode=\"14bit-uncompressed\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"2\" y=\"0\" width=\"4282\" height=\"2844\"/>\n",
+"		<Sensor black=\"0\" white=\"16383\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D7000\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-46\" height=\"-2\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D7100\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"16383\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D70s\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3040\" height=\"2014\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D80\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3900\" height=\"2611\"/>\n",
+"		<Sensor black=\"0\" white=\"3880\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D800\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"2\" y=\"0\" width=\"-48\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"3972\"/>\n",
+"		<Aliases>\n",
+"			<Alias>NIKON D800E</Alias>\n",
+"		</Aliases>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON D90\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"4310\" height=\"2868\"/>\n",
+"		<Sensor black=\"0\" white=\"3767\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON 1 J1\" decoder_version=\"4\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"-2\"/>\n",
+"		<Sensor black=\"0\" white=\"0\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON 1 J2\" decoder_version=\"4\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"-2\"/>\n",
+"		<Sensor black=\"0\" white=\"0\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON 1 J3\" decoder_version=\"4\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"-2\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON 1 S1\" decoder_version=\"4\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"-2\"/>\n",
+"		<Sensor black=\"0\" white=\"0\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON 1 V1\" decoder_version=\"4\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"-2\"/>\n",
+"		<Sensor black=\"0\" white=\"0\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON 1 V2\" decoder_version=\"4\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"NIKON 1 AW1\" decoder_version=\"4\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON\" model=\"E5400\" decoder_version=\"3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"2608\" height=\"1950\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"coolpixsplit\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON\" model=\"E5700\" decoder_version=\"4\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"2576\" height=\"1924\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"coolpixsplit\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON\" model=\"E8400\" decoder_version=\"3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3280\" height=\"2454\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"coolpixsplit\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON\" model=\"COOLPIX P330\" supported=\"yes\" decoder_version=\"5\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"3200\" white=\"65535\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"force_uncompressed\" value=\"\"/>\n",
+"			<Hint name=\"real_bpp\" value=\"16\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON CORPORATION\" model=\"COOLPIX A\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-44\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON\" model=\"COOLPIX P6000\" supported=\"yes\" decoder_version=\"1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"coolpixmangled\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON\" model=\"COOLPIX P7000\" supported=\"yes\" decoder_version=\"1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"coolpixmangled\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON\" model=\"COOLPIX P7100\" supported=\"yes\" decoder_version=\"1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"		<Sensor black=\"250\" white=\"4095\" iso_min=\"400\" iso_max=\"0\"/>\n",
+"		<!-- In usual Nikon style, ISO 6400 is marked as ISO 0 -->\n",
+"		<Sensor black=\"260\" white=\"4095\" iso_min=\"0\" iso_max=\"1\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"coolpixmangled\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON\" model=\"COOLPIX P7700\" supported=\"yes\" decoder_version=\"5\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"3200\" white=\"65535\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"force_uncompressed\" value=\"\"/>\n",
+"			<Hint name=\"real_bpp\" value=\"16\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON\" model=\"COOLPIX P7800\" supported=\"yes\" decoder_version=\"5\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"3200\" white=\"65535\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"force_uncompressed\" value=\"\"/>\n",
+"			<Hint name=\"real_bpp\" value=\"16\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"NIKON\" model=\"E8800\" decoder_version=\"3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3280\" height=\"2454\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"coolpixsplit\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS CORPORATION\" model=\"C8080WZ\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3280\" height=\"2453\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS CORPORATION\" model=\"E-1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"2624\" height=\"1966\"/>\n",
+"		<Sensor black=\"65\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"C7070WZ\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3088\" height=\"2309\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3720\" height=\"2800\"/>\n",
+"		<Sensor black=\"65\" white=\"4015\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-30\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-6\" height=\"-2\"/>\n",
+"		<Sensor black=\"65\" white=\"4015\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-300\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3340\" height=\"2504\"/>\n",
+"		<Sensor black=\"63\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-330\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3250\" height=\"2450\"/>\n",
+"		<Sensor black=\"77\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-400\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3768\" height=\"2840\"/>\n",
+"		<Sensor black=\"96\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-410\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3720\" height=\"2800\"/>\n",
+"		<Sensor black=\"72\" white=\"3500\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-420\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3720\" height=\"2800\"/>\n",
+"		<Sensor black=\"68\" white=\"4015\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-500\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3340\" height=\"2504\"/>\n",
+"		<Sensor black=\"63\" white=\"3967\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-510\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3720\" height=\"2800\"/>\n",
+"		<Sensor black=\"72\" white=\"3500\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-520\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3720\" height=\"2800\"/>\n",
+"		<Sensor black=\"69\" white=\"4015\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-600\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"4096\" height=\"3072\"/>\n",
+"		<Sensor black=\"64\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-620\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"4096\" height=\"3072\"/>\n",
+"		<Sensor black=\"64\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"SP350\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3280\" height=\"2453\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"SP500UZ\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"2832\" height=\"2117\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-5\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-4\" height=\"0\"/>\n",
+"		<Sensor black=\"80\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS OPTICAL CO.,LTD\" model=\"E-10\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"2256\" height=\"1684\"/>\n",
+"		<Sensor black=\"32\" white=\"1023\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS OPTICAL CO.,LTD\" model=\"E-20,E-20N,E-20P\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"2576\" height=\"1924\"/>\n",
+"		<Sensor black=\"32\" white=\"1023\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-M1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"255\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-M10\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"254\" white=\"4000\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-M5\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"255\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-P1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"4094\" height=\"3082\"/>\n",
+"		<Sensor black=\"55\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-PL1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"4094\" height=\"3082\"/>\n",
+"		<Sensor black=\"55\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-PL2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-4\" height=\"0\"/>\n",
+"		<Sensor black=\"45\" white=\"4095\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"4097\" width=\"2\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-PL3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-30\" height=\"0\"/>\n",
+"		<Sensor black=\"45\" white=\"4095\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"4064\" width=\"6\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-PL5\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-P5\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"250\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-PM1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-24\" height=\"0\"/>\n",
+"		<Sensor black=\"45\" white=\"4095\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"4064\" width=\"6\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-PM2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"250\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-P2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"55\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"E-P3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-26\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"XZ-1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"-2\"/>\n",
+"		<Sensor black=\"55\" white=\"3972\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"XZ-2\" decoder_version=\"2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"-2\"/>\n",
+"		<Sensor black=\"200\" white=\"4092\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"force_uncompressed\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"XZ-10\" decoder_version=\"2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"-2\"/>\n",
+"		<Sensor black=\"200\" white=\"4092\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"force_uncompressed\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"\t\t\t\t<Camera make=\"OLYMPUS IMAGING CORP.\" model=\"STYLUS1\">\n",
+"\t\t\t\t\t\t\t\t<CFA width=\"2\" height=\"2\">\n",
+"\t\t\t\t\t\t\t\t\t\t\t\t<Color x=\"0\" y=\"0\">RED</Color>\n",
+"\t\t\t\t\t\t\t\t\t\t\t\t<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"\t\t\t\t\t\t\t\t\t\t\t\t<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"\t\t\t\t\t\t\t\t\t\t\t\t<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"\t\t\t\t\t\t\t\t</CFA>\n",
+"\t\t\t\t\t\t\t\t<Crop x=\"0\" y=\"0\" width=\"-14\" height=\"0\"/>\n",
+"\t\t\t\t\t\t\t\t<Sensor black=\"200\" white=\"3900\"/>\n",
+"\t\t\t\t</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-FX150\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"4429\" height=\"3324\"/>\n",
+"		<Sensor black=\"15\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-FX150\" mode = \"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"4429\" height=\"3324\"/>\n",
+"		<Sensor black=\"15\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-FZ28\" mode = \"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3668\" height=\"2754\"/>\n",
+"		<Sensor black=\"15\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-FZ28\" mode = \"16:9\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3668\" height=\"2754\"/>\n",
+"		<Sensor black=\"15\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-FZ28\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-56\" height=\"-4\"/>\n",
+"		<Sensor black=\"15\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-FZ150\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-128\" height=\"0\"/>\n",
+"		<Sensor black=\"15\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-FZ150\" mode=\"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-128\" height=\"0\"/>\n",
+"		<Sensor black=\"15\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-FZ200\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-128\" height=\"-4\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-FZ200\" mode=\"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-128\" height=\"-4\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-G1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"4018\" height=\"3016\" />\n",
+"		<Sensor black=\"15\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-G1\" mode=\"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"4018\" height=\"3016\" />\n",
+"		<Sensor black=\"15\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-G1\" mode=\"16:9\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-32\" height=\"0\" />\n",
+"		<Sensor black=\"15\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-G1\" mode=\"3:2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-44\" height=\"0\" />\n",
+"		<Sensor black=\"15\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-G2\" mode=\"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-44\" height=\"0\" />\n",
+"		<Sensor black=\"0\" white=\"3900\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-G2\" mode=\"3:2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-44\" height=\"0\" />\n",
+"		<Sensor black=\"0\" white=\"3900\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-G2\" mode=\"16:9\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-44\" height=\"0\" />\n",
+"		<Sensor black=\"0\" white=\"3900\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-G2\" mode=\"1:1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\" />\n",
+"		<Sensor black=\"0\" white=\"3900\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-G2\">\n",
+"		<!-- Default Guess -->\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-44\" height=\"0\" />\n",
+"		<Sensor black=\"0\" white=\"3900\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-G10\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-44\" height=\"0\" />\n",
+"		<Sensor black=\"0\" white=\"3900\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-G10\" mode=\"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-44\" height=\"0\" />\n",
+"		<Sensor black=\"0\" white=\"3900\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GH1\" mode=\"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-44\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"3986\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GH1\">\n",
+"		<!-- Default Guess -->\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-44\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"3986\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GH3\" mode=\"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-194\" height=\"0\"/>\n",
+"		<Sensor black=\"155\" white=\"3956\"/>\n",
+"		<Sensor black=\"165\" white=\"3941\" iso_min=\"6400\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GH3\" mode=\"3:2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-194\" height=\"0\"/>\n",
+"		<Sensor black=\"155\" white=\"3956\"/>\n",
+"		<Sensor black=\"165\" white=\"3941\" iso_min=\"6400\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GH3\" mode=\"16:9\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-194\" height=\"0\"/>\n",
+"		<Sensor black=\"155\" white=\"3956\"/>\n",
+"		<Sensor black=\"165\" white=\"3941\" iso_min=\"6400\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GH3\" mode=\"1:1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"155\" white=\"3956\"/>\n",
+"		<Sensor black=\"165\" white=\"3941\" iso_min=\"6400\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<!-- Default Guess -->\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GH3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-194\" height=\"0\"/>\n",
+"		<Sensor black=\"155\" white=\"3956\"/>\n",
+"		<Sensor black=\"165\" white=\"3941\" iso_min=\"6400\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GF1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-44\" height=\"0\"/>\n",
+"		<Sensor black=\"15\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GF1\" mode=\"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-44\" height=\"0\"/>\n",
+"		<Sensor black=\"15\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GF1\" mode=\"16:9\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-44\" height=\"0\"/>\n",
+"		<Sensor black=\"15\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GF1\" mode=\"3:2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-44\" height=\"0\"/>\n",
+"		<Sensor black=\"15\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GF1\" mode=\"1:1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-44\" height=\"0\"/>\n",
+"		<Sensor black=\"15\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GF2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-74\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GF2\" mode=\"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-74\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GF2\" mode=\"16:9\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-74\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GF2\" mode=\"3:2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-74\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GF2\" mode=\"1:1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-74\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GM1\" mode=\"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-206\" height=\"0\"/>\n",
+"		<Sensor black=\"143\" white=\"3971\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GM1\" mode=\"3:2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-206\" height=\"0\"/>\n",
+"		<Sensor black=\"143\" white=\"3971\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GM1\" mode=\"16:9\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-206\" height=\"0\"/>\n",
+"		<Sensor black=\"143\" white=\"3971\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GM1\" mode=\"1:1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"143\" white=\"3971\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<!-- Default Guess -->\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GM1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-206\" height=\"0\"/>\n",
+"		<Sensor black=\"143\" white=\"3971\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-G3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-154\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-G3\" mode=\"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-172\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-G5\" mode=\"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-194\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-G5\" mode=\"3:2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-194\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-G5\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-194\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-G6\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-194\" height=\"0\"/>\n",
+"		<Sensor black=\"142\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-G6\" mode=\"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-194\" height=\"0\"/>\n",
+"		<Sensor black=\"142\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-G6\" mode=\"3:2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-194\" height=\"0\"/>\n",
+"		<Sensor black=\"142\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-G6\" mode=\"16:9\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-194\" height=\"0\"/>\n",
+"		<Sensor black=\"142\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-G6\" mode=\"1:1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"142\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GF3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-72\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GF3\" mode= \"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-72\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GF5\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-128\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GF5\" mode= \"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-128\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GF6\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-208\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GF6\" mode= \"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-208\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GH2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-216\" height=\"0\"/>\n",
+"		<Sensor black=\"15\" white=\"3800\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GH2\" mode=\"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-136\" height=\"0\"/>\n",
+"		<Sensor black=\"15\" white=\"3800\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GH2\" mode=\"16:9\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-216\" height=\"0\"/>\n",
+"		<Sensor black=\"15\" white=\"3800\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GH2\" mode=\"3:2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-216\" height=\"0\"/>\n",
+"		<Sensor black=\"15\" white=\"3800\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GH2\" mode=\"1:1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-168\" height=\"0\"/>\n",
+"		<Sensor black=\"15\" white=\"3800\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GH1\" mode=\"16:9\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-28\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"3986\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-FZ35\" mode=\"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-44\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3986\"/>\n",
+"		<Aliases>\n",
+"			<Alias>DMC-FZ38</Alias>\n",
+"		</Aliases>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-FZ35\">\n",
+"		<!-- Default Guess -->\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-44\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3986\"/>\n",
+"		<Aliases>\n",
+"			<Alias>DMC-FZ38</Alias>\n",
+"		</Aliases>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-FZ45\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-58\" height=\"-10\"/>\n",
+"		<Sensor black=\"150\" white=\"3986\"/>\n",
+"		<Aliases>\n",
+"			<Alias>DMC-FZ40</Alias>\n",
+"		</Aliases>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-FZ45\" mode = \"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-58\" height=\"-10\"/>\n",
+"		<Sensor black=\"150\" white=\"3986\"/>\n",
+"		<Aliases>\n",
+"			<Alias>DMC-FZ40</Alias>\n",
+"		</Aliases>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-FZ50\" mode = \"4:3\" decoder_version = \"1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"20\" y=\"18\" width=\"-86\" height=\"-28\"/>\n",
+"		<Sensor black=\"0\" white=\"65535\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-FZ70\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-182\" height=\"0\"/>\n",
+"		<Sensor black=\"120\" white=\"3971\"/>\n",
+"		<Aliases>\n",
+"			<Alias>DMC-FZ72</Alias>\n",
+"		</Aliases>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-FZ70\" mode=\"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-182\" height=\"0\"/>\n",
+"		<Sensor black=\"120\" white=\"3971\"/>\n",
+"		<Aliases>\n",
+"			<Alias>DMC-FZ72</Alias>\n",
+"		</Aliases>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-FZ100\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-200\" height=\"0\"/>\n",
+"		<Sensor black=\"120\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-FZ100\" mode=\"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-200\" height=\"0\"/>\n",
+"		<Sensor black=\"120\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GX1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-154\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GX1\" mode = \"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-154\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GX1\" mode = \"3:2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-170\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GX1\" mode = \"16:9\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-170\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GX1\" mode = \"1:1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-198\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GX7\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-208\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GX7\" mode = \"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-208\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GX7\" mode = \"3:2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-208\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GX7\" mode = \"16:9\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-208\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-GX7\" mode = \"1:1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-32\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-LF1\" mode=\"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-130\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<!-- Default guess -->\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-LF1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-130\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3956\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-LX3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-84\" height=\"0\"/>\n",
+"		<Sensor black=\"15\" white=\"3971\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-LX3\" mode=\"16:9\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3990\" height=\"2250\"/>\n",
+"		<Sensor black=\"15\" white=\"3971\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-LX3\" mode=\"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3666\" height=\"2754\"/>\n",
+"		<Sensor black=\"15\" white=\"3971\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-LX3\" mode=\"3:2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-44\" height=\"0\"/>\n",
+"		<Sensor black=\"15\" white=\"3971\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<!-- Leica D-Lux 4 is the same camera as LX-3 -->\n",
+"	<Camera make=\"LEICA\" model = \"D-LUX 4\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-84\" height=\"0\"/>\n",
+"		<Sensor black=\"15\" white=\"3971\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"LEICA\" model = \"D-LUX 4\" mode=\"16:9\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3990\" height=\"2250\"/>\n",
+"		<Sensor black=\"15\" white=\"3971\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"LEICA\" model = \"D-LUX 4\" mode=\"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3666\" height=\"2754\"/>\n",
+"		<Sensor black=\"15\" white=\"3971\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"LEICA\" model = \"D-LUX 4\" mode=\"3:2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-44\" height=\"0\"/>\n",
+"		<Sensor black=\"15\" white=\"3971\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-LX5\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-200\" height=\"-4\"/>\n",
+"		<Sensor black=\"150\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-LX5\" mode=\"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-200\" height=\"-4\"/>\n",
+"		<Sensor black=\"150\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-LX5\" mode=\"3:2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-74\" height=\"-4\"/>\n",
+"		<Sensor black=\"150\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-LX5\" mode=\"1:1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-220\" height=\"-4\"/>\n",
+"		<Sensor black=\"150\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<!-- Leica D-Lux 5 is the same camera as LX-5 -->\n",
+"	<Camera make=\"LEICA\" model = \"D-LUX 5\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-200\" height=\"-4\"/>\n",
+"		<Sensor black=\"150\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"LEICA\" model = \"D-LUX 5\" mode=\"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-200\" height=\"-4\"/>\n",
+"		<Sensor black=\"150\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"LEICA\" model = \"D-LUX 5\" mode=\"3:2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-74\" height=\"-4\"/>\n",
+"		<Sensor black=\"150\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"LEICA\" model = \"D-LUX 5\" mode=\"1:1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-220\" height=\"-4\"/>\n",
+"		<Sensor black=\"150\" white=\"3986\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-LX7\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-34\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3971\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-LX7\" mode=\"4:3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-34\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3971\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-LX7\" mode=\"3:2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-128\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3971\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-LX7\" mode=\"16:9\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-160\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3971\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"Panasonic\" model = \"DMC-LX7\" mode=\"1:1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-48\" height=\"0\"/>\n",
+"		<Sensor black=\"150\" white=\"3971\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"zero_is_bad\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"PENTAX Corporation\" model=\"PENTAX K100D\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3040\" height=\"2024\"/>\n",
+"		<Sensor black=\"127\" white=\"3950\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"PENTAX\" model=\"PENTAX K100D\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3040\" height=\"2024\"/>\n",
+"		<Sensor black=\"127\" white=\"3950\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"PENTAX Corporation\" model=\"PENTAX K10D\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3888\" height=\"2608\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"PENTAX Corporation\" model=\"PENTAX K20D\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"4688\" height=\"3124\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"PENTAX\" model=\"PENTAX K20D\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"4688\" height=\"3124\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"PENTAX Corporation\" model=\"PENTAX K200D\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3880\" height=\"2604\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"PENTAX\" model=\"PENTAX K-5\" decoder_version=\"2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"12\" y=\"0\" width=\"-34\" height=\"0\"/>\n",
+"		<Sensor black=\"512\" white=\"16383\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"8\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"PENTAX\" model=\"PENTAX K-5 II\" decoder_version=\"2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"12\" y=\"0\" width=\"-34\" height=\"0\"/>\n",
+"		<Sensor black=\"512\" white=\"16383\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"8\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"PENTAX\" model=\"PENTAX K-5 II s\" decoder_version=\"2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"12\" y=\"0\" width=\"-34\" height=\"0\"/>\n",
+"		<Sensor black=\"512\" white=\"15863\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"8\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"PENTAX\" model=\"PENTAX K-7\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"4672\" height=\"3104\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"PENTAX\" model=\"PENTAX K-m\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3900\" height=\"2616\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"PENTAX\" model=\"PENTAX K-x\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-44\" height=\"-2\"/>\n",
+"		<Sensor black=\"41\" white=\"4095\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"4310\" width=\"40\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"PENTAX\" model=\"PENTAX K-r\" decoder_version=\"3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"2\" y=\"2\" width=\"-44\" height=\"0\"/>\n",
+"		<Sensor black=\"64\" white=\"4000\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"PENTAX\" model=\"PENTAX K200D\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-42\" height=\"-10\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"PENTAX\" model=\"PENTAX K2000\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3900\" height=\"2616\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SAMSUNG\" model=\"EX2F\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"22\" y=\"12\" width=\"-148\" height=\"-18\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SAMSUNG\" model=\"EX1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"2\" width=\"-8\" height=\"-22\"/>\n",
+"		<Sensor black=\"0\" white=\"16383\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SAMSUNG\" model=\"NX5\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"17\" y=\"8\" width=\"4602\" height=\"3068\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"8\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"SAMSUNG\" model=\"NX10\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"17\" y=\"8\" width=\"4602\" height=\"3068\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"8\"/>\n",
+"			<Horizontal y=\"0\" height=\"2\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"SAMSUNG\" model=\"NX11\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"17\" y=\"8\" width=\"4602\" height=\"3068\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"8\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"SAMSUNG\" model=\"NX100\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"17\" y=\"8\" width=\"4602\" height=\"3068\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"0\" width=\"8\"/>\n",
+"			<Horizontal y=\"0\" height=\"2\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"SAMSUNG\" model=\"NX1000\" decoder_version=\"2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"89\" y=\"17\" width=\"-71\" height=\"-55\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"msb_override\" value=\"false\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"SAMSUNG\" model=\"NX1100\" decoder_version=\"2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"89\" y=\"17\" width=\"-71\" height=\"-55\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"msb_override\" value=\"false\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"SAMSUNG\" model=\"NX20\" decoder_version=\"2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"89\" y=\"17\" width=\"-71\" height=\"-55\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"msb_override\" value=\"false\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"SAMSUNG\" model=\"NX200\" decoder_version=\"2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"89\" y=\"17\" width=\"-71\" height=\"-55\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"msb_override\" value=\"false\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"SAMSUNG\" model=\"NX210\" decoder_version=\"2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"89\" y=\"17\" width=\"-71\" height=\"-55\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"msb_override\" value=\"false\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"	<Camera make=\"SAMSUNG\" model=\"NX2000\" decoder_version=\"3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"45\" y=\"25\" width=\"-11\" height=\"-29\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SAMSUNG\" model=\"NX30\" decoder_version=\"3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"45\" y=\"25\" width=\"-11\" height=\"-29\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SAMSUNG\" model=\"NX300\" decoder_version=\"3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"45\" y=\"25\" width=\"-11\" height=\"-29\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SAMSUNG\" model=\"EK-GN120\" decoder_version=\"3\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">BLUE</Color>\n",
+"			<Color x=\"0\" y=\"1\">RED</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"45\" y=\"25\" width=\"-11\" height=\"-29\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SAMSUNG\" model=\"WB2000\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"2\" width=\"-10\" height=\"-2\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"DSC-RX10\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-8\" height=\"0\"/>\n",
+"		<Sensor black=\"800\" white=\"16300\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"DSC-RX100\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-12\" height=\"0\"/>\n",
+"		<Sensor black=\"800\" white=\"16620\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"DSC-RX100M2\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-12\" height=\"0\"/>\n",
+"		<Sensor black=\"800\" white=\"16300\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"DSC-RX1R\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-16\" height=\"0\"/>\n",
+"		<Sensor black=\"512\" white=\"33192\" iso_list=\"50\"/>\n",
+"		<Sensor black=\"512\" white=\"16596\"/>\n",
+"		<BlackAreas>\n",
+"			<Vertical x=\"6032\" width=\"14\"/>\n",
+"		</BlackAreas>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"DSLR-A100\" supported=\"no\">\n",
+"		<!-- Files doesn't have a valid TIFF structure -->\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"0\">RED</Color>\n",
+"			<Color x=\"0\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"1\">GREEN</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3880\" height=\"2600\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"DSLR-A200\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3878\" height=\"2600\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"DSLR-A230\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"DSLR-A290\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"DSLR-A300\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3878\" height=\"2600\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"DSLR-A330\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"3878\" height=\"2600\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"DSLR-A350\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"4599\" height=\"3064\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"DSLR-A390\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"4095\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"DSLR-A450\" supported=\"yes\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"500\" white=\"16000\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"DSLR-A500\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"500\" white=\"16600\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"DSLR-A550\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"512\" white=\"16372\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"DSLR-A560\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"476\" white=\"16596\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"DSLR-A580\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-2\" height=\"-2\"/>\n",
+"		<Sensor black=\"520\" white=\"16596\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"DSLR-A700\" supported=\"yes\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"4288\" height=\"2856\"/>\n",
+"		<Sensor black=\"520\" white=\"16383\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"DSLR-A850\" supported=\"yes\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"6080\" height=\"4048\"/>\n",
+"		<Sensor black=\"500\" white=\"15000\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"DSLR-A900\" supported=\"yes\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"6080\" height=\"4048\"/>\n",
+"		<Sensor black=\"520\" white=\"16383\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"NEX-3\" supported=\"yes\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"520\" white=\"16360\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"NEX-3N\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-10\" height=\"0\"/>\n",
+"		<Sensor black=\"520\" white=\"16596\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"NEX-5\" supported=\"yes\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"520\" white=\"16383\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"NEX-5N\" supported=\"yes\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-12\" height=\"0\"/>\n",
+"		<Sensor black=\"520\" white=\"16596\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"NEX-5R\" supported=\"yes\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-12\" height=\"0\"/>\n",
+"		<Sensor black=\"520\" white=\"16596\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"NEX-5T\" supported=\"yes\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-12\" height=\"0\"/>\n",
+"		<Sensor black=\"512\" white=\"16300\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"NEX-6\" supported=\"yes\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-16\" height=\"0\"/>\n",
+"		<Sensor black=\"520\" white=\"16596\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"NEX-7\" supported=\"yes\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-26\" height=\"0\"/>\n",
+"		<Sensor black=\"520\" white=\"16383\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"NEX-C3\" supported=\"yes\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"520\" white=\"16596\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"NEX-F3\" supported=\"yes\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"520\" white=\"16360\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"ILCE-3000\" supported=\"yes\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-34\" height=\"0\"/>\n",
+"		<Sensor black=\"512\" white=\"16300\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"ILCE-5000\" supported=\"yes\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-34\" height=\"0\"/>\n",
+"		<Sensor black=\"512\" white=\"16300\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"ILCE-6000\" supported=\"yes\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-28\" height=\"0\"/>\n",
+"		<Sensor black=\"512\" white=\"16300\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"ILCE-7\" supported=\"yes\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-26\" height=\"0\"/>\n",
+"		<Sensor black=\"512\" white=\"16300\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"ILCE-7R\" supported=\"yes\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-26\" height=\"0\"/>\n",
+"		<Sensor black=\"512\" white=\"16300\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"DSC-RX1\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-18\" height=\"0\"/>\n",
+"		<Sensor black=\"520\" white=\"16628\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"SLT-A33\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"520\" white=\"16596\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"SLT-A35\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"545\" white=\"16596\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"SLT-A37\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"520\" white=\"16500\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"SLT-A55V\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"520\" white=\"16596\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"SLT-A57\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"512\" white=\"16596\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"SLT-A58\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-36\" height=\"0\"/>\n",
+"		<Sensor black=\"520\" white=\"16596\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"SLT-A65V\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-30\" height=\"0\"/>\n",
+"		<Sensor black=\"520\" white=\"16596\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"SLT-A77V\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-28\" height=\"0\"/>\n",
+"		<Sensor black=\"520\" white=\"16596\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"SONY\" model=\"SLT-A99V\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"-28\" height=\"0\"/>\n",
+"		<Sensor black=\"520\" white=\"16596\"/>\n",
+"	</Camera>\n",
+"	<Camera make=\"Sinar Photography AG\" model=\"Sinar Hy6/ Sinarback eXact\" mode=\"dng\">\n",
+"		<CFA width=\"2\" height=\"2\">\n",
+"			<Color x=\"0\" y=\"0\">RED</Color>\n",
+"			<Color x=\"1\" y=\"0\">GREEN</Color>\n",
+"			<Color x=\"0\" y=\"1\">GREEN</Color>\n",
+"			<Color x=\"1\" y=\"1\">BLUE</Color>\n",
+"		</CFA>\n",
+"		<Crop x=\"0\" y=\"0\" width=\"0\" height=\"0\"/>\n",
+"		<Sensor black=\"0\" white=\"0\"/>\n",
+"		<Hints>\n",
+"			<Hint name=\"ignore_bytecount\" value=\"\"/>\n",
+"		</Hints>\n",
+"	</Camera>\n",
+"</Cameras>\n",
+0
+};

+ 2 - 0
raw.mod/libraw/bin/.keep_me

@@ -0,0 +1,2 @@
+
+

+ 5 - 0
raw.mod/libraw/buildfiles/4channels.pro

@@ -0,0 +1,5 @@
+include (libraw-common.pro)
+win32:LIBS+=libraw.lib
+unix:LIBS+=-lraw
+CONFIG-=qt
+SOURCES=../samples/4channels.cpp

+ 145 - 0
raw.mod/libraw/buildfiles/4channels.vcxproj

@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{F68CBE78-B27A-3A05-BCD3-293E8CAC1C52}</ProjectGuid>
+    <RootNamespace>4channels</RootNamespace>
+    <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>debug-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>Application</ConfigurationType>
+    <IntermediateDirectory>debug-x86_64\4channels.obj\</IntermediateDirectory>
+    <PrimaryOutput>4channels</PrimaryOutput>
+  </PropertyGroup>
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>release-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>Application</ConfigurationType>
+    <IntermediateDirectory>release-x86_64\4channels.obj\</IntermediateDirectory>
+    <PrimaryOutput>4channels</PrimaryOutput>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings" />
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\4channels.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">4channels</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">true</IgnoreImportLibrary>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\4channels.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">4channels</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">true</IgnoreImportLibrary>
+    <LinkIncremental Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug-x86_64\4channels.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>debug-x86_64\4channels.obj\</ObjectFileName>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;libraw.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>debug-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions>&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot; %(AdditionalOptions)</AdditionalOptions>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <OutputFile>$(OutDir)\4channels.exe</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Console</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release-x86_64\4channels.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>None</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>release-x86_64\4channels.obj\</ObjectFileName>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <ProgramDataBaseFileName></ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;libraw.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>release-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions>&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot; %(AdditionalOptions)</AdditionalOptions>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
+      <OptimizeReferences>true</OptimizeReferences>
+      <OutputFile>$(OutDir)\4channels.exe</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Console</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\samples\4channels.cpp" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets" />
+</Project>

+ 18 - 0
raw.mod/libraw/buildfiles/4channels.vcxproj.filters

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\samples\4channels.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>

+ 6 - 0
raw.mod/libraw/buildfiles/dcraw_emu.pro

@@ -0,0 +1,6 @@
+include (libraw-common.pro)
+win32:LIBS+=libraw.lib
+unix:LIBS+=-lraw
+CONFIG-=qt
+CONFIG+=debug_and_release
+SOURCES=../samples/dcraw_emu.cpp

+ 145 - 0
raw.mod/libraw/buildfiles/dcraw_emu.vcxproj

@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{48688DB8-559A-3DE2-ADDE-5BD27BFEDDA2}</ProjectGuid>
+    <RootNamespace>dcraw_emu</RootNamespace>
+    <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>debug-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>Application</ConfigurationType>
+    <IntermediateDirectory>debug-x86_64\dcraw_emu.obj\</IntermediateDirectory>
+    <PrimaryOutput>dcraw_emu</PrimaryOutput>
+  </PropertyGroup>
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>release-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>Application</ConfigurationType>
+    <IntermediateDirectory>release-x86_64\dcraw_emu.obj\</IntermediateDirectory>
+    <PrimaryOutput>dcraw_emu</PrimaryOutput>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings" />
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\dcraw_emu.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">dcraw_emu</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">true</IgnoreImportLibrary>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\dcraw_emu.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">dcraw_emu</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">true</IgnoreImportLibrary>
+    <LinkIncremental Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug-x86_64\dcraw_emu.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>debug-x86_64\dcraw_emu.obj\</ObjectFileName>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;libraw.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>debug-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions>&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot; %(AdditionalOptions)</AdditionalOptions>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <OutputFile>$(OutDir)\dcraw_emu.exe</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Console</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release-x86_64\dcraw_emu.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>None</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>release-x86_64\dcraw_emu.obj\</ObjectFileName>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <ProgramDataBaseFileName></ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;libraw.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>release-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions>&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot; %(AdditionalOptions)</AdditionalOptions>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
+      <OptimizeReferences>true</OptimizeReferences>
+      <OutputFile>$(OutDir)\dcraw_emu.exe</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Console</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\samples\dcraw_emu.cpp" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets" />
+</Project>

+ 18 - 0
raw.mod/libraw/buildfiles/dcraw_emu.vcxproj.filters

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\samples\dcraw_emu.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>

+ 6 - 0
raw.mod/libraw/buildfiles/dcraw_half.pro

@@ -0,0 +1,6 @@
+include (libraw-common.pro)
+win32:LIBS+=libraw.lib
+unix:LIBS+=-lraw
+CONFIG-=qt
+CONFIG+=debug_and_release
+SOURCES=../samples/dcraw_half.c

+ 145 - 0
raw.mod/libraw/buildfiles/dcraw_half.vcxproj

@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{C6EACFA3-9FC5-393B-BCF6-2874B05E4581}</ProjectGuid>
+    <RootNamespace>dcraw_half</RootNamespace>
+    <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>debug-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>Application</ConfigurationType>
+    <IntermediateDirectory>debug-x86_64\dcraw_half.obj\</IntermediateDirectory>
+    <PrimaryOutput>dcraw_half</PrimaryOutput>
+  </PropertyGroup>
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>release-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>Application</ConfigurationType>
+    <IntermediateDirectory>release-x86_64\dcraw_half.obj\</IntermediateDirectory>
+    <PrimaryOutput>dcraw_half</PrimaryOutput>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings" />
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\dcraw_half.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">dcraw_half</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">true</IgnoreImportLibrary>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\dcraw_half.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">dcraw_half</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">true</IgnoreImportLibrary>
+    <LinkIncremental Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug-x86_64\dcraw_half.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>debug-x86_64\dcraw_half.obj\</ObjectFileName>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;libraw.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>debug-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions>&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot; %(AdditionalOptions)</AdditionalOptions>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <OutputFile>$(OutDir)\dcraw_half.exe</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Console</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release-x86_64\dcraw_half.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>None</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>release-x86_64\dcraw_half.obj\</ObjectFileName>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <ProgramDataBaseFileName></ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;libraw.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>release-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions>&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot; %(AdditionalOptions)</AdditionalOptions>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
+      <OptimizeReferences>true</OptimizeReferences>
+      <OutputFile>$(OutDir)\dcraw_half.exe</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Console</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\samples\dcraw_half.c" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets" />
+</Project>

+ 18 - 0
raw.mod/libraw/buildfiles/dcraw_half.vcxproj.filters

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\samples\dcraw_half.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>

+ 10 - 0
raw.mod/libraw/buildfiles/half_mt.pro

@@ -0,0 +1,10 @@
+include (libraw-common.pro)
+win32:LIBS+=libraw.lib
+unix:LIBS+=-lraw
+CONFIG-=qt
+CONFIG+=debug_and_release
+win32 {
+	SOURCES=../samples/half_mt_win32.c
+} else {
+	SOURCES=../samples/half_mt.c
+}

+ 28 - 0
raw.mod/libraw/buildfiles/libraw-common-lib.pro

@@ -0,0 +1,28 @@
+win32 {
+    QMAKE_CXXFLAGS+=/MP
+    !contains(QMAKE_HOST.arch, x86_64) {
+	SUFF="x86"
+    } else {
+        ## Windows x64 (64bit) specific build here
+	SUFF="x86_64"
+    }
+}
+
+CONFIG(debug,debug|release) {
+	win32:OUTD=debug-$$SUFF
+	win32:OUTDE=debug-$$SUFF
+	macx:OUTD=debug
+} else {
+	win32:OUTD=release-$$SUFF
+	win32:OUTDE=release-$$SUFF
+	macx:OUTD=release
+}
+
+INCLUDEPATH+=../
+OBJECTS_DIR = $$OUTD/$${TARGET}.obj
+MOC_DIR = $$OUTD/
+RCC_DIR = $$OUTD/
+UI_DIR = $$OUTD/
+DESTDIR = $$OUTD/
+LIBS+=-L$$OUTD 
+CONFIG+=warn_off

+ 8 - 0
raw.mod/libraw/buildfiles/libraw-common.pro

@@ -0,0 +1,8 @@
+win32:CONFIG+=console
+win32:LIBS+=libraw.lib
+unix:LIBS+=-lraw
+win32-g++:
+{
+    LIBS += -lws2_32
+}
+include (libraw-common-lib.pro)

+ 70 - 0
raw.mod/libraw/buildfiles/libraw.pro

@@ -0,0 +1,70 @@
+TEMPLATE=lib
+TARGET=libraw
+INCLUDEPATH+=../
+include (libraw-common-lib.pro)
+
+HEADERS=../libraw/libraw.h \
+	 ../libraw/libraw_alloc.h \
+	../libraw/libraw_const.h \
+	../libraw/libraw_datastream.h \
+	../libraw/libraw_types.h \
+	../libraw/libraw_internal.h \
+	../libraw/libraw_version.h \
+	../internal/defines.h \
+	../internal/var_defines.h \
+	../internal/libraw_internal_funcs.h \
+	../internal/dcraw_defs.h ../internal/dcraw_fileio_defs.h \
+	../internal/dmp_include.h ../internal/libraw_cxx_defs.h \
+	../internal/x3f_tools.h 
+
+CONFIG +=precompiled_headers
+
+CONFIG-=qt
+CONFIG+=warn_off
+CONFIG+=debug_and_release
+macx: CONFIG+= static x86 x86_64
+macx: QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.5
+DEFINES+=LIBRAW_BUILDLIB
+
+SOURCES+= ../src/libraw_datastream.cpp ../src/decoders/canon_600.cpp \
+	../src/decoders/crx.cpp ../src/decoders/decoders_dcraw.cpp \
+	../src/decoders/decoders_libraw_dcrdefs.cpp \
+	../src/decoders/decoders_libraw.cpp ../src/decoders/dng.cpp \
+	../src/decoders/fp_dng.cpp ../src/decoders/fuji_compressed.cpp \
+	../src/decoders/generic.cpp ../src/decoders/kodak_decoders.cpp \
+	../src/decoders/load_mfbacks.cpp ../src/decoders/smal.cpp \
+	../src/decoders/unpack_thumb.cpp ../src/decoders/unpack.cpp \
+	../src/demosaic/aahd_demosaic.cpp ../src/demosaic/ahd_demosaic.cpp \
+	../src/demosaic/dcb_demosaic.cpp ../src/demosaic/dht_demosaic.cpp \
+	../src/demosaic/misc_demosaic.cpp ../src/demosaic/xtrans_demosaic.cpp \
+	../src/integration/dngsdk_glue.cpp ../src/integration/rawspeed_glue.cpp \
+	../src/metadata/adobepano.cpp ../src/metadata/canon.cpp \
+	../src/metadata/ciff.cpp ../src/metadata/cr3_parser.cpp \
+	../src/metadata/epson.cpp ../src/metadata/exif_gps.cpp \
+	../src/metadata/fuji.cpp ../src/metadata/identify_tools.cpp \
+	../src/metadata/hasselblad_model.cpp \
+	../src/metadata/identify.cpp ../src/metadata/kodak.cpp \
+	../src/metadata/leica.cpp ../src/metadata/makernotes.cpp \
+	../src/metadata/mediumformat.cpp ../src/metadata/minolta.cpp \
+	../src/metadata/misc_parsers.cpp ../src/metadata/nikon.cpp \
+	../src/metadata/normalize_model.cpp ../src/metadata/olympus.cpp \
+	../src/metadata/p1.cpp ../src/metadata/pentax.cpp \
+	../src/metadata/samsung.cpp ../src/metadata/sony.cpp \
+	../src/metadata/tiff.cpp ../src/postprocessing/aspect_ratio.cpp \
+	../src/postprocessing/dcraw_process.cpp ../src/postprocessing/mem_image.cpp \
+	../src/postprocessing/postprocessing_aux.cpp \
+	../src/postprocessing/postprocessing_utils_dcrdefs.cpp \
+	../src/postprocessing/postprocessing_utils.cpp \
+	../src/preprocessing/ext_preprocess.cpp ../src/preprocessing/raw2image.cpp \
+	../src/preprocessing/subtract_black.cpp ../src/tables/cameralist.cpp \
+	../src/tables/colorconst.cpp ../src/tables/colordata.cpp \
+	../src/tables/wblists.cpp ../src/utils/curves.cpp \
+	../src/utils/decoder_info.cpp ../src/utils/init_close_utils.cpp \
+	../src/utils/open.cpp ../src/utils/phaseone_processing.cpp \
+	../src/utils/read_utils.cpp ../src/utils/thumb_utils.cpp \
+	../src/utils/utils_dcraw.cpp ../src/utils/utils_libraw.cpp \
+	../src/write/apply_profile.cpp ../src/write/file_write.cpp \
+	../src/write/tiff_writer.cpp ../src/x3f/x3f_parse_process.cpp \
+	../src/x3f/x3f_utils_patched.cpp \
+	../src/libraw_c_api.cpp
+

+ 234 - 0
raw.mod/libraw/buildfiles/libraw.vcxproj

@@ -0,0 +1,234 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{A71D2131-F425-381F-8A9A-29D60132A046}</ProjectGuid>
+    <RootNamespace>libraw</RootNamespace>
+    <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>debug-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <IntermediateDirectory>debug-x86_64\libraw.obj\</IntermediateDirectory>
+    <PrimaryOutput>libraw</PrimaryOutput>
+  </PropertyGroup>
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>release-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <IntermediateDirectory>release-x86_64\libraw.obj\</IntermediateDirectory>
+    <PrimaryOutput>libraw</PrimaryOutput>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings" />
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\libraw.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">libraw</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">true</IgnoreImportLibrary>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\libraw.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">libraw</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">true</IgnoreImportLibrary>
+    <LinkIncremental Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug-x86_64\libraw.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>debug-x86_64\libraw.obj\</ObjectFileName>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;LIBRAW_BUILDLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>debug-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkDLL>true</LinkDLL>
+      <OutputFile>$(OutDir)\libraw.dll</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Windows</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;LIBRAW_BUILDLIB;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release-x86_64\libraw.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>None</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>release-x86_64\libraw.obj\</ObjectFileName>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;LIBRAW_BUILDLIB;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <ProgramDataBaseFileName></ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>release-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkDLL>true</LinkDLL>
+      <LinkIncremental>false</LinkIncremental>
+      <OptimizeReferences>true</OptimizeReferences>
+      <OutputFile>$(OutDir)\libraw.dll</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Windows</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;LIBRAW_BUILDLIB;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\src\demosaic\aahd_demosaic.cpp" />
+    <ClCompile Include="..\src\metadata\adobepano.cpp" />
+    <ClCompile Include="..\src\demosaic\ahd_demosaic.cpp" />
+    <ClCompile Include="..\src\write\apply_profile.cpp" />
+    <ClCompile Include="..\src\postprocessing\aspect_ratio.cpp" />
+    <ClCompile Include="..\src\tables\cameralist.cpp" />
+    <ClCompile Include="..\src\metadata\canon.cpp" />
+    <ClCompile Include="..\src\decoders\canon_600.cpp" />
+    <ClCompile Include="..\src\metadata\ciff.cpp" />
+    <ClCompile Include="..\src\tables\colorconst.cpp" />
+    <ClCompile Include="..\src\tables\colordata.cpp" />
+    <ClCompile Include="..\src\metadata\cr3_parser.cpp" />
+    <ClCompile Include="..\src\decoders\crx.cpp" />
+    <ClCompile Include="..\src\utils\curves.cpp" />
+    <ClCompile Include="..\src\demosaic\dcb_demosaic.cpp" />
+    <ClCompile Include="..\src\postprocessing\dcraw_process.cpp" />
+    <ClCompile Include="..\src\utils\decoder_info.cpp" />
+    <ClCompile Include="..\src\decoders\decoders_dcraw.cpp" />
+    <ClCompile Include="..\src\decoders\decoders_libraw.cpp" />
+    <ClCompile Include="..\src\decoders\decoders_libraw_dcrdefs.cpp" />
+    <ClCompile Include="..\src\demosaic\dht_demosaic.cpp" />
+    <ClCompile Include="..\src\decoders\dng.cpp" />
+    <ClCompile Include="..\src\integration\dngsdk_glue.cpp" />
+    <ClCompile Include="..\src\metadata\epson.cpp" />
+    <ClCompile Include="..\src\metadata\exif_gps.cpp" />
+    <ClCompile Include="..\src\preprocessing\ext_preprocess.cpp" />
+    <ClCompile Include="..\src\write\file_write.cpp" />
+    <ClCompile Include="..\src\decoders\fp_dng.cpp" />
+    <ClCompile Include="..\src\metadata\fuji.cpp" />
+    <ClCompile Include="..\src\decoders\fuji_compressed.cpp" />
+    <ClCompile Include="..\src\decoders\generic.cpp" />
+    <ClCompile Include="..\src\metadata\hasselblad_model.cpp" />
+    <ClCompile Include="..\src\metadata\identify.cpp" />
+    <ClCompile Include="..\src\metadata\identify_tools.cpp" />
+    <ClCompile Include="..\src\utils\init_close_utils.cpp" />
+    <ClCompile Include="..\src\metadata\kodak.cpp" />
+    <ClCompile Include="..\src\decoders\kodak_decoders.cpp" />
+    <ClCompile Include="..\src\metadata\leica.cpp" />
+    <ClCompile Include="..\src\libraw_c_api.cpp" />
+    <ClCompile Include="..\src\libraw_datastream.cpp" />
+    <ClCompile Include="..\src\decoders\load_mfbacks.cpp" />
+    <ClCompile Include="..\src\metadata\makernotes.cpp" />
+    <ClCompile Include="..\src\metadata\mediumformat.cpp" />
+    <ClCompile Include="..\src\postprocessing\mem_image.cpp" />
+    <ClCompile Include="..\src\metadata\minolta.cpp" />
+    <ClCompile Include="..\src\demosaic\misc_demosaic.cpp" />
+    <ClCompile Include="..\src\metadata\misc_parsers.cpp" />
+    <ClCompile Include="..\src\metadata\nikon.cpp" />
+    <ClCompile Include="..\src\metadata\normalize_model.cpp" />
+    <ClCompile Include="..\src\metadata\olympus.cpp" />
+    <ClCompile Include="..\src\utils\open.cpp" />
+    <ClCompile Include="..\src\metadata\p1.cpp" />
+    <ClCompile Include="..\src\metadata\pentax.cpp" />
+    <ClCompile Include="..\src\utils\phaseone_processing.cpp" />
+    <ClCompile Include="..\src\postprocessing\postprocessing_aux.cpp" />
+    <ClCompile Include="..\src\postprocessing\postprocessing_utils.cpp" />
+    <ClCompile Include="..\src\postprocessing\postprocessing_utils_dcrdefs.cpp" />
+    <ClCompile Include="..\src\preprocessing\raw2image.cpp" />
+    <ClCompile Include="..\src\integration\rawspeed_glue.cpp" />
+    <ClCompile Include="..\src\utils\read_utils.cpp" />
+    <ClCompile Include="..\src\metadata\samsung.cpp" />
+    <ClCompile Include="..\src\decoders\smal.cpp" />
+    <ClCompile Include="..\src\metadata\sony.cpp" />
+    <ClCompile Include="..\src\preprocessing\subtract_black.cpp" />
+    <ClCompile Include="..\src\utils\thumb_utils.cpp" />
+    <ClCompile Include="..\src\metadata\tiff.cpp" />
+    <ClCompile Include="..\src\write\tiff_writer.cpp" />
+    <ClCompile Include="..\src\decoders\unpack.cpp" />
+    <ClCompile Include="..\src\decoders\unpack_thumb.cpp" />
+    <ClCompile Include="..\src\utils\utils_dcraw.cpp" />
+    <ClCompile Include="..\src\utils\utils_libraw.cpp" />
+    <ClCompile Include="..\src\tables\wblists.cpp" />
+    <ClCompile Include="..\src\x3f\x3f_parse_process.cpp" />
+    <ClCompile Include="..\src\x3f\x3f_utils_patched.cpp" />
+    <ClCompile Include="..\src\demosaic\xtrans_demosaic.cpp" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\internal\dcraw_defs.h" />
+    <ClInclude Include="..\internal\dcraw_fileio_defs.h" />
+    <ClInclude Include="..\internal\defines.h" />
+    <ClInclude Include="..\internal\dmp_include.h" />
+    <ClInclude Include="..\libraw\libraw.h" />
+    <ClInclude Include="..\libraw\libraw_alloc.h" />
+    <ClInclude Include="..\libraw\libraw_const.h" />
+    <ClInclude Include="..\internal\libraw_cxx_defs.h" />
+    <ClInclude Include="..\libraw\libraw_datastream.h" />
+    <ClInclude Include="..\libraw\libraw_internal.h" />
+    <ClInclude Include="..\internal\libraw_internal_funcs.h" />
+    <ClInclude Include="..\libraw\libraw_types.h" />
+    <ClInclude Include="..\libraw\libraw_version.h" />
+    <ClInclude Include="..\internal\var_defines.h" />
+    <ClInclude Include="..\internal\x3f_tools.h" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets" />
+</Project>

+ 295 - 0
raw.mod/libraw/buildfiles/libraw.vcxproj.filters

@@ -0,0 +1,295 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\src\demosaic\aahd_demosaic.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\adobepano.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\demosaic\ahd_demosaic.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\write\apply_profile.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\postprocessing\aspect_ratio.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\tables\cameralist.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\canon.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\decoders\canon_600.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\ciff.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\tables\colorconst.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\tables\colordata.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\cr3_parser.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\decoders\crx.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\utils\curves.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\demosaic\dcb_demosaic.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\postprocessing\dcraw_process.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\utils\decoder_info.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\decoders\decoders_dcraw.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\decoders\decoders_libraw.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\decoders\decoders_libraw_dcrdefs.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\demosaic\dht_demosaic.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\decoders\dng.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\integration\dngsdk_glue.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\epson.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\exif_gps.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\preprocessing\ext_preprocess.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\write\file_write.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\decoders\fp_dng.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\fuji.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\decoders\fuji_compressed.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\decoders\generic.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\hasselblad_model.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\identify.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\identify_tools.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\utils\init_close_utils.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\kodak.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\decoders\kodak_decoders.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\leica.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\libraw_c_api.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\libraw_datastream.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\decoders\load_mfbacks.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\makernotes.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\mediumformat.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\postprocessing\mem_image.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\minolta.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\demosaic\misc_demosaic.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\misc_parsers.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\nikon.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\normalize_model.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\olympus.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\utils\open.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\p1.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\pentax.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\utils\phaseone_processing.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\postprocessing\postprocessing_aux.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\postprocessing\postprocessing_utils.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\postprocessing\postprocessing_utils_dcrdefs.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\preprocessing\raw2image.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\integration\rawspeed_glue.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\utils\read_utils.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\samsung.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\decoders\smal.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\sony.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\preprocessing\subtract_black.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\utils\thumb_utils.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\metadata\tiff.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\write\tiff_writer.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\decoders\unpack.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\decoders\unpack_thumb.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\utils\utils_dcraw.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\utils\utils_libraw.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\tables\wblists.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\x3f\x3f_parse_process.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\x3f\x3f_utils_patched.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\src\demosaic\xtrans_demosaic.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\internal\dcraw_defs.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\internal\dcraw_fileio_defs.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\internal\defines.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\internal\dmp_include.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\libraw\libraw.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\libraw\libraw_alloc.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\libraw\libraw_const.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\internal\libraw_cxx_defs.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\libraw\libraw_datastream.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\libraw\libraw_internal.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\internal\libraw_internal_funcs.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\libraw\libraw_types.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\libraw\libraw_version.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\internal\var_defines.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\internal\x3f_tools.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+</Project>

+ 6 - 0
raw.mod/libraw/buildfiles/mem_image.pro

@@ -0,0 +1,6 @@
+include (libraw-common.pro)
+win32:LIBS+=libraw.lib
+unix:LIBS+=-lraw
+CONFIG-=qt
+CONFIG+=debug_and_release
+SOURCES=../samples/mem_image_sample.cpp

+ 145 - 0
raw.mod/libraw/buildfiles/mem_image.vcxproj

@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{BF8A2750-B847-3BA6-9EAF-05F43380F46C}</ProjectGuid>
+    <RootNamespace>mem_image</RootNamespace>
+    <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>debug-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>Application</ConfigurationType>
+    <IntermediateDirectory>debug-x86_64\mem_image.obj\</IntermediateDirectory>
+    <PrimaryOutput>mem_image</PrimaryOutput>
+  </PropertyGroup>
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>release-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>Application</ConfigurationType>
+    <IntermediateDirectory>release-x86_64\mem_image.obj\</IntermediateDirectory>
+    <PrimaryOutput>mem_image</PrimaryOutput>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings" />
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\mem_image.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">mem_image</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">true</IgnoreImportLibrary>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\mem_image.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">mem_image</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">true</IgnoreImportLibrary>
+    <LinkIncremental Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug-x86_64\mem_image.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>debug-x86_64\mem_image.obj\</ObjectFileName>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;libraw.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>debug-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions>&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot; %(AdditionalOptions)</AdditionalOptions>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <OutputFile>$(OutDir)\mem_image.exe</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Console</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release-x86_64\mem_image.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>None</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>release-x86_64\mem_image.obj\</ObjectFileName>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <ProgramDataBaseFileName></ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;libraw.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>release-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions>&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot; %(AdditionalOptions)</AdditionalOptions>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
+      <OptimizeReferences>true</OptimizeReferences>
+      <OutputFile>$(OutDir)\mem_image.exe</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Console</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\samples\mem_image_sample.cpp" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets" />
+</Project>

+ 18 - 0
raw.mod/libraw/buildfiles/mem_image.vcxproj.filters

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\samples\mem_image_sample.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>

+ 6 - 0
raw.mod/libraw/buildfiles/multirender_test.pro

@@ -0,0 +1,6 @@
+include (libraw-common.pro)
+win32:LIBS+=libraw.lib
+unix:LIBS+=-lraw
+CONFIG-=qt
+CONFIG+=debug_and_release
+SOURCES=../samples/multirender_test.cpp

+ 145 - 0
raw.mod/libraw/buildfiles/multirender_test.vcxproj

@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{30D21208-219A-3AA8-ADCF-E6B1FFAF6A73}</ProjectGuid>
+    <RootNamespace>multirender_test</RootNamespace>
+    <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>debug-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>Application</ConfigurationType>
+    <IntermediateDirectory>debug-x86_64\multirender_test.obj\</IntermediateDirectory>
+    <PrimaryOutput>multirender_test</PrimaryOutput>
+  </PropertyGroup>
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>release-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>Application</ConfigurationType>
+    <IntermediateDirectory>release-x86_64\multirender_test.obj\</IntermediateDirectory>
+    <PrimaryOutput>multirender_test</PrimaryOutput>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings" />
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\multirender_test.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">multirender_test</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">true</IgnoreImportLibrary>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\multirender_test.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">multirender_test</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">true</IgnoreImportLibrary>
+    <LinkIncremental Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug-x86_64\multirender_test.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>debug-x86_64\multirender_test.obj\</ObjectFileName>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;libraw.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>debug-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions>&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot; %(AdditionalOptions)</AdditionalOptions>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <OutputFile>$(OutDir)\multirender_test.exe</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Console</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release-x86_64\multirender_test.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>None</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>release-x86_64\multirender_test.obj\</ObjectFileName>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <ProgramDataBaseFileName></ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;libraw.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>release-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions>&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot; %(AdditionalOptions)</AdditionalOptions>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
+      <OptimizeReferences>true</OptimizeReferences>
+      <OutputFile>$(OutDir)\multirender_test.exe</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Console</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\samples\multirender_test.cpp" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets" />
+</Project>

+ 18 - 0
raw.mod/libraw/buildfiles/multirender_test.vcxproj.filters

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\samples\multirender_test.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>

+ 6 - 0
raw.mod/libraw/buildfiles/openbayer_sample.pro

@@ -0,0 +1,6 @@
+include (libraw-common.pro)
+win32:LIBS+=libraw.lib
+unix:LIBS+=-lraw
+CONFIG-=qt
+CONFIG+=debug_and_release
+SOURCES=../samples/openbayer_sample.cpp

+ 145 - 0
raw.mod/libraw/buildfiles/openbayer_sample.vcxproj

@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{EF67FEF1-4B19-3765-A660-9F8E9333DEF3}</ProjectGuid>
+    <RootNamespace>openbayer_sample</RootNamespace>
+    <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>debug-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>Application</ConfigurationType>
+    <IntermediateDirectory>debug-x86_64\openbayer_sample.obj\</IntermediateDirectory>
+    <PrimaryOutput>openbayer_sample</PrimaryOutput>
+  </PropertyGroup>
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>release-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>Application</ConfigurationType>
+    <IntermediateDirectory>release-x86_64\openbayer_sample.obj\</IntermediateDirectory>
+    <PrimaryOutput>openbayer_sample</PrimaryOutput>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings" />
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\openbayer_sample.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">openbayer_sample</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">true</IgnoreImportLibrary>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\openbayer_sample.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">openbayer_sample</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">true</IgnoreImportLibrary>
+    <LinkIncremental Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug-x86_64\openbayer_sample.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>debug-x86_64\openbayer_sample.obj\</ObjectFileName>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;libraw.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>debug-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions>&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot; %(AdditionalOptions)</AdditionalOptions>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <OutputFile>$(OutDir)\openbayer_sample.exe</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Console</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release-x86_64\openbayer_sample.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>None</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>release-x86_64\openbayer_sample.obj\</ObjectFileName>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <ProgramDataBaseFileName></ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;libraw.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>release-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions>&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot; %(AdditionalOptions)</AdditionalOptions>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
+      <OptimizeReferences>true</OptimizeReferences>
+      <OutputFile>$(OutDir)\openbayer_sample.exe</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Console</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\samples\openbayer_sample.cpp" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets" />
+</Project>

+ 18 - 0
raw.mod/libraw/buildfiles/openbayer_sample.vcxproj.filters

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\samples\openbayer_sample.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>

+ 4 - 0
raw.mod/libraw/buildfiles/postprocessing_benchmark.pro

@@ -0,0 +1,4 @@
+include (libraw-common.pro)
+CONFIG-=qt
+CONFIG+=debug_and_release
+SOURCES=../samples/postprocessing_benchmark.cpp

+ 145 - 0
raw.mod/libraw/buildfiles/postprocessing_benchmark.vcxproj

@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{5C66A8FA-D211-3E2F-A2F1-0C3C665689CC}</ProjectGuid>
+    <RootNamespace>postprocessing_benchmark</RootNamespace>
+    <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>debug-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>Application</ConfigurationType>
+    <IntermediateDirectory>debug-x86_64\postprocessing_benchmark.obj\</IntermediateDirectory>
+    <PrimaryOutput>postprocessing_benchmark</PrimaryOutput>
+  </PropertyGroup>
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>release-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>Application</ConfigurationType>
+    <IntermediateDirectory>release-x86_64\postprocessing_benchmark.obj\</IntermediateDirectory>
+    <PrimaryOutput>postprocessing_benchmark</PrimaryOutput>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings" />
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\postprocessing_benchmark.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">postprocessing_benchmark</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">true</IgnoreImportLibrary>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\postprocessing_benchmark.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">postprocessing_benchmark</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">true</IgnoreImportLibrary>
+    <LinkIncremental Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug-x86_64\postprocessing_benchmark.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>debug-x86_64\postprocessing_benchmark.obj\</ObjectFileName>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>libraw.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>debug-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions>&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot; %(AdditionalOptions)</AdditionalOptions>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <OutputFile>$(OutDir)\postprocessing_benchmark.exe</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Console</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release-x86_64\postprocessing_benchmark.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>None</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>release-x86_64\postprocessing_benchmark.obj\</ObjectFileName>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <ProgramDataBaseFileName></ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>libraw.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>release-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions>&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot; %(AdditionalOptions)</AdditionalOptions>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
+      <OptimizeReferences>true</OptimizeReferences>
+      <OutputFile>$(OutDir)\postprocessing_benchmark.exe</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Console</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\samples\postprocessing_benchmark.cpp" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets" />
+</Project>

+ 18 - 0
raw.mod/libraw/buildfiles/postprocessing_benchmark.vcxproj.filters

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\samples\postprocessing_benchmark.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>

+ 6 - 0
raw.mod/libraw/buildfiles/raw-identify.pro

@@ -0,0 +1,6 @@
+include (libraw-common.pro)
+win32:LIBS+=libraw.lib
+unix:LIBS+=-lraw
+CONFIG-=qt
+CONFIG+=debug_and_release
+SOURCES=../samples/raw-identify.cpp

+ 145 - 0
raw.mod/libraw/buildfiles/raw-identify.vcxproj

@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{7C4F61DB-717E-36C9-B20E-36F8E218AB51}</ProjectGuid>
+    <RootNamespace>raw-identify</RootNamespace>
+    <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>debug-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>Application</ConfigurationType>
+    <IntermediateDirectory>debug-x86_64\raw-identify.obj\</IntermediateDirectory>
+    <PrimaryOutput>raw-identify</PrimaryOutput>
+  </PropertyGroup>
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>release-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>Application</ConfigurationType>
+    <IntermediateDirectory>release-x86_64\raw-identify.obj\</IntermediateDirectory>
+    <PrimaryOutput>raw-identify</PrimaryOutput>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings" />
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\raw-identify.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">raw-identify</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">true</IgnoreImportLibrary>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\raw-identify.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">raw-identify</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">true</IgnoreImportLibrary>
+    <LinkIncremental Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug-x86_64\raw-identify.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>debug-x86_64\raw-identify.obj\</ObjectFileName>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;libraw.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>debug-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions>&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot; %(AdditionalOptions)</AdditionalOptions>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <OutputFile>$(OutDir)\raw-identify.exe</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Console</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release-x86_64\raw-identify.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>None</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>release-x86_64\raw-identify.obj\</ObjectFileName>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <ProgramDataBaseFileName></ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;libraw.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>release-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions>&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot; %(AdditionalOptions)</AdditionalOptions>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
+      <OptimizeReferences>true</OptimizeReferences>
+      <OutputFile>$(OutDir)\raw-identify.exe</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Console</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\samples\raw-identify.cpp" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets" />
+</Project>

+ 18 - 0
raw.mod/libraw/buildfiles/raw-identify.vcxproj.filters

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\samples\raw-identify.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>

+ 6 - 0
raw.mod/libraw/buildfiles/rawtextdump.pro

@@ -0,0 +1,6 @@
+include (libraw-common.pro)
+win32:LIBS+=libraw.lib
+unix:LIBS+=-lraw
+CONFIG-=qt
+CONFIG+=debug_and_release
+SOURCES=../samples/rawtextdump.cpp

+ 145 - 0
raw.mod/libraw/buildfiles/rawtextdump.vcxproj

@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{53A1E3F0-8032-348E-B3BF-3E540A45005F}</ProjectGuid>
+    <RootNamespace>rawtextdump</RootNamespace>
+    <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>debug-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>Application</ConfigurationType>
+    <IntermediateDirectory>debug-x86_64\rawtextdump.obj\</IntermediateDirectory>
+    <PrimaryOutput>rawtextdump</PrimaryOutput>
+  </PropertyGroup>
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>release-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>Application</ConfigurationType>
+    <IntermediateDirectory>release-x86_64\rawtextdump.obj\</IntermediateDirectory>
+    <PrimaryOutput>rawtextdump</PrimaryOutput>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings" />
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\rawtextdump.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">rawtextdump</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">true</IgnoreImportLibrary>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\rawtextdump.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">rawtextdump</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">true</IgnoreImportLibrary>
+    <LinkIncremental Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug-x86_64\rawtextdump.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>debug-x86_64\rawtextdump.obj\</ObjectFileName>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;libraw.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>debug-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions>&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot; %(AdditionalOptions)</AdditionalOptions>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <OutputFile>$(OutDir)\rawtextdump.exe</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Console</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release-x86_64\rawtextdump.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>None</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>release-x86_64\rawtextdump.obj\</ObjectFileName>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <ProgramDataBaseFileName></ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;libraw.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>release-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions>&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot; %(AdditionalOptions)</AdditionalOptions>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
+      <OptimizeReferences>true</OptimizeReferences>
+      <OutputFile>$(OutDir)\rawtextdump.exe</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Console</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\samples\rawtextdump.cpp" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets" />
+</Project>

+ 18 - 0
raw.mod/libraw/buildfiles/rawtextdump.vcxproj.filters

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\samples\rawtextdump.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>

+ 6 - 0
raw.mod/libraw/buildfiles/simple_dcraw.pro

@@ -0,0 +1,6 @@
+include (libraw-common.pro)
+win32:LIBS+=libraw.lib
+unix:LIBS+=-lraw
+CONFIG-=qt
+CONFIG+=debug_and_release
+SOURCES=../samples/simple_dcraw.cpp

+ 145 - 0
raw.mod/libraw/buildfiles/simple_dcraw.vcxproj

@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{AD1E31D8-A022-3672-982F-C8280A0D6458}</ProjectGuid>
+    <RootNamespace>simple_dcraw</RootNamespace>
+    <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>debug-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>Application</ConfigurationType>
+    <IntermediateDirectory>debug-x86_64\simple_dcraw.obj\</IntermediateDirectory>
+    <PrimaryOutput>simple_dcraw</PrimaryOutput>
+  </PropertyGroup>
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>release-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>Application</ConfigurationType>
+    <IntermediateDirectory>release-x86_64\simple_dcraw.obj\</IntermediateDirectory>
+    <PrimaryOutput>simple_dcraw</PrimaryOutput>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings" />
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\simple_dcraw.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">simple_dcraw</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">true</IgnoreImportLibrary>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\simple_dcraw.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">simple_dcraw</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">true</IgnoreImportLibrary>
+    <LinkIncremental Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug-x86_64\simple_dcraw.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>debug-x86_64\simple_dcraw.obj\</ObjectFileName>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;libraw.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>debug-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions>&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot; %(AdditionalOptions)</AdditionalOptions>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <OutputFile>$(OutDir)\simple_dcraw.exe</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Console</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release-x86_64\simple_dcraw.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>None</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>release-x86_64\simple_dcraw.obj\</ObjectFileName>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <ProgramDataBaseFileName></ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;libraw.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>release-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions>&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot; %(AdditionalOptions)</AdditionalOptions>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
+      <OptimizeReferences>true</OptimizeReferences>
+      <OutputFile>$(OutDir)\simple_dcraw.exe</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Console</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\samples\simple_dcraw.cpp" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets" />
+</Project>

+ 18 - 0
raw.mod/libraw/buildfiles/simple_dcraw.vcxproj.filters

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\samples\simple_dcraw.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>

+ 6 - 0
raw.mod/libraw/buildfiles/unprocessed_raw.pro

@@ -0,0 +1,6 @@
+include (libraw-common.pro)
+win32:LIBS+=libraw.lib
+unix:LIBS+=-lraw
+CONFIG-=qt
+CONFIG+=debug_and_release
+SOURCES=../samples/unprocessed_raw.cpp

+ 145 - 0
raw.mod/libraw/buildfiles/unprocessed_raw.vcxproj

@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{1333E21E-D3B5-3640-9A4D-D8955082B855}</ProjectGuid>
+    <RootNamespace>unprocessed_raw</RootNamespace>
+    <Keyword>Qt4VSv1.0</Keyword>
+    <WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>debug-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>Application</ConfigurationType>
+    <IntermediateDirectory>debug-x86_64\unprocessed_raw.obj\</IntermediateDirectory>
+    <PrimaryOutput>unprocessed_raw</PrimaryOutput>
+  </PropertyGroup>
+  <PropertyGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="Configuration">
+    <PlatformToolset>v142</PlatformToolset>
+    <OutputDirectory>release-x86_64\</OutputDirectory>
+    <ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
+    <CharacterSet>NotSet</CharacterSet>
+    <ConfigurationType>Application</ConfigurationType>
+    <IntermediateDirectory>release-x86_64\unprocessed_raw.obj\</IntermediateDirectory>
+    <PrimaryOutput>unprocessed_raw</PrimaryOutput>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings" />
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <ImportGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(&apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props&apos;)" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">debug-x86_64\unprocessed_raw.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">unprocessed_raw</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">true</IgnoreImportLibrary>
+    <OutDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\</OutDir>
+    <IntDir Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">release-x86_64\unprocessed_raw.obj\</IntDir>
+    <TargetName Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">unprocessed_raw</TargetName>
+    <IgnoreImportLibrary Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">true</IgnoreImportLibrary>
+    <LinkIncremental Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Debug|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>debug-x86_64\unprocessed_raw.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>debug-x86_64\unprocessed_raw.obj\</ObjectFileName>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;libraw.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>debug-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions>&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot; %(AdditionalOptions)</AdditionalOptions>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <OutputFile>$(OutDir)\unprocessed_raw.exe</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Console</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="&apos;$(Configuration)|$(Platform)&apos;==&apos;Release|x64&apos;">
+    <ClCompile>
+      <AdditionalIncludeDirectories>.;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
+      <AssemblerListingLocation>release-x86_64\unprocessed_raw.obj\</AssemblerListingLocation>
+      <BrowseInformation>false</BrowseInformation>
+      <DebugInformationFormat>None</DebugInformationFormat>
+      <ExceptionHandling>Sync</ExceptionHandling>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <ObjectFileName>release-x86_64\unprocessed_raw.obj\</ObjectFileName>
+      <Optimization>MaxSpeed</Optimization>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessToFile>false</PreprocessToFile>
+      <ProgramDataBaseFileName></ProgramDataBaseFileName>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <WarningLevel>TurnOffAllWarnings</WarningLevel>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;libraw.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>release-x86_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions>&quot;/MANIFESTDEPENDENCY:type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos; processorArchitecture=&apos;*&apos;&quot; %(AdditionalOptions)</AdditionalOptions>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <IgnoreImportLibrary>true</IgnoreImportLibrary>
+      <LinkIncremental>false</LinkIncremental>
+      <OptimizeReferences>true</OptimizeReferences>
+      <OutputFile>$(OutDir)\unprocessed_raw.exe</OutputFile>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <SubSystem>Console</SubSystem>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Link>
+    <Midl>
+      <DefaultCharType>Unsigned</DefaultCharType>
+      <EnableErrorChecks>None</EnableErrorChecks>
+      <WarningLevel>0</WarningLevel>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\samples\unprocessed_raw.cpp" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets" />
+</Project>

+ 18 - 0
raw.mod/libraw/buildfiles/unprocessed_raw.vcxproj.filters

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\samples\unprocessed_raw.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>

+ 12 - 0
raw.mod/libraw/clist2c.pl

@@ -0,0 +1,12 @@
+#!/usr/bin/perl
+
+while (<>)
+  {
+    chomp;
+    s/^\s+//;
+    s/^\s+\*\s+//;
+    s/^\s+//;
+    s/\"/\\\"/g;
+    s/\s+$//;
+    print "\"$_\",\n";
+  }

+ 54 - 0
raw.mod/libraw/clist2html.pl

@@ -0,0 +1,54 @@
+#!/usr/bin/perl
+use Data::Dumper;
+
+@makes=( "AgfaPhoto", "Canon", "Casio", "Digital Bolex", "Epson", "Fujifilm", "Imacon",
+      "Mamiya", "Minolta", "Motorola", "Kodak", "Konica", "Leica", "Hasselblad",
+      "Nikon", "Nokia", "Olympus", "Pentax", "Phase One", "Ricoh",
+      "Samsung", "Sigma", "Sinar", "Sony" );
+
+MAINLOOP:
+while(<>)
+{
+  chomp;  
+  $cname = $_;
+  $cname=~s/^\s+//g;
+  $cname=~s/\s+$//g;
+  for my $camera (@makes)
+  {
+     if  ($cname=~/\Q$camera\E\s+(.*)/)
+     {
+     
+ 	$model = $1;
+        push @{$cameralist->{$camera}},$model;
+	next MAINLOOP;
+     }    
+  }
+  if($cname=~/(\S+)\s+(.*)/)
+   { 
+       ($make,$model) = ($1,$2);
+        push @{$cameralist->{$make}},$model;
+	next MAINLOOP;
+   }
+   push @{$cameralist->{$make}},"NO MODEL";
+   
+}
+my $havenx1=0;
+print "<ul>\n";
+for my $make (sort keys %$cameralist)
+{
+   if( $#{$cameralist->{$make}} < 1) 
+    {
+	   print "<li>$make $cameralist->{$make}->[0]</li>\n";
+
+     }
+   else
+     {
+	   print "<li>$make\n<ul>\n";
+	   for my $model (@{$cameralist->{$make}})
+	    {
+	       print "  <li>$model</li>\n";
+	    }
+	   print "</ul>\n</li>\n";
+     }
+}
+print "</ul>\n";

+ 153 - 0
raw.mod/libraw/configure.ac

@@ -0,0 +1,153 @@
+# Initialization
+AC_INIT([LibRaw], m4_esyscmd([./version.sh]), [[email protected]], [], [http://www.libraw.org])
+AM_INIT_AUTOMAKE([foreign no-define])
+#AM_SILENT_RULES([yes])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CANONICAL_HOST
+
+# Tools to use
+AC_PROG_CXX
+AC_PROG_CC
+AC_PROG_LIBTOOL
+AC_ENABLE_SHARED
+AC_ENABLE_STATIC
+AC_LIBTOOL_WIN32_DLL
+AC_LIBTOOL_SETUP
+AC_SUBST(LIBTOOL_DEPS)
+
+# Config files to generate
+
+AC_CONFIG_FILES([
+	Makefile
+	libraw.pc
+	libraw_r.pc
+])
+
+# check if we want OpenMP support
+AC_ARG_ENABLE([openmp],
+	[  --enable-openmp    Enable OpenMP support],
+	[case "${enableval}" in
+		yes) 	openmp=true ;;
+		no)		openmp=false ;;
+		*)		AC_MSG_ERROR([bad value ${enableval} for --enable-openmp]) ;;
+	esac],[openmp=true])
+
+if test x$openmp = xtrue ; then
+	AX_OPENMP([
+		CXXFLAGS="$CXXFLAGS $OPENMP_CFLAGS"
+		CFLAGS="$CFLAGS $OPENMP_CFLAGS"
+		AC_SUBST([PC_OPENMP],[" $OPENMP_CFLAGS"])		
+	],[
+		AC_MSG_WARN([OpenMP support cannot be enabled because your system doesn't support it.])		
+	])
+fi
+
+# check for libjpeg v8
+AC_ARG_ENABLE([jpeg],
+	[  --enable-jpeg    Enable JPEG support for Lossy compressed DNG files],
+	[case "${enableval}" in
+		yes)	jpeg=true ;;
+		no)	jpeg=false ;;
+		*)	AC_MSG_ERROR([bad value ${enableval} for --enable-jpeg]) ;;
+	esac],[jpeg=true])
+
+if test x$jpeg = xtrue; then
+        AC_CHECK_LIB([jpeg], [jpeg_mem_src],
+                [
+                        AC_CHECK_HEADERS([jpeglib.h], [
+                                CPPFLAGS="$CPPFLAGS -DUSE_JPEG -DUSE_JPEG8"
+                                LIBS="$LIBS -ljpeg"
+                                AC_SUBST([PACKAGE_LIBS_PRIVATE],"-ljpeg $PACKAGE_LIBS_PRIVATE")
+                        ], AC_MSG_WARN([no jpeg headers found]))
+                ],
+                AC_MSG_WARN([libjpeg not found])
+        )
+fi
+
+# check for Jasper (JPEG2000) support
+AC_ARG_ENABLE([jasper],
+	[  --enable-jasper    Enable Jasper (JPEG2000) support for RedCine files],
+	[case "${enableval}" in
+		yes)	jasper=true ;;
+		no)	jasper=false ;;
+		*)	AC_MSG_ERROR([bad value ${enableval} for --enable-jasper]) ;;
+	esac],[jasper=true])
+
+if test x$jasper = xtrue; then
+        AC_CHECK_LIB([jasper], [jas_init],
+                [
+                        AC_CHECK_HEADERS([jasper/jasper.h], [
+                                CPPFLAGS="$CPPFLAGS -DUSE_JASPER"
+                                LIBS="$LIBS -ljasper"
+                                AC_SUBST([PACKAGE_LIBS_PRIVATE],"-ljasper $PACKAGE_LIBS_PRIVATE")
+                        ], AC_MSG_WARN([no jasper headers found]))
+                ],
+                AC_MSG_WARN([libjasper not found])
+        )
+fi
+
+# check if we want zlib support
+AC_ARG_ENABLE([zlib],
+	[  --enable-zlib    Enable zlib support for deflate compressed DNG files],
+	[case "${enableval}" in
+		yes)	zlib=true ;;
+		no)		zlib=false ;;
+		*)		AC_MSG_ERROR([bad value ${enableval} for --enable-zlib]) ;;
+	esac],[zlib=true])
+
+if test x$zlib = xtrue; then
+	PKG_CHECK_MODULES([ZLIB],[zlib],[
+		CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS -DUSE_ZLIB"
+		LIBS="$LIBS $ZLIB_LIBS"
+		AC_SUBST([PACKAGE_REQUIRES],[zlib])
+	],
+		AC_MSG_WARN([zlib support cannot be enabled])
+	)
+fi
+
+# check if we want LCMS support
+AC_ARG_ENABLE([lcms],
+	[  --enable-lcms    Enable LCMS support],
+	[case "${enableval}" in
+		yes)	lcms=true ;;
+		no)		lcms=false ;;
+		*)		AC_MSG_ERROR([bad value ${enableval} for --enable-lcms]) ;;
+	esac],[lcms=true])
+
+if test x$lcms = xtrue; then
+	PKG_CHECK_MODULES([LCMS2],[lcms2],[
+		CPPFLAGS="$CPPFLAGS $LCMS2_CFLAGS -DUSE_LCMS2"
+		LIBS="$LIBS $LCMS2_LIBS"
+	        AC_SUBST([PACKAGE_REQUIRES],[lcms2])
+	],[
+	PKG_CHECK_MODULES([LCMS],[lcms],[
+		CPPFLAGS="$CPPFLAGS $LCMS_CFLAGS -DUSE_LCMS"
+		LIBS="$LIBS $LCMS_LIBS"
+	        AC_SUBST([PACKAGE_REQUIRES],[lcms])
+	],[
+		AC_MSG_WARN([LCMS support cannot be enabled])
+	])
+	])
+fi
+
+# check if we want build examples
+AC_ARG_ENABLE([examples],
+	[  --enable-examples    Enable building of examples],
+	[case "${enableval}" in
+		yes) 	examples=true ;;
+		no)		examples=false ;;
+		*)		AC_MSG_ERROR([bad value ${enableval} for --enable-examples]) ;;
+	esac],[examples=true])
+AM_CONDITIONAL([EXAMPLES], [test x$examples = xtrue])
+
+LIBS="$LIBS -lm"
+
+case "${host_os}" in
+	*mingw32*) LIBS="$LIBS -lws2_32" ;;
+esac
+
+AC_SUBST([LIBRAW_SHLIB_VERSION],m4_esyscmd([./shlib-version.sh]))
+AC_SUBST([LIBRAW_RELEASE_VERSION],m4_esyscmd([./version.sh]))
+
+AC_OUTPUT
+

+ 174 - 0
raw.mod/libraw/doc/API-C.html

@@ -0,0 +1,174 @@
+<html>
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=windows-1252">
+  </head>
+  <body>
+    <p>LibRaw: C API<a href="index.html">[back to Index]</a></p>
+    <h1>LibRaw: C API</h1>
+    <p>LibRaw C API is a wrapper around C++ API; therefore, virtually all documentation to C API functions is represented by a set of hyperlinks to the corresponding places in the <a
+
+        href="API-CXX.html">description of C++ API</a>.</p>
+    <p>Contents</p>
+    <ol>
+      <li><a href="#init">Initialization and de</a><a href="#init">nitialization</a></li>
+      <li><a href="#return">Returned values</a></li>
+      <li><a href="#dataload">Data loading</a></li>
+      <li><a href="#setters">Parameters getters/setters</a></li>
+      <li><a href="#utility">Auxiliary Functions</a></li>
+      <li><a href="#dcrawemu">Data Postprocessing, Emulation of dcraw Behavior</a>
+        <ul>
+          <li><a href="#dcrawparams">Setting of Parameters</a></li>
+          <li><a href="#emu">Emulation of dcraw Behavior</a></li>
+        </ul>
+      </li>
+      <li><a href="#write">Writing to Output Files</a></li>
+      <li><a href="#memwrite">Writing processing results to memory buffer</a></li>
+    </ol>
+    <p><a name="init"></a></p>
+    <h2>Initialization and denitialization</h2>
+    <dl>
+      <dt>libraw_data_t *libraw_init(unsigned int flags);</dt>
+      <dd> The function returns the pointer to the <a href="#API-datastruct.html#libraw_data_t">instance of libraw_data_t structure</a>.<br>
+        The resultant pointer should be passed as the first argument to all C API functions (except for libraw_strerror). <br>
+        Returns NULL in case of error, pointer to the structure in all other cases. </dd>
+      <dt>void libraw_close(libraw_data_t *);</dt>
+      <dd> Closes libraw_data_t handler and deallocates all memory. </dd>
+    </dl>
+    <p><a name="return"></a></p>
+    <h2>Returned values</h2>
+    <p>Functions of C API return EINVAL (see errno.h) if the null pointer was passed to them as the first argument. In all other cases, the <a
+
+        href="API-CXX.html#return">C++ API return code</a> is returned.</p>
+    <p><a name="dataload"></a></p>
+    <h2>Data Loading from a File/Buffer</h2>
+    <dl>
+      <dt>int libraw_open_file(libraw_data_t*, const char *)</dt>
+      <dt>int libraw_open_file_ex(libraw_data_t*, const char *,INT64 bigfile_size)</dt>
+      <dt>WIN32: int libraw_open_wfile(libraw_data_t*, const wchar_t *)</dt>
+      <dt>WIN32: int libraw_open_wfile_ex(libraw_data_t*, const wchar_t *,INT64 bigfile_size)</dt>
+      <dd>See <a href="API-CXX.html#open_file">LibRaw::open_file()</a></dd>
+      <dt>int libraw_open_buffer(libraw_data_t*, void *buffer, size_t bufsize)</dt>
+      <dd>See <a href="API-CXX.html#open_buffer">LibRaw::open_buffer()</a></dd>
+      <dt>int libraw_open_bayer(libraw_data_t *lr, unsigned char *data,
+                               unsigned datalen, ushort _raw_width,
+                               ushort _raw_height, ushort _left_margin,
+                               ushort _top_margin, ushort _right_margin,
+                               ushort _bottom_margin, unsigned char procflags,
+                               unsigned char bayer_battern,
+                               unsigned unused_bits, unsigned otherflags,
+                               unsigned black_level)</dt>
+      <dd>See <a href="API-CXX.html#open_bayer">LibRaw::open_bayer()</a></dd>
+      <dt>int libraw_unpack(libraw_data_t*);</dt>
+      <dd>See <a href="API-CXX.html#unpack">LibRaw::unpack()</a></dd>
+      <dt>int libraw_unpack_thumb(libraw_data_t*);</dt>
+      <dd>See <a href="API-CXX.html#unpack_thumb">LibRaw::unpack_thumb()</a></dd>
+    </dl>
+    <p><a name="setters"></a></p>
+    <h2>Parameters setters/getters</h2>
+    <p>These functions provides interface to imgdata.params, .sizes and .color fields which works regardless of LibRaw versions used when building calling app and the library itself.</p>
+    <ul>
+      <li>int libraw_get_raw_height(libraw_data_t *lr); </li>
+      <li>int libraw_get_raw_width(libraw_data_t *lr); </li>
+      <li>int libraw_get_iheight(libraw_data_t *lr); </li>
+      <li>int libraw_get_iwidth(libraw_data_t *lr); </li>
+      <li>float libraw_get_cam_mul(libraw_data_t *lr,int index); </li>
+      <li>float libraw_get_pre_mul(libraw_data_t *lr,int index); </li>
+      <li>float libraw_get_rgb_cam(libraw_data_t *lr,int index1, int index2);</li>
+      <li>libraw_iparams_t *libraw_get_iparams(libraw_data_t *lr);</li>
+      <li>libraw_lensinfo_t *libraw_get_lensinfo(libraw_data_t *lr);</li>
+      <li>libraw_imgother_t *libraw_get_imgother(libraw_data_t *lr);</li>
+      <li>int libraw_get_color_maximum(libraw_data_t *lr); </li>
+      <li>void libraw_set_user_mul(libraw_data_t *lr,int index, float val);</li>
+      <li>void libraw_set_demosaic(libraw_data_t *lr,int value); </li>
+      <li>void libraw_set_adjust_maximum_thr(libraw_data_t *lr,float value); </li>
+      <li>void libraw_set_output_color(libraw_data_t *lr,int value); </li>
+      <li>void libraw_set_output_bps(libraw_data_t *lr,int value);</li>
+      <li>void libraw_set_gamma(libraw_data_t *lr,int index, float value);</li>
+      <li>void libraw_set_no_auto_bright(libraw_data_t *lr,int value);</li>
+      <li>void libraw_set_bright(libraw_data_t *lr,float value);</li>
+      <li>void libraw_set_highlight(libraw_data_t *lr,int value);</li>
+      <li>void libraw_set_fbdd_noiserd(libraw_data_t *lr,int value);</li>
+    </ul>
+    <p><a name="utility"></a></p>
+    <h2>Auxiliary Functions</h2>
+    <dl>
+      <dt>const char* libraw_version()</dt>
+      <dd>See <a href="API-CXX.html#version">LibRaw::version()</a></dd>
+      <dt>int libraw_versionNumber()</dt>
+      <dt>See <a href="API-CXX.html#versionNumber">LibRaw::versionNumber()</a><br>
+      </dt>
+      <dd>See <a href="API-CXX.html#versionNumber">LibRaw::versionNumber()</a></dd>
+      <dt>bool LIBRAW_CHECK_VERSION(major,minor,patch)</dt>
+      <dd>See <a href="API-CXX.html#LIBRAW_CHECK_VERSION">LIBRAW_CHECK_VERSION</a></dd>
+      <dt>unsigned libraw_capabilities()</dt>
+      <dd>See <a href="API-CXX.html#capabilities">LibRaw::capabilities()</a></dd>
+      <dt>int libraw_cameraCount()</dt>
+      <dd>See <a href="API-CXX.html#cameraCount">LibRaw::cameraCount()</a></dd>
+      <dt>const char* libraw_cameraList()</dt>
+      <dd>See <a href="API-CXX.html#cameraList">LibRaw::cameraList()</a></dd>
+      <dt>int libraw_get_decoder_info(libraw_data_t*,libraw_decoder_info_t *);</dt>
+      <dd>See <a href="API-CXX.html#get_decoder_info">LibRaw::get_decoder_info()</a></dd>
+      <dt>const char* libraw_unpack_function_name(libraw_data_t*);</dt>
+      <dd>See <a href="API-CXX.html#unpack_function_name">LibRaw::unpack_function_name()</a></dd>
+      <dt>int libraw_COLOR(libraw_data_t*,int row,int col);</dt>
+      <dd>See <a href="API-CXX.html#COLOR">LibRaw::COLOR()</a></dd>
+      <dt>void libraw_subtract_black(libraw_data_t*);</dt>
+      <dd>See <a href="API-CXX.html#add_subtract_black">LibRaw::subtract_black()</a></dd>
+      <dt>void libraw_recycle_datastream(libraw_data_t*);</dt>
+      <dd>See <a href="API-CXX.html#recycle_datastream">LibRaw::recycle_datastream()</a></dd>
+      <dt>void libraw_recycle(libraw_data_t*);</dt>
+      <dd>See <a href="API-CXX.html#recycle">LibRaw::recycle()</a></dd>
+      <dt>const char *libraw_strerror(int errorcode);</dt>
+      <dd>See <a href="API-CXX.html#libraw_strerror">LibRaw::strerror</a></dd>
+      <dt>const char *libraw_strprogress(enum LibRaw_progress);</dt>
+      <dd>See <a href="API-CXX.html#strprogress">LibRaw::strprogress</a></dd>
+      <dt>void libraw_set_memerror_handler(libraw_data_t*, memory_callback cb,void *);</dt>
+      <dd>See <a href="API-CXX.html#memerror">LibRaw::set_memerror_handler()</a></dd>
+      <dt>void libraw_set_dataerror_handler(libraw_data_t*,data_callback func, void *);</dt>
+      <dd>See <a href="API-CXX.html#dataerror">LibRaw::set_dataerror_handler()</a></dd>
+      <dt>void libraw_set_progress_handler(libraw_data_t*,progress_callback func, void *);</dt>
+      <dd>See <a href="API-CXX.html#progress">LibRaw::set_progress_handler()</a></dd>
+    </dl>
+    <p><a name="dcrawemu"></a></p>
+    <h2>Data Postprocessing, Emulation of dcraw Behavior</h2>
+    <p><a name="dcrawparams"></a></p>
+    <h3>Setting of Parameters</h3>
+    <p>The postprocessing parameters for the calls described below are set, just as for C++ API, via setting of fields in the libraw_output_params_t structure:</p>
+    <pre> libraw_data_t *ptr = libraw_init(0);
+ ptr-&gt;params.output_tiff = 1; //  output to TIFF
+    </pre>
+    <p>Fields of this structure are described in the <a href="API-datastruct.html#libraw_output_params_t">documentation to libraw_output_params_t</a>. For notes on their use, see <a
+
+        href="API-notes.html">API notes</a>.</p>
+    <p><a name="emu"></a></p>
+    <h3>Emulation of dcraw Behavior</h3>
+    <dl>
+      <dt>int libraw_raw2image(libraw_data_t*);</dt>
+      <dd>See <a href="API-CXX.html#raw2image">LibRaw::raw2image</a></dd>
+      <dt>int libraw_free_image(libraw_data_t*);</dt>
+      <dd>See <a href="API-CXX.html#free_image">LibRaw::free_image</a></dd>
+      <dt>int libraw_adjust_sizes_info_only(libraw_data_t*);</dt>
+      <dd>See <a href="API-CXX.html#adjust_sizes_info_only">LibRaw::adjust_sizes_info_only()</a></dd>
+      <dt>int libraw_dcraw_process(libraw_data_t* lr);</dt>
+      <dd>See <a href="API-CXX.html#dcraw_process">LibRaw::dcraw_process()</a></dd>
+    </dl>
+    <h2>Writing to Output Files</h2>
+    <dl>
+      <dt>int libraw_dcraw_ppm_tiff_writer(libraw_data_t* lr,const char *filename);</dt>
+      <dd>See <a href="API-CXX.html#dcraw_ppm_tiff_writer">LibRaw::dcraw_ppm_tiff_writer()</a></dd>
+      <dt>int libraw_dcraw_thumb_writer(libraw_data_t* lr,const char *fname);</dt>
+      <dd>See <a href="API-CXX.html#dcraw_thumb_writer">LibRaw::dcraw_thumb_writer()</a></dd>
+    </dl>
+    <h2>Writing processing results to memory buffer</h2>
+    <dl>
+      <dt>libraw_processed_image_t *libraw_dcraw_make_mem_image(libraw_data_t* lr,int * errcode)</dt>
+      <dd>See <a href="API-CXX.html#dcraw_make_mem_image">LibRaw::dcraw_make_mem_image()</a></dd>
+      <dt>libraw_processed_image_t *libraw_dcraw_make_mem_thumb(libraw_data_t* lr,int * errcode)</dt>
+      <dd>See <a href="API-CXX.html#dcraw_make_mem_thumb">LibRaw::dcraw_make_mem_thumb()</a></dd>
+      <dt>void libraw_dcraw_clear_mem(libraw_processed_image_t *);</dt>
+      <dd>See <a href="API-CXX.html#dcraw_clear_mem">LibRaw::dcraw_clear_mem()</a></dd>
+      <dd></dd>
+    </dl>
+    <p><a href="index.html">[back to Index]</a></p>
+  </body>
+</html>

+ 910 - 0
raw.mod/libraw/doc/API-CXX.html

@@ -0,0 +1,910 @@
+<html>
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=windows-1252">
+  </head>
+  <body>
+    <p>LibRaw C++ API<a href="index.html">[back to Index]</a></p>
+    <h1>LibRaw C++ API</h1>
+    <p>Contents</p>
+    <ol>
+      <li><a href="#LibRaw">LibRaw Objects</a></li>
+      <li><a href="#return">Returned values</a></li>
+      <li><a href="#dataload">Methods Loading Data from a File</a>
+        <ul>
+          <li><a href="#open_datastream">int
+              LibRaw::open_datastream(LibRaw_abstract_datastream *stream)</a></li>
+          <li><a href="#open_file">int LibRaw::open_file(const char
+              *rawfile[,INT64 bigfile_size])</a></li>
+          <li><a href="#open_buffer">int LibRaw::open_buffer(void *buffer,
+              size_t bufsize)</a></li>
+          <li><a href="#open_bayer">int LibRaw::open_bayer(...)</a></li>
+          <li><a href="#unpack">int LibRaw::unpack(void)</a></li>
+          <li><a href="#unpack_thumb">int LibRaw::unpack_thumb(void)</a></li>
+        </ul>
+      </li>
+      <li><a href="#utility">Auxiliary Functions</a>
+        <ul>
+          <li>Library version info
+            <ul>
+              <li><a href="#version">const char* LibRaw::version()</a></li>
+              <li><a href="#versionNumber">int LibRaw::versionNumber()</a></li>
+              <li><a href="#LIBRAW_CHECK_VERSION">bool
+                  LIBRAW_CHECK_VERSION(major,minor,patch)</a></li>
+            </ul>
+          </li>
+          <li>List of supported cameras
+            <ul>
+              <li><a href="#cameraCount">int LibRaw::cameraCount()</a></li>
+              <li><a href="#cameraList">const char** LibRaw::cameraList()</a></li>
+            </ul>
+          </li>
+          <li><a href="#set_rawspeed_camerafile">int
+              LibRaw::set_rawspeed_camerafile(char *path_to_cameras_xml)</a></li>
+          <li><a href="#get_decoder_info">int
+              LibRaw::get_decoder_info(libraw_decoder_info_t *)</a></li>
+          <li><a href="#unpack_function_name">const char*
+              LibRaw::unpack_function_name()</a></li>
+          <li><a href="#COLOR">int LibRaw::COLOR()</a></li>
+          <li><a href="#error_count">int LibRaw::error_count()</a></li>
+          <li><a href="#setCancelFlag">void LibRaw::setCancelFlag()</a></li>
+          <li><a href="#clearCancelFlag">void LibRaw::clearCancelFlag()</a></li>
+          <li><a href="#subtract_black">int LibRaw::subtract_black()</a></li>
+          <li><a href="#adjust_to_raw_inset_crop">int
+              LibRaw::adjust_to_raw_inset_crop()</a></li>
+          <li><a href="#floatingpoint">Support for Floating Point data</a></li>
+          <li><a href="#ycc">Support for YCC formats</a></li>
+          <li><a href="#recycle">void LibRaw::recycle_datastream(void)</a></li>
+          <li><a href="#recycle">void LibRaw::recycle(void)</a></li>
+          <li><a href="#%7ELibRaw">LibRaw::~LibRaw()</a></li>
+          <li><a href="#strprogress">const char* LibRaw::strprogress(enum
+              LibRaw_progress code)</a></li>
+          <li><a href="#libraw_strerror">const char* LibRaw::strerror(int
+              errorcode)</a></li>
+          <li><a href="#callbacks">Setting Error Notification Functions and
+              other callbacks</a>
+            <ul>
+              <li><a href="#progress">User callback for progress
+                  indication/interruption</a></li>
+              <li><a href="#exif">User callback for exif/makernotes parser
+                  routines</a></li>
+              <li><a href="#memerror">Out-of-Memory Notifier</a></li>
+              <li><a href="#dataerror">File Read Error Notifier</a></li>
+            </ul>
+          </li>
+        </ul>
+      </li>
+      <li><a href="#dcrawemu">Data Postprocessing: Emulation of dcraw Behavior</a>
+        <ul>
+          <li><a href="#dcraw_params">Parameter Setting</a></li>
+          <li><a href="#raw2image">int LibRaw::raw2image</a></li>
+          <li><a href="#free_image">void LibRaw::free_image</a></li>
+          <li><a href="#adjust_sizes_info_only">int
+              LibRaw::adjust_sizes_info_only(void)</a></li>
+          <li><a href="#dcraw_process">int LibRaw::dcraw_process(void)</a></li>
+        </ul>
+      </li>
+      <li><a href="#dcrawrite">Data Output to Files: Emulation of dcraw Behavior</a>
+        <ul>
+          <li><a href="#dcraw_ppm_tiff_writer">int
+              LibRaw::dcraw_ppm_tiff_writer(const char *outfile)</a></li>
+          <li><a href="#dcraw_thumb_writer">int LibRaw::dcraw_thumb_writer(const
+              char *thumbfile)</a></li>
+        </ul>
+      </li>
+      <li><a href="#memwrite">Copying unpacked data into memory buffer</a>
+        <ul>
+          <li><a href="#get_mem_image_format">void get_mem_image_format(int
+              *widthp, int *heightp, int *colorsp, int *bpp)</a></li>
+          <li><a href="#copy_mem_image">int LibRaw::copy_mem_image(void* scan0,
+              int stride, int bgr)</a></li>
+          <li><a href="#dcraw_make_mem_image">libraw_processed_image_t
+              *dcraw_make_mem_image(int *errorcode)</a></li>
+          <li><a href="#dcraw_make_mem_thumb">libraw_processed_image_t
+              *dcraw_make_mem_thumb(int *errorcode)</a></li>
+          <li><a href="#dcraw_clear_mem">void
+              LibRaw::dcraw_clear_mem(libraw_processed_image_t *)</a></li>
+        </ul>
+      </li>
+      <li><a href="#datastream">Input layer abstraction</a>
+        <ul>
+          <li><a href="LibRaw_abstract_datastream">class
+              LibRaw_abstract_datastream - abstract RAW read interface</a><a href="#datastream_methods">LibRaw_abstract_datastream
+              class methods</a>
+            <ul>
+              <li><a href="#datastream_methods_utility">Object verification</a></li>
+              <li><a href="#datastream_methods_read">Stream read and positioning</a></li>
+              <li><a href="#datastream_methods_other">Other methods</a></li>
+            </ul>
+          </li>
+          <li><a href="#datastream_derived">Derived input classes included in
+              LibRaw</a>
+            <ul>
+              <li><a href="#file_datastream">class LibRaw_file_datastream - file
+                  input interface</a></li>
+              <li><a href="#bigfile_datastream">class LibRaw_file_datastream -
+                  file input interface for large files</a></li>
+              <li><a href="#buffer_datastream">class LibRaw_buffer_datastream -
+                  input from memory buffer</a></li>
+            </ul>
+          </li>
+          <li><a href="#own_datastreams">Own datastream derived classes</a>
+            <ul>
+              <li><a href="#substream">substream field: secondary input stream</a></li>
+            </ul>
+          </li>
+        </ul>
+      </li>
+    </ol>
+    <p><a name="LibRaw"></a></p>
+    <h2>LibRaw Objects</h2>
+    <p>The main LibRaw object (class) is created either without parameters or
+      with flags determining the object behavior.</p>
+    <pre>#include "libraw/libraw.h"<br>...<br><br>   LibRaw ImageProcessor(unsigned int flags=0);<br>...<br>    </pre>
+    <p>Flags (several flags are combined via operator |, i.e., bitwise OR):</p>
+    <ul>
+      <li><strong>LIBRAW_OPTIONS_NO_MEMERR_CALLBACK</strong>: do not set the
+        standard <a href="#callbacks">out-of-memory error handler</a> (standard
+        handler outputs the error report in stderr);</li>
+      <li><strong>LIBRAW_OPTIONS_NO_DATAERR_CALLBACK</strong>: do not set the
+        standard <a href="#callbacks">file read error handler</a> (standard
+        handler outputs the error report in stderr).</li>
+    </ul>
+    <p>Three groups of methods are used for image processing</p>
+    <ul>
+      <li><a href="#dataload">Data loading from the RAW file</a></li>
+      <li><a href="#dcrawemu">Postprocessing functions emulating the dcraw
+          behavior</a></li>
+      <li><a href="#dcrawrite">File output functions emulating the dcraw
+          behavior</a>.</li>
+    </ul>
+    <p>The results of processing are placed in the imgdata field of type <a href="API-datastruct.html">libraw_data_t</a>;
+      the same data set contains fields that control the postprocessing and
+      output.</p>
+    <p><a name="return"></a></p>
+    <h2>Returned Values</h2>
+    <p>All LibRaw API functions return an integer number in accordance with the
+      <a href="API-notes.html#errors">return code convention</a>. Please read
+      the descriptions of <a href="API-notes.html#errors">this convention</a>
+      and <a href="#callbacks">LibRaw behavior in cases of fatal errors</a>.</p>
+    <p><a name="dataload"></a></p>
+    <h2>Methods Loading Data from a File</h2>
+    <p><a name="open_datastream"></a></p>
+    <h3>int LibRaw::open_datastream(LibRaw_abstract_datastream *stream)</h3>
+    <p>Opens a datastream with RAW data, reads metadata (EXIF) from it, and
+      fills the following structures:</p>
+    <ul>
+      <li>imgdata.idata (<a href="API-datastruct.html#libraw_iparams_t">libraw_iparams_t</a>),</li>
+      <li>imgdata.sizes (<a href="API-datastruct.html#libraw_image_sizes_t">libraw_image_sizes_t</a>),</li>
+      <li>imgdata.color (<a href="API-datastruct.html#libraw_colordata_t">libraw_colordata_t</a>),</li>
+      <li>imgdata.other (<a href="API-datastruct.html#libraw_imgother_t">libraw_imgother_t</a>),
+        and</li>
+      <li>imgdata.thumbnail (<a href="API-datastruct.html#libraw_thumbnail_t">libraw_thumbnail_t</a>).</li>
+    </ul>
+    <p>The function returns an integer number in accordance with the <a href="API-notes.html#errors">return
+        code convention</a>: positive if any system call has returned an error,
+      negative (from the <a href="API-datastruct.html#LibRaw_errors">LibRaw
+        error list</a>) if there has been an error situation within LibRaw.</p>
+    <p>Before file opening, <a href="#recycle">recycle()</a> is always called;
+      hence, if several images are processed in the batch mode, there is no need
+      to call recycle() at the end of each processing cycle.</p>
+    <p><strong>Input data</strong>: pointer to object, derived from <a href="#datastream">LibRaw_abstract_datastream</a>
+      class. This object should be initialized and ready to read. This object
+      should be destroyed in calling application after use.</p>
+    <p><a name="open_file"></a></p>
+    <h3>int LibRaw::open_file(const char *filename[,INT64 bigfile_size])</h3>
+    <h3>Win32 only: int LibRaw::open_file(const wchar_t *filename[,INT64
+      bigfile_size])</h3>
+    <p>Creates an <a href="#file_datastream">LibRaw_file_datastream</a> object,
+      calls <a href="#open_datastream">open_datastream()</a>. If succeed, sets
+      internal flag which signals to destroy internal datastream object on <a href="#recycle">recycle()</a>.
+      On failure, just created file_datastream destroyed immediately.</p>
+    <p>Second optional parameter <strong>bigfile_size</strong> controls
+      background I/O interface used for file operations. For files smaller than
+      bigfile_size the <a href="#file_datastream">LibRaw_file_datastream</a>
+      will be used and the <a href="#bigfile_datastream">LibRaw_bigfile_datastream</a>
+      otherwise.</p>
+    <p>The function returns an integer number in accordance with the <a href="API-notes.html#errors">return
+        code convention</a>: positive if any system call has returned an error,
+      negative (from the <a href="API-datastruct.html#LibRaw_errors">LibRaw
+        error list</a>) if there has been an error situation within LibRaw.</p>
+    <p><a name="open_buffer"></a></p>
+    <h3>int LibRaw::open_buffer(void *buffer, size_t bufsize)</h3>
+    <p>Created an <a href="#buffer_datastream">LibRaw_buffer_datastream</a>
+      object, calls <a href="#open_datastream">open_datastream()</a>. If
+      succeed, sets internal flag which signals to destroy internal datastream
+      object on <a href="#recycle">recycle()</a>. On failure, just created
+      file_datastream destroyed immediately.</p>
+    <p>The function returns an integer number in accordance with the <a href="API-notes.html#errors">return
+        code convention</a>: positive if any system call has returned an error,
+      negative (from the <a href="API-datastruct.html#LibRaw_errors">LibRaw
+        error list</a>) if there has been an error situation within LibRaw.</p>
+    <p><a name="open_bayer"></a></p>
+    <h3>int LibRaw::open_bayer(unsigned char *data, unsigned datalen, ushort
+      _raw_width, ushort _raw_height, ushort _left_margin, ushort _top_margin,
+      ushort _right_margin, ushort _bottom_margin, unsigned char procflags,
+      unsigned char bayer_pattern, unsigned unused_bits, unsigned otherflags,
+      unsigned black_level)</h3>
+    <p>Parameters: </p>
+    <ul>
+      <li>data, datalen - buffer passed </li>
+      <li>_raw_width/_raw_height/*margin - image size and margins </li>
+      <li> procflags:
+        <ul>
+          <li>for 10-bit format:
+            <ul>
+              <li>1: "4 pixels in 5 bytes" packing is used </li>
+              <li>0: "6 pixels in 8 bytes" packing is used </li>
+            </ul>
+          </li>
+          <li>for 16-bit format:
+            <ul>
+              <li>1: Big-endian data </li>
+            </ul>
+          </li>
+        </ul>
+      </li>
+      <li>bayer_pattern: one of LIBRAW_OPENBAYER_RGGB,LIBRAW_OPENBAYER_BGGR,
+        LIBRAW_OPENBAYER_GRBG,LIBRAW_OPENBAYER_GBRG </li>
+      <li>unused_bits: count of upper zero bits </li>
+      <li>otherflags:
+        <ul>
+          <li>Bit 1 - filter (average neighbors) for pixels with values of zero
+          </li>
+          <li>Bits 2-4 - the orientation of the image (0=do not rotate, 3=180,
+            5=90CCW, 6=90CW) </li>
+        </ul>
+      </li>
+      <li>black_level: file black level (it also may be specified via
+        imgdata.params) </li>
+    </ul>
+    See samples/openbayer_sample.cpp for usage sample (note, this sample is
+    'sample only', suited for Kodak KAI-0340 sensor, you'll need change
+    open_bayer() params for your data).
+    <p><a name="unpack"></a></p>
+    <h3>int LibRaw::unpack(void)</h3>
+    <p>Unpacks the RAW files of the image, calculates the black level (not for
+      all formats). The results are placed in imgdata.image.</p>
+    <p>Data reading is sometimes (not frequently) affected by settings made in
+      imgdata.params (<a href="API-datastruct.html#libraw_output_params_t">libraw_output_params_t</a>);
+      see <a href="API-notes.html">API notes</a> for details.</p>
+    <p>The function returns an integer number in accordance with the <a href="API-notes.html#errors">return
+        code convention</a>: positive if any system call has returned an error,
+      negative (from the <a href="API-datastruct.html#LibRaw_errors">LibRaw
+        error list</a>) if there has been an error situation within LibRaw.</p>
+    <p><a name="unpack_thumb"></a></p>
+    <h3>int LibRaw::unpack_thumb(void)</h3>
+    <p>Reads (or unpacks) the image preview (thumbnail), placing the result into
+      the imgdata.thumbnail.thumb buffer.<br>
+      JPEG previews are placed into this buffer without any changes (with the
+      header etc.). Other preview formats are placed into the buffer in the form
+      of the unpacked bitmap image (three components, 8 bits per component).<br>
+      The thumbnail format is written to the imgdata.thumbnail.tformat field;
+      for the possible values, see <a href="API-datastruct.html#LibRaw_thumbnail_formats">description
+        of constants and data structures</a>.</p>
+    <p>The function returns an integer number in accordance with the <a href="API-notes.html#errors">return
+        code convention</a>: positive if any system call has returned an error,
+      negative (from the <a href="API-datastruct.html#LibRaw_errors">LibRaw
+        error list</a>) if there has been an error situation within LibRaw.</p>
+    <p><a name="utility"></a></p>
+    <h2>Auxiliary Functions</h2>
+    <h3>Library version check</h3>
+    <p><a name="version"></a></p>
+    <h4>const char* LibRaw::version()</h4>
+    <p>Returns string representation of LibRaw version in
+      MAJOR.MINOR.PATCH-Status format (i.e. 0.6.0-Alpha2 or 0.6.1-Release).</p>
+    <p><a name="versionNumber"></a></p>
+    <h4>int LibRaw::versionNumber()</h4>
+    <p>Returns integer representation of LibRaw version. During LibRaw
+      development, the version number is always increase .</p>
+    <p><a name="LIBRAW_CHECK_VERSION"></a></p>
+    <h4>bool LIBRAW_CHECK_VERSION(major,minor,patch)</h4>
+    <p>Macro for version check in caller applications. Returns 'true' if current
+      library version is greater or equal to set in macro parameters. This macro
+      executes at runtime (not at compile time) and may be used for checking
+      version of dynamically loaded LibRaw (from DLL/shared library).</p>
+    <h3>List of supported RAW formats (cameras)</h3>
+    <p><a name="cameraCount"></a></p>
+    <h4>int LibRaw::cameraCount()</h4>
+    <p>Returns count of cameras supported.</p>
+    <p><a name="cameraList"></a></p>
+    <h4>const char** LibRaw::cameraList()</h4>
+    <p>Returns list of supported cameras. Latest item of list is set to NULL
+      (for easy printing).</p>
+    <p><a name="#set_rawspeed_camerafile"></a></p>
+    <h4>int LibRaw::set_rawspeed_camerafile(char *path_to_cameras_xml)</h4>
+    <p>(Only if LibRaw was built with RawSpeed support).</p>
+    <p>Loads XML file with RawSpeed camera description data (cameras.xml)
+      specified by path_to_cameras_xml. Returns 0 on success, nonzero on error.
+      <a name="get_decoder_info"></a></p>
+    <h4>int LibRaw::get_decoder_info(libraw_decoder_info_t *)</h4>
+    <p>The function fills <a href="API-datastruct.html#libraw_decoder_info_t">libraw_decoder_info_t</a>
+      structure by passed pointer with current raw decoder data.</p>
+    <p>The function returns an integer number in accordance with the <a href="API-notes.html#errors">return
+        code convention</a>: positive if any system call has returned an error,
+      negative (from the <a href="API-datastruct.html#LibRaw_errors">LibRaw
+        error list</a>) if there has been an error situation within LibRaw.</p>
+    <p><a name="unpack_function_name"></a></p>
+    <h3>const char* LibRaw::unpack_function_name()</h3>
+    <p>Returns function name of file unpacking function. Intended only for
+      LibRaw test suite designers to use in test coverage evaluation.</p>
+    <p><a name="setCancelFlag"></a></p>
+    <h4>void LibRaw::setCancelFlag()</h4>
+    <p>This call sets internal fast cancel flags. If set, current Raw decoder
+      will be terminated ASAP. This call is useful if you need to cancel all
+      LibRaw decoders in multithreaded program (e.g. for fast program
+      termination or just for cancel current processing).</p>
+    <p><a name="clearCancelFlag"></a></p>
+    <h4>void LibRaw::clearCancelFlag()</h4>
+    <p>This call clears internal fast cancel flags, so (early) terminated LibRaw
+      decoder may work again.</p>
+    <p><a name="COLOR"></a></p>
+    <h4>int LibRaw::COLOR(int row, int col)</h4>
+    <p>This call returns pixel color (color component number) in bayer patter at
+      row,col. The returned value is in 0..3 range for 4-component Bayer (RGBG2,
+      CMYG and so on) and in 0..2 range for 3-color data.</p>
+    <p>Color indexes returned could be used as index in imgdata.idata.cdesc
+      string to get color 'name'.</p>
+    <p><a name="error_count"></a></p>
+    <h4>int LibRaw::error_count()</h4>
+    <p>This call returns count of non-fatal data errors (out of range, etc)
+      occured in unpack() stage.</p>
+    <p><a name="subtract_black"></a></p>
+    <h4>int LibRaw::subtract_black()</h4>
+    <p>This call will subtract black level values from RAW data (for suitable
+      RAW data). <a href="API-datastruct.html#libraw_colordata_t">colordata.data_maximum</a>
+      and <strong>colordata.maximum</strong> and black level data (<a href="API-datastruct.html#libraw_colordata_t">colordata.black</a>
+      and colordata.cblack) will be adjusted too.</p>
+    <p>This call should be used if you postprocess RAW data by your own code.
+      LibRaw <a href="#dcrawemu">postprocessing functions</a> will call <strong>subtract_black()</strong>
+      by oneself.</p>
+    <p>The function returns an integer number in accordance with the <a href="API-notes.html#errors">return
+        code convention</a>: positive if any system call has returned an error,
+      negative (from the <a href="API-datastruct.html#LibRaw_errors">LibRaw
+        error list</a>) if there has been an error situation within LibRaw.</p>
+    <a name="adjust_to_raw_inset_crop"></a>
+    <h4>int LibRaw::adjust_to_raw_inset_crop(unsigned mask, float maxcrop =
+      0.55f)</h4>
+    <p> Promotes imgdata.sizes.raw_inset_crops[] values to imgdata.sizes.*margin
+      and imgdata.sizes.width/height fields</p>
+    <p> Parameters<br>
+      mask: </p>
+    <ul>
+      <li>if bit 1 is set: prefer raw_inset_crops[1] </li>
+      <li>if bit 0 is set: prefer raw_inset_crops[0] </li>
+    </ul>
+    <p>maxcrop: limits crop to not less than (original width/height)*maxcrop; if
+      raw_inset_crops[i] data results in tighter crop, than this item is
+      ignored. </p>
+    <p>return value: index in raw_inset_crops[] used increased by one, so </p>
+    <ul>
+      <li>0: no changes made </li>
+      <li>1: [0]th data used </li>
+      <li>2: [1]th data used </li>
+    </ul>
+    <p>Note: this call SHOULD be used after LibRaw::unpack(), otherwise black
+      level calculation from masked area may be fooled resulting in wrong black
+      levels. </p>
+    <p><a name="floatingpoint"></a></p>
+    <h4>Support for floating point data</h4>
+    <p>Libraw can read floating point DNG files (no other RAW formats may use
+      floating point) with or without conversion to integer data. Floating point
+      values are stored in imgdata.rawdata buffers:</p>
+    <ul>
+      <li><span style="font-family: monospace;">float * float_image</span> (if
+        not NULL) points to floating point bayer data</li>
+      <li><span style="font-family: monospace;">float (*float3_image)[3]</span>
+        (if not NULL) points to floating point 3-channel buffer</li>
+      <li><span style="font-family: monospace;">float (*float4_image)[4]</span>
+        (if not NULL) points to floating point 4-channel buffer</li>
+    </ul>
+    <p>Function calls for floating point support:</p>
+    <ul>
+      <li><span style="font-family: monospace;">int LibRaw::is_floating_point();
+        </span>function will return 1 if file contains floating point data</li>
+      <li><span style="font-family: monospace;">int LibRaw::have_fpdata();</span>
+        function will return 1 if FP data has read (decoded) into memory and not
+        converted to integer data</li>
+      <li>int LibRaw::convertFloatToInt(float dmin=4096.f, float dmax=32767.f,
+        float dtarget = 16383.f) converts floating point data to integer. If
+        data maximum is out of dmin..dmax range, than data scaled to set maximum
+        to dtarget</li>
+    </ul>
+    <p><a name="ycc"></a></p>
+    <h4>Support for YCC formats (Canon sRAW/mRAW and Nikon Small NEF)</h4>
+    <pre>       int LibRaw::is_sraw();<br>       int LibRaw::is_nikon_sraw();<br>       int LibRaw::sraw_midpoint()</pre>
+    <ul>
+      <li>is_sraw() call returns nonzero if current image is YCC-based.</li>
+      <li>is_nikon_sraw() call returns nonzero for Nikon Small NEF files</li>
+      <li>sraw_midpoint() call returns neutral (gray) point for color channels</li>
+    </ul>
+    <p><a name="recycle_datastream"></a></p>
+    <h4>void LibRaw::set_dng_host(void* p)</h4>
+    <p>If LibRaw is compiled with Adobe DNG SDK support and you wish to use this
+      support:</p>
+    <ul>
+      <li>you need to create own dng_host object</li>
+      <li>and pass it to LibRaw object using this function</li>
+    </ul>
+    <h4>void LibRaw::recycle_datastream(void)</h4>
+    <p>This call closes input datastream with associated data buffer and
+      unblocks opened file. <a name="recycle"></a></p>
+    <h3>void LibRaw::recycle(void)</h3>
+    <p>Frees the allocated data of LibRaw instance, enabling one to process the
+      next file using the same processor. Repeated calls of recycle() are quite
+      possible and do not conflict with anything.</p>
+    <p><a name="~LibRaw"></a></p>
+    <h3>LibRaw::~LibRaw()</h3>
+    <p>Destructor, which consists in calling recycle().</p>
+    <p><a name="strprogress"></a></p>
+    <h3>const char* LibRaw::strprogress(enum LibRaw_progress code)</h3>
+    <p>Converts progress stage code to description string (in English).</p>
+    <p><a name="libraw_strerror"></a></p>
+    <h3>const char* LibRaw::strerror(int errorcode)</h3>
+    <p>Analog of strerror(3) function: outputs the text descriptions of LibRaw
+      error codes (in English).</p>
+    <p><a name="callbacks"></a></p>
+    <h3>Setting Error Notification Functions</h3>
+    <p>In process of RAW conversion LibRaw can call user-setted callback. This
+      callback can be used for:</p>
+    <ul>
+      <li>Dynamic status update (progress bar and so on).</li>
+      <li>Cancel of processing (for example, user pressed Cancel button).</li>
+    </ul>
+    <p>Also, work of the library may cause two types of exceptional situations
+      that require notification of the calling application:</p>
+    <ul>
+      <li>Memory shortage</li>
+      <li>Data read error.</li>
+    </ul>
+    <p>An application may set its own callbacks that will be called in the cases
+      mentioned above to notify the user (or the calling program).</p>
+    <p><a name="progress"></a></p>
+    <h4>Progress indication/processing termination</h4>
+    <pre>        typedef int (*progress_callback)(void *callback_data,enum LibRaw_progress stage, int iteration, int expected);<br>        void LibRaw::set_progress_handler(progress_callback func,void *callback_data);<br>    </pre>
+    <p>LibRaw user can set own callback which will be called 10-50 times during
+      RAW postprocessing by dcraw_process().</p>
+    <p>This callback may terminate current image processing by returning of
+      non-zero value. In such case all processing will be cancelled immediately
+      and all resources will be returned to system by recycle() call. Current
+      call of dcraw_process() will return error code
+      LIBRAW_CANCELLED_BY_CALLBACK.</p>
+    <p>Callback parameters:</p>
+    <dl>
+      <dt>void *callback_data</dt>
+      <dd>void*-pointer, passed as 2nd argument to set_progress_handler(). This
+        pointer should be used to pass additional data to callback (i.e. thread
+        local data and so on).</dd>
+      <dt>enum LibRaw_progress stage</dt>
+      <dd>Current processing stage. This number can be converted to string by
+        call to <a href="#strprogress">LibRaw::strprogress</a>. Not all
+        processing stages are covered by callback calls.</dd>
+      <dt>int iteration</dt>
+      <dd>Iteration number within current stage (from 0 to expected-1).</dd>
+      <dt>int expected</dt>
+      <dd>Expected number of iterations on current stage.</dd>
+    </dl>
+    <p>Callback should return value of: <strong>0</strong> for continue
+      processing and <strong>non-zero</strong> for immediate cancel of
+      processing.</p>
+    <p>&nbsp;</p>
+    <p>If LibRaw compiled with OpenMP support, iteration parameter may not
+      always increase within one stage. Out of order callback calls are
+      possible.</p>
+    <p>Callback code sample:</p>
+    <pre>int my_progress_callback(void *data,enum LibRaw_progress p,int iteration, int expected)<br>{<br>    char *passed_string = (char *data);<br>    printf("Callback: %s  pass %d of %d, data passed: %s\n",libraw_strprogress(p),iteration,expected,passed_string);<br>    if(timeout || key_pressed )<br>        return 1; // cancel processing immediately<br>    else<br>        return 0; // can continue<br>}</pre>
+    <p><a name="exif"></a></p>
+    <h4>User-specified exif tag parser callback</h4>
+    <pre>       typedef void (*exif_parser_callback) (void *context, int tag, int type, int len,unsigned int ord, void *ifp);<br>       void    LibRaw::set_exifparser_handler( exif_parser_callback cb,void *context);<br>    </pre>
+    <p>Callback to be called on each parsed EXIF/Makernotes tag with parameters:</p>
+    <ul>
+      <li>context - pointer to context passed to set_exifparser_handler();</li>
+      <li>tag - EXIF/Makernotes tag value</li>
+      <li>type - TIFF(EXIF) tag type</li>
+      <li>len - tag length</li>
+      <li>ord - byte order (II or MM)</li>
+      <li>void *ifp - pointer to LibRaw_abstract_datastream, positioned to tag
+        data</li>
+    </ul>
+    <p><a name="memerror"></a></p>
+    <h4>Out-of-Memory Notifier</h4>
+    <pre>        typedef void (* memory_callback)(void *callback_data,const char *file, const char *where);<br>        void LibRaw::set_memerror_handler(memory_callback func,void *callback_data);<br>    </pre>
+    <p>The user may set his or her own function called in the case of memory
+      shortage. It is a void function receiving two string parameters:</p>
+    <ul>
+      <li><strong>void *callback_data</strong> - void*-pointer, passed as 2nd
+        argument to set_progress_handler(). This pointer should be used to pass
+        additional data to callback (i.e. thread local data and so on).</li>
+      <li><strong>file</strong> is the name of the RAW file whose processing
+        evoked the out-of-memory error. This name <strong>can be NULL</strong>
+        if underlying data input layer does not know the name. So, if calling
+        application sets own callback, this callback should work with NULL file
+        name.</li>
+      <li><strong>where</strong> is the name of the function where memory
+        shortage occurred.</li>
+    </ul>
+    <p>The callback function is intended for information purposes: it notifies
+      the user or the program code that processing is impossible.</p>
+    <p>If the user does not set his or her own handler, the standard one (output
+      of error message in stderr) will be used.</p>
+    <p>One can set the null handler by passing NULL to set_memerror_handler;
+      then no notifier function will be called. The same effect can be achieved
+      by creating a LibRaw object with the LIBRAW_OPTIONS_NO_MEMERR_CALLBACK
+      flag in the contructor.</p>
+    <p>In the case of memory shortage, processing of the current file is
+      terminated and a notifier is called; all allocated resources are freed,
+      and <a href="#recycle">recycle()</a> is performed. The current call will
+      return LIBRAW_UNSUFFICIENT_MEMORY. <br>
+      At an attempt to continue data processing, all subsequent calls will
+      return LIBRAW_OUT_OF_ORDER_CALL. Processing of a new file may be started
+      in the usual way, by calling LibRaw::open_file().</p>
+    <p><a name="dataerror"></a></p>
+    <h4>File Read Error Notifier</h4>
+    <pre>        typedef void (*data_callback)(void *callback_data,const char *file, const int offset);<br>        void LibRaw::set_dataerror_handler(data_callback func, void *callback_data); <br>    </pre>
+    <p>The user can define his or her own function to be called in the case of
+      error in the input data. It is a void function receiving two parameters:</p>
+    <ul>
+      <li><strong>void *callback_data</strong> - void*-pointer, passed as 2nd
+        argument to set_progress_handler(). This pointer should be used to pass
+        additional data to callback (i.e. thread local data and so on).</li>
+      <li><strong>file</strong> is the name of the RAW file whose processing
+        evoked the file read error. This name <strong>can be NULL</strong> if
+        underlying data input layer does not know the name. So, if calling
+        application sets own callback, this callback should work with NULL file
+        name.</li>
+      <li><strong>offset</strong> is -1 at end-of-file (if LibRaw expects more
+        data) or a positive number equal to the file position (bytes from file
+        beginning) where the unpacking error occurred.</li>
+    </ul>
+    <p>The callback function is intended for information purposes: it notifies
+      the user or the program code that processing is impossible.</p>
+    <p>If the user does not set his or her own handler, the standard one (output
+      of error message in stderr) will be used.</p>
+    <p>One can set the null handler by passing NULL to set_memerror_handler;
+      then no notifier function will be called. The same effect can be achieved
+      by creating a LibRaw object with the LIBRAW_OPTIONS_NO_DATAERR_CALLBACK
+      flag in the contructor.</p>
+    <p>In the case of error in the input data, processing of the current file is
+      terminated and a notifier is called; all allocated resources are freed,
+      and <a href="#recycle">recycle()</a> is performed. The current call will
+      return LIBRAW_IO_ERROR. <br>
+      At an attempt to continue data processing, all subsequent calls will
+      return LIBRAW_OUT_OF_ORDER_CALL. Processing of a new file may be started
+      in the usual way, by calling LibRaw::open_file().</p>
+    <p><a name="dcrawemu"></a></p>
+    <h2>Data Postprocessing: Emulation of dcraw Behavior</h2>
+    <p>Instead of writing one's own Bayer pattern postprocessing, one can use
+      the dcraw functions, which are called after the calls of open_file() +
+      unpack() /+ unpack_thumb()/</p>
+    <p><a name="dcraw_params"></a></p>
+    <h3>Parameter Setting</h3>
+    <p>Virtually all parameters that can be set through the dcraw command line
+      are specified by assigning values to fields of the <strong>LibRaw::imgdata.params</strong>
+      structure. The type of this structure is <strong>libraw_output_params_t</strong>;
+      all fields are listed and described in sufficient detail in the <a href="API-datastruct.html#libraw_output_params_t">description
+        of data structures</a>.</p>
+    <p><a name="raw2image"></a></p>
+    <h3>int LibRaw::raw2image</h3>
+    <p>This function allocates buffer for postprocessing (imgdata.image) and
+      fills it with data layout compatible with LibRaw 0.13/0.14 and below. If
+      the buffer is already allocated, it will be free()ed and allocated again.</p>
+    <p>This function should be called only if your code do postprocessing stage.
+      If you use LibRaw's postprocessing calls (see below) you don't need to
+      call raw2image().</p>
+    <p>The function returns an integer number in accordance with the <a href="API-notes.html#errors">return
+        code convention</a>: positive if any system call has returned an error,
+      negative (from the <a href="API-datastruct.html#LibRaw_errors">LibRaw
+        error list</a>) if there has been an error situation within LibRaw.</p>
+    <p><a name="free_image"></a></p>
+    <h3>void LibRaw::free_image</h3>
+    <p>This function releases the imgdata.image buffer allocated by raw2image();</p>
+    <p>This method should be called if current postprocessing results are not
+      needed by the program (e.g. already copied somewhere), but new
+      postprocessing calls (with another settings) are possible, so it is to
+      early to call <a href="#recycle">recycle()</a>.</p>
+    <p><a name="adjust_sizes_info_only"></a></p>
+    <h3>int LibRaw::adjust_sizes_info_only(void)</h3>
+    <p>The function calculates the correct size of the output image
+      (imgdata.sizes.iwidth and imgdata.sizes.iheight) for the following cases:</p>
+    <ul>
+      <li>Files from Fuji cameras (with a 45-degree rotation)</li>
+      <li>Files from cameras with non-square pixels</li>
+      <li>Images shot by a rotated camera.</li>
+    </ul>
+    <p>In the aforementioned cases, the function changes the fields of the image
+      output size; note that this change cannot be repeated again.</p>
+    <p><a name="dcraw_process"></a></p>
+    <h3>int LibRaw::dcraw_process(void)</h3>
+    <p>The function emulates the postprocessing capabilities available in <strong>dcraw</strong>.<br>
+      Called after calling LibRaw::unpack();</p>
+    <p>The entire functionality of dcraw (set via the field values in <a href="API-datastruct.html#libraw_output_params_t">imgdata.params</a>)
+      is supported, except for</p>
+    <ul>
+      <li>Dark frame subtraction</li>
+      <li>Work with bad pixels.</li>
+    </ul>
+    <p>The function is intended solely for demonstration and testing purposes;
+      it is assumed that its source code will be used in most real applications
+      as the reference material concerning the order of RAW data processing.</p>
+    <p>The function returns an integer number in accordance with the <a href="API-notes.html#errors">error
+        code convention</a>: positive if any system call has returned an error,
+      negative (from the <a href="API-datastruct.html#LibRaw_errors">LibRaw
+        error list</a>) if there has been an error situation within LibRaw.</p>
+    <p><a name="dcrawrite"></a></p>
+    <h2>Data Output to Files: Emulation of dcraw Behavior</h2>
+    <p>In spite of the abundance of libraries for file output in any formats,
+      LibRaw includes calls that emulate the file output provided by dcraw. This
+      is done primarily for easier verification of library work: the resultant
+      files must be binary identical.</p>
+    <p><a name="dcraw_ppm_tiff_writer"></a></p>
+    <h3>int LibRaw::dcraw_ppm_tiff_writer(const char *outfile)</h3>
+    <p>The function outputs the postprocessing results to a file in the PPM/PGM
+      or TIFF format (the format is set via imgdata.params.output_tiff). The
+      results are binary identical to those provided by dcraw.</p>
+    <p>If "-" is passed as outfile, the function will write to standard output
+      (stdout).</p>
+    <p>The function returns an integer number in accordance with the <a href="API-notes.html#errors">error
+        code convention</a>: positive if any system call has returned an error,
+      negative (from the <a href="API-datastruct.html#LibRaw_errors">LibRaw
+        error list</a>) if there has been an error situation within LibRaw.</p>
+    <p><a name="dcraw_thumb_writer"></a></p>
+    <h3>int LibRaw::dcraw_thumb_writer(const char *thumbfile)</h3>
+    <p>Writes the thumbnail to a file in the PPM format for bitmap thumbnails
+      and in the JPEG format for JPEG thumbnails, i.e., in the format completely
+      identical to the results provided by dcraw.</p>
+    <p>The function returns an integer number in accordance with the <a href="API-notes.html#errors">error
+        code convention</a>: positive if any system call has returned an error,
+      negative (from the <a href="API-datastruct.html#LibRaw_errors">LibRaw
+        error list</a>) if there has been an error situation within LibRaw.</p>
+    <p><a name="memwrite"></a></p>
+    <h2>Copying unpacked data into memory buffer</h2>
+    <p>There is several function calls for store unpacked data into memory
+      buffer (after using dcraw_process() and so on):</p>
+    <ul>
+      <li><strong>get_mem_image_format</strong> - get resulting bitmap size and
+        bit depth.</li>
+      <li><strong>copy_mem_image</strong> - copy postprocessed data into some
+        memory buffer with different color order and line stride.</li>
+      <li><strong>dcraw_make_mem_image</strong> - store processed image data
+        into allocated buffer;</li>
+      <li><strong>dcraw_make_mem_thumb</strong> - store extracted thumbnail into
+        buffer as JPEG-file image (for most cameras) or as RGB-bitmap.</li>
+    </ul>
+    <p>For usage primer see samples/mem_image.c sample.</p>
+    <p>&nbsp;</p>
+    <p><a name="get_mem_image_format"></a></p>
+    <h3>void get_mem_image_format(int *widthp, int *heightp, int *colorsp, int
+      *bpp) const - return processing bitmap size</h3>
+    <p>This function returns size of postprocessed image:</p>
+    <ul>
+      <li>Image width is returned in *widthp;</li>
+      <li>Bitmap height is returned in *heightp;</li>
+      <li>Image color count is returned in *colorsp;</li>
+      <li>Bits per pixel (8 or 16) is returned in *bpp;</li>
+    </ul>
+    <p><a name="copy_mem_image"></a></p>
+    <h3>int LibRaw::copy_mem_image(void* scan0, int stride, int bgr) - copies
+      postprocessed bitmap data into buffer</h3>
+    <p>Function parameters:</p>
+    <ul>
+      <li>void *scan0 - pointer to buffer to copy data to. The buffer should be
+        at least stride*image_height bytes;</li>
+      <li>int stride - stride of each other image line (row) in bytes. Usually
+        image_width*(bit_per_pixel/8)*image_colors, but may be more if you wish
+        to align image rows to, for example, 8 or 16 or 32 bytes to make CPU
+        more happy.</li>
+      <li>int bgr - pixel copy order. RGB if bgr==0 and BGR overwise.</li>
+    </ul>
+    <p>The function returns an integer number in accordance with the <a href="API-notes.html#errors">error
+        code convention</a>: positive if any system call has returned an error,
+      negative (from the <a href="API-datastruct.html#LibRaw_errors">LibRaw
+        error list</a>) if there has been an error situation within LibRaw.</p>
+    <p><a name="dcraw_make_mem_image"></a></p>
+    <h3>libraw_processed_image_t *dcraw_make_mem_image(int *errorcode=NULL) -
+      store unpacked and processed image into memory buffer as RGB-bitmap</h3>
+    <p>This function allocates memory buffer and stores unpacked-preprocessed
+      image into this buffer. Function returns allocated structure <a href="API-datastruct.html#libraw_processed_image_t">libraw_processed_image_t</a>
+      with filled fields. Always returns data as RGB bitmap (i.e. <strong>type</strong>
+      field is equal to LIBRAW_IMAGE_BITMAP).</p>
+    <p>dcraw_process() should be called before dcraw_make_mem_image();</p>
+    <p>Returns NULL in case of an error. If caller has passed not-NULL value as
+      errorcode parameter, than *errorcode will be set to error code according
+      to <a href="API-notes.html#errors">error code convention</a>.</p>
+    <p><strong>NOTE!</strong> Memory, allocated for return value will not be
+      fried at destructor or <strong>LibRaw::recycle</strong> calls. Caller of
+      dcraw_make_mem_image should free this memory by call to <a href="#dcraw_clear_mem">LibRaw::dcraw_clear_mem()</a>.</p>
+    <p><a name="dcraw_make_mem_thumb"></a></p>
+    <h3>libraw_processed_image_t *dcraw_make_mem_thumb(int *errorcode=NULL) -
+      store unpacked thumbnail into memory buffer</h3>
+    <p>This function allocates memory buffer and stores thumbnail data in it.
+      Function returns allocated structure <a href="API-datastruct.html#libraw_processed_image_t">libraw_processed_image_t</a>
+      with filled fields. For most RAW images allocated structure will contains
+      JPEG image (i.e. <strong>type</strong> field is equal to
+      LIBRAW_IMAGE_JPEG). For some cameras with RGB-bitmap thumbnail (Kodak
+      SLRs) returned structure contains RGB bitmap (<strong>type</strong> field
+      is equal to LIBRAW_IMAGE_JPEG, see structure description for details).</p>
+    <p>unpack_thumb() should be called before dcraw_make_mem_thumb();</p>
+    <p>Returns NULL in case of an error. If caller has passed not-NULL value as
+      errorcode parameter, than *errorcode will be set to error code according
+      to ñ <a href="API-notes.html#errors">error code convention</a>.</p>
+    <p><strong>NOTE!</strong> Memory, allocated for return value will not be
+      fried at destructor or <strong>LibRaw::recycle</strong> calls. Caller of
+      dcraw_make_mem_image should free this memory by call to <a href="#dcraw_clear_mem">LibRaw::dcraw_clear_mem()</a>.</p>
+    <h3>void LibRaw::dcraw_clear_mem(libraw_processed_image_t *)</h3>
+    <p>This function will free the memory allocated by <strong>dcraw_make_mem_image</strong>
+      or <strong>dcraw_make_mem_thumb</strong>.</p>
+    <p>This is static class member, so call syntax should be
+      LibRaw::dcraw_clear_mem(...).</p>
+    <p>This call translates directly to free() system function, but it is better
+      to use dcraw_clear_mem because LibRaw (DLL) may be compiled with memory
+      manager other than in calling application.</p>
+    <p><a name="datastream"></a></p>
+    <h2>Input layer abstraction</h2>
+    <p><a name="LibRaw_abstract_datastream"></a></p>
+    <h3>class LibRaw_abstract_datastream - abstract RAW read interface</h3>
+    <p>LibRaw reads RAW-data by calling (virtual) methods of C++ object derived
+      from <strong>LibRaw_abstract_datastream</strong>. This C++ class does not
+      implement any read, but defines interface to be called. Call to base class
+      methods always results in error.</p>
+    <p><a name="datastream_methods"></a></p>
+    <h4>LibRaw_abstract_datastream class methods</h4>
+    <p><a name="datastream_methods_utility"></a></p>
+    <h5>Object verification</h5>
+    <dl>
+      <dt><strong> virtual int valid()</strong></dt>
+      <dd>Checks input datastream validity. Returns 1 on valid stream and 0 if
+        datastream was created on non-valid input parameters (wrong filename for
+        file stream and so on).</dd>
+    </dl>
+    <p><a name="datastream_methods_read"></a></p>
+    <h5>Stream read and positioning</h5>
+    <p>This group of methods implements file object (FILE*) semantics.</p>
+    <dl>
+      <dt><strong>virtual int read(void * ptr,size_t size, size_t nmemb)</strong></dt>
+      <dd>Similar to fread(ptr,size,nmemb,file).</dd>
+      <dt><strong>virtual int seek(off_t o, int whence)</strong></dt>
+      <dd>Similar to fseek(file,o,whence).</dd>
+      <dt><strong>virtual int tell(</strong></dt>
+      <dd>Similar to ftell(file).</dd>
+      <dt><strong>virtual int get_char()</strong></dt>
+      <dd>Similar to getc(file)/fgetc(file).</dd>
+      <dt><strong>virtual char* gets(char *s, int n)</strong></dt>
+      <dd>Similar to fgets(s,n,file).</dd>
+      <dt><strong>virtual int eof()</strong></dt>
+      <dd>Similar to feof(file).</dd>
+      <dt><strong>virtual int scanf_one(const char *fmt, void *val)</strong></dt>
+      <dd>Simplified variant of fscanf(file,fmt,val): format string is always
+        contains one argument to read. So, variable args call is not needed and
+        only one pointer to data passed.</dd>
+      <dt><strong> virtual int jpeg_src(void * p);</strong></dt>
+      <dd>Initializes read structures in j_decompress_ptr object passed as *p.
+        This object is used by libjpeg for JPEG data reading from datastream.
+        <p>Returns -1 on error and 0 on success.</p>
+      </dd>
+      <dt><strong> virtual void * make_jas_stream();</strong></dt>
+      <dd>Creates LibJasper input stream (for JPEG2000 decoding).
+        <p>returns NULL on error or data pointer on success.</p>
+      </dd>
+    </dl>
+    <p><a name="datastream_methods_other"></a></p>
+    <h5>Other methods</h5>
+    <p>This group of methods includes several supplementary calls. These calls
+      are used to temporary switch to another data stream (file and/or memory
+      buffer).</p>
+    <dl>
+      <dt><strong>virtual const char* fname()</strong></dt>
+      <dd>Returns name of opened file if datastream object knows it (for
+        example, <strong>LibRaw_file_datastream</strong> used). Filename used
+        in:
+        <ul>
+          <li>error notification callbacks;</li>
+          <li>generation of filename of JPEG-file with metadata when needed
+            (i.e. cameras with 'Diag RAW hack').</li>
+        </ul>
+      </dd>
+      <dt><strong>virtual int subfile_open(const char *fn)</strong></dt>
+      <dd>This call temporary switches input to file <strong>fn</strong>.
+        Returns 0 on success and error code on error.<br>
+        The function used to read metadata from external JPEG file (on cameras
+        with "Diag RAW hack"). <br>
+        This call is not implemented for <a href="#buffer_datastream">LibRaw_buffer_datastream</a>,
+        so external JPEG processing is not possible when buffer datastream used.
+        <br>
+        This functon should be implemented in real input class, base class call
+        always return error. <br>
+        Working implementation sample can be found in <a href="#file_datastream">LibRaw_file_datastream</a>
+        implementation in <strong>libraw/libraw_datastream.h</strong> file.</dd>
+      <dt><strong> virtual void subfile_close()</strong></dt>
+      <dd>This call switches input stream from temporary open file back to main
+        data stream.</dd>
+      <dt><strong> virtual int tempbuffer_open(void *buf, size_t size)</strong></dt>
+      <dd>This call temporary switches input to <a href="#buffer_datastream">LibRaw_buffer_datastream</a>
+        object, created from <strong>buf</strong>.<br>
+        This method is needed for Sony encrypted metadata parser.
+        <p>This call implemented in base class (<strong>LibRaw_abstract_datastream</strong>),
+          there is no need to reimplement in in derived classes.<br>
+          Possible activity of temporary datastream requires very accurate
+          programming when implementing datastreams derived from base <strong>LibRaw_abstract_datastream</strong>.
+          See <a href="#substream">below</a> for more details.</p>
+      </dd>
+      <dt><strong> virtual void tempbuffer_close()</strong></dt>
+      <dd>This call switch input back from temporary datastream to main stream.
+        This call implemented in base <strong>LibRaw_abstract_datastream</strong>
+        class.</dd>
+    </dl>
+    <p><a name="datastream_derived"></a></p>
+    <h3>Derived input classes included in LibRaw</h3>
+    <p>There is three "standard" input classes in LibRaw distribution:</p>
+    <ul>
+      <li><a href="#file_datastream">LibRaw_file_datastream</a> implements input
+        from file (in filesystem).</li>
+      <li><a href="#bigfile_datastream">LibRaw_bigfile_datastream</a> slower
+        I/O, but files larger than 2Gb are supported.</li>
+      <li><a href="#buffer_datastream">LibRaw_buffer_datastream</a> implements
+        input from memory buffer.</li>
+    </ul>
+    <p>LibRaw C++ interface users can implement their own input classes and use
+      them via <a href="#open_datastream">LibRaw::open_datastream</a> call.
+      Requirements and implementation specifics are described below.</p>
+    <p><a name="file_datastream"></a></p>
+    <h4>class LibRaw_file_datastream - file input interface</h4>
+    <p>This class implements input from file.</p>
+    <p><strong>Class methods:</strong></p>
+    <dl>
+      <dt><strong> LibRaw_file_datastream(const char *fname) </strong></dt>
+      <dd>This constructor creates <strong>LibRaw_file_datastream</strong>
+        object from file <strong>fname</strong>.<br>
+        Unfortunately, C++ constructor cannot return an error. So if bad
+        filename passed (e.g. nonexistent file) object is created as non-valid
+        (valid() call returns zero).</dd>
+    </dl>
+    <p>All other class methods are <a href="#datastream_methods">described
+        above</a>.<br>
+      This class implements all possble methods, including fname() and
+      subfile_open().</p>
+    <p><a name="bigfile_datastream"></a></p>
+    <h4>class LibRaw_bigfile_datastream - file input interface</h4>
+    <p>This class implements input from file.</p>
+    <p><strong>Class methods:</strong></p>
+    <dl>
+      <dt><strong> LibRaw_bigfile_datastream(const char *fname) </strong></dt>
+      <dd>This constructor creates <strong>LibRaw_bigfile_datastream</strong>
+        object from file <strong>fname</strong>.<br>
+        Unfortunately, C++ constructor cannot return an error. So if bad
+        filename passed (e.g. nonexistent file) object is created as non-valid
+        (valid() call returns zero).</dd>
+    </dl>
+    <p>The difference between <strong>file</strong> and <strong>bigfile</strong>
+      datastreams are obvious from class name: bigfile one supports large files
+      (more than 2Gb) on all supported systems. File one uses streambuf
+      interface which is limited to 2Gb on many systems.</p>
+    <p>All other class methods are <a href="#datastream_methods">described
+        above</a>.<br>
+      This class implements all possble methods, including fname() and
+      subfile_open().</p>
+    <p><a name="buffer_datastream"></a></p>
+    <h4>class LibRaw_buffer_datastream - memory buffer input interface</h4>
+    <p>This class implements input from memory buffer.</p>
+    <p><strong>Class methods:</strong></p>
+    <dl>
+      <dt><strong> LibRaw_buffer_datastream(void *buffer, size_t bsize)</strong></dt>
+      <dd>This constructor creates datastream object from <strong>buffer</strong>
+        with size <strong>bsize</strong>.<br>
+        It is not possibly to verify the pointer passed, so buffer address is
+        checked against 0 and -1 only.</dd>
+    </dl>
+    <p>All other class methods are <a href="#datastream_methods">described
+        above</a>.<br>
+      This class does not implement fname() and subfile_open() calls, so
+      external JPEG metadata parsing is not possible.</p>
+    <p><a name="own_datastreams"></a></p>
+    <h3>Own datastream derived classes</h3>
+    <p>To create own read interface LibRaw user should implement C++ class
+      derived from <strong>LibRaw_abstract_datastream</strong> with all read
+      methods.<br>
+      LibRaw standard implementations may be used as reference. See <strong>libraw/libraw_datastream.h</strong>
+      file for details (all standard LibRaw input classes are implemented using
+      inline functions only).</p>
+    <p><a name="substream"></a></p>
+    <p><a href="index.html">[back to Index]</a></p>
+  </body>
+</html>

+ 1303 - 0
raw.mod/libraw/doc/API-datastruct.html

@@ -0,0 +1,1303 @@
+<html>
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=windows-1252">
+    <title>LibRaw: Data Structures and Constants</title>
+  </head>
+  <body>
+    <p>LibRaw: Data Structures and Constants <a href="index.html"> [back to
+        Index] </a></p>
+    <h1>LibRaw: Data Structures and Constants</h1>
+    <p>LibRaw data structures are defined in header file libraw/libraw_types.h <br>
+      Constants used in its work are defined in file libraw/libraw_const.h</p>
+    <h2>Contents:</h2>
+    <ol>
+      <li><a href="#datastruct"> Data structures </a>
+        <ol>
+          <li><a href="#libraw_data_t"> libraw_data_t: Main Data Structure in
+              LibRaw </a></li>
+          <li><a href="#libraw_iparams_t"> Structure libraw_iparams_t: Main
+              Parameters of the Image </a></li>
+          <li><a href="#libraw_image_sizes_t"> Structure libraw_image_sizes_t:
+              Image Dimensions </a></li>
+          <li><a href="#libraw_colordata_t"> Structure libraw_colordata_t: Color
+              Information </a></li>
+          <li><a href="#libraw_imgother_t"> Structure libraw_imgother_t: Other
+              Parameters of the Image </a></li>
+          <li><a href="#libraw_rawdata_t"> Structure libraw_rawdata_t: holds
+              unpacked RAW data </a></li>
+          <li><a href="#libraw_thumbnail_t"> Structure libraw_thumbnail_t:
+              Description of Thumbnail </a></li>
+          <li><a href="#libraw_lensinfo_t"> Structure libraw_lensinfo_t - lens
+              data, extracted from EXIF/Makernotes </a></li>
+          <li><a href="#libraw_raw_unpack_params_t"> Structure
+              libraw_raw_unpack_params_t: metadata and raw decoding options and
+              flags</a></li>
+          <li><a href="#libraw_output_params_t"> Structure
+              libraw_output_params_t: Management of dcraw-style postprocessing </a></li>
+          <li><a href="#libraw_callbacks_t">Structure libraw_callbacks_t:
+              user-settable callbacks</a> </li>
+          <li><a href="#libraw_processed_image_t"> Structure
+              libraw_processed_image_t - result set for
+              dcraw_make_mem_image()/dcraw_make_mem_thumb() functions </a></li>
+        </ol>
+      </li>
+      <li><a href="#datastream"> Input abstraction layer </a>
+        <ul>
+          <li><a href="#datastream_data"> Data fields </a></li>
+        </ul>
+      </li>
+      <li><a href="#const"> Constants </a>
+        <ol>
+          <li><a href="#LibRaw_errors"> enum LibRaw_errors: Error Codes </a></li>
+          <li><a href="#decoder_flags"> enum LibRaw_decoder_flags - RAW data
+              format description </a></li>
+          <li><a href="#progress"> enum LibRaw_progress: Current State of LibRaw
+              Object </a></li>
+          <li><a href="#LibRaw_thumbnail_formats"> enum
+              LibRaw_thumbnail_formats: Thumbnail Data Formats </a></li>
+          <li><a href="#warnings"> Nonstandard Situations (Warnings) during RAW
+              Data Processing </a></li>
+          <li><a href="#LibRaw_image_formats"> enum LibRaw_image_formats -
+              possible types of data, contains in libraw_processed_image_t
+              structure</a></li>
+          <li><a href="#LibRaw_processing_options">enum
+              LibRaw_processing_options - flags that affects extracted RAW data</a></li>
+          <li><a href="#LibRaw_rawspecial_t">enum LibRaw_rawspecial_t - special
+              raw extraction modes</a></li>
+        </ol>
+      </li>
+    </ol>
+    <p><a name="datastruct"></a></p>
+    <h2>Data Structures</h2>
+    <p><a name="libraw_data_t"></a></p>
+    <h3>libraw_data_t: Main Data Structure of LibRaw</h3>
+    <p>Structure libraw_data_t is a "wrapping" for data structures accessible to
+      the user of the library. <br>
+      When one uses C++ API, it is accessible as LibRaw::imgdata
+      (class_instance.imgdata). The data in this structure appear after a file
+      is opened through open_file (and other open_ calls), except for the image
+      itself (filled by unpack()) and data containing the preview information
+      (filled by calling unpack_thumb()). </p>
+    <h4>Data fields:</h4>
+    <dl>
+      <dt><strong> unsigned int progress_flags; </strong></dt>
+      <dd>This field records the past <a href="#progress"> phases of image
+          processing </a> .</dd>
+      <dt><strong> unsigned int process_warnings; </strong></dt>
+      <dd>This field records <a href="#warnings"> suspicious situations
+          (warnings) </a> that have emerged during image processing.</dd>
+      <dt><strong> libraw_iparams_t idata; </strong></dt>
+      <dd>The structure describes the main image parameters retrieved from the
+        RAW file. Fields of this structure are described in detail <a href="#libraw_iparams_t">
+          below </a> .</dd>
+      <dt><strong> libraw_image_sizes_t sizes; </strong></dt>
+      <dd>The structure describes the geometrical parameters of the image.
+        Fields of this structure are described in detail <a href="#libraw_image_sizes_t">
+          below </a> .</dd>
+      <dt><strong> libraw_lensinfo_t lens; </strong></dt>
+      <dd>The structure describes lens used for the shot. Fields of this
+        structure are described in detail <a href="#libraw_lensinfo_t"> below </a>
+        .</dd>
+      <dt><strong> libraw_makernotes_t makernotes; </strong></dt>
+      <dd>The structure contains camera/vendor specific metadata extracted from
+        file. No description provided, sorry, if you're interested in particular
+        tag/camera/vendor - use Exiftool documentation as a reference</dd>
+      <dt><strong> libraw_colordata_t color; </strong></dt>
+      <dd>The structure contains color data retrieved from the file. Fields of
+        this structure are described in detail <a href="#libraw_colordata_t">
+          below </a> .</dd>
+      <dt><strong> libraw_imgother_t other; </strong></dt>
+      <dd>Data structure for information purposes: it contains the image
+        parameters that have been extracted from the file but are not needed in
+        further file processing. Fields of this structure are described in
+        detail <a href="#libraw_imgother_t"> below </a> .</dd>
+      <dt><strong> libraw_thumbnail_t thumbnail; </strong></dt>
+      <dd>Data structure containing information on the preview and the preview
+        data themselves. All fields of this structure but thumbnail itself are
+        filled when open_file() is called. Thumbnail readed by unpack_thumb()
+        call. The fields are described in detail <a href="#libraw_thumbnail_t">
+          below </a> .</dd>
+      <dt><strong> libraw_rawdata_t rawdata; </strong></dt>
+      <dd>Data structure with pointer to raw-data buffer. Details are described
+        <a href="#libraw_rawdata_t"> below </a> .</dd>
+      <dt><strong> ushort (*image)[4]; </strong></dt>
+      <dd>The memory area that contains the image pixels per se. It is filled
+        when raw2image() or dcraw_process() is called.</dd>
+      <dt><strong> libraw_output_params_t params; </strong></dt>
+      <dd>Data structure intended for management of image postprocessing (using
+        the dcraw emulator). Fields of this structure are described in detail <a
+
+          href="#libraw_iparams_t"> below </a> .</dd>
+      <dt>libraw_callbacks_t callbacks;</dt>
+      <dd><a href="#libraw_callbacks_t">user-settable callbacks</a> </dd>
+    </dl>
+    <p><a name="libraw_iparams_t"></a></p>
+    <h3>Structure libraw_iparams_t: Main Parameters of the Image</h3>
+    <dl>
+      <dt><strong> char make[64]; </strong></dt>
+      <dd>Camera manufacturer.</dd>
+      <dt><strong> char model[64]; </strong></dt>
+      <dd>Camera model.</dd>
+      <dt><b>normalized_make[64]</b></dt>
+      <dd> There is a huge number of identical cameras sold under different
+        names, depending on the market (e.g. multiple Panasonic or Canon models)
+        and even some identical cameras sold under different brands (Panasonic
+        -&gt; Leica, Sony -&gt; Hasselblad). normalized_make contains primary
+        vendor name (e.g. Panasonic for Leica re-branded cameras). </dd>
+      <dt><b>normalized_model[64]</b></dt>
+      <dd> Primary camera model name. </dd>
+      <dt><b>unsigned maker_index</b></dt>
+      <dd>Primary vendor name in indexed form (enum LibRaw_cameramaker_index,
+        LIBRAW_CAMERAMAKER_* constant) </dd>
+      <dt><strong> char software[64]; </strong></dt>
+      <dd>Softwary name/version (mostly for DNG files, to distinguish in-camera
+        DNGs from Adobe DNG Converter produced ones).</dd>
+      <dt><strong> unsigned raw_count; </strong></dt>
+      <dd>Number of RAW images in file (0 means that the file has not been
+        recognized).</dd>
+      <dt><strong> unsigned is_foveon; </strong></dt>
+      <dd>Nonzero for Sigma Foveon images</dd>
+      <dt><strong> unsigned dng_version; </strong></dt>
+      <dd>DNG version (for the DNG format).</dd>
+      <dt><strong> int colors; </strong></dt>
+      <dd>Number of colors in the file.</dd>
+      <dt><strong> unsigned filters; </strong></dt>
+      <dd>Bit mask describing the order of color pixels in the matrix (0 for
+        full-color images). 32 bits of this field describe 16 pixels (8 rows
+        with two pixels in each, from left to right and from top to bottom).
+        Each two bits have values 0 to 3, which correspond to four possible
+        colors. Convenient work with this field is ensured by the
+        COLOR(row,column) function, which returns the number of the active color
+        for a given pixel.<br>
+        Values less than 1000 are reserved as special cases:
+        <ul>
+          <li><strong> 1 </strong> - Leaf Catchlight with 16x16 bayer matrix;</li>
+          <li><strong> 9 </strong> - Fuji X-Trans (6x6 matrix)</li>
+          <li>3..8 and 10..999 - are unused.</li>
+        </ul>
+      </dd>
+      <dt><strong> char xtrans[6][6]; </strong></dt>
+      <dt><strong> char xtrans_abs[6][6]; </strong></dt>
+      <dd>These matrices contains Fuji X-Trans row/col to color mapping. First
+        one is relative to visible area, while second is positioned relative to
+        sensor edges.</dd>
+      <dt><strong> char cdesc[5]; </strong></dt>
+      <dd>Description of colors numbered from 0 to 3 (RGBG,RGBE,GMCY, or GBTG).</dd>
+      <dt><strong> unsigned xmplen; char *xmpdata; </strong></dt>
+      <dd>XMP packed data length and pointer to extracted XMP packet.</dd>
+    </dl>
+    <p><a name="libraw_image_sizes_t"></a></p>
+    <h3>Structure libraw_image_sizes_t: Image Dimensions</h3>
+    <p>Structure libraw_image_sizes_t is a collection of all file data that
+      describe the size of the image. </p>
+    <h4> Data fields:</h4>
+    <dl>
+      <dt><strong> ushort raw_height, raw_width; </strong></dt>
+      <dd>Full size of RAW image (including the frame) in pixels.</dd>
+      <dt><strong> ushort height, width; </strong></dt>
+      <dd>Size of visible ("meaningful") part of the image (without the frame).</dd>
+      <dt><strong> ushort top_margin, left_margin; </strong></dt>
+      <dd>Coordinates of the top left corner of the frame (the second corner is
+        calculated from the full size of the image and size of its visible
+        part).</dd>
+      <dt><strong> ushort iheight, iwidth; </strong></dt>
+      <dd>Size of the output image (may differ from height/width for cameras
+        that require image rotation or have non-square pixels).</dd>
+      <dt><strong> unsigned raw_pitch; </strong></dt>
+      <dd>Full size of raw data row <strong> in bytes </strong> .</dd>
+      <dt><strong> double pixel_aspect; </strong></dt>
+      <dd>Pixel width/height ratio. If it is not unity, scaling of the image
+        along one of the axes is required during output.</dd>
+      <dt><strong> int flip; </strong></dt>
+      <dd>Image orientation (0 if does not require rotation; 3 if requires
+        180-deg rotation; 5 if 90 deg counterclockwise, 6 if 90 deg clockwise).</dd>
+      <dt><strong>libraw_raw_inset_crop_t raw_inset_crops[2];</strong></dt>
+      <dd>(<strong>libraw_raw_inset_crop_t: </strong>ushort cleft, ctop,
+        cwidth, cheight;)<ul>
+        <li>item at[0] contains standard crop data parsed from camera metadata (DNG:
+          DefaultCrop* tags, other formats: vendor specific tags)</li>
+        <li>item at [1] is 'user crop', in particular:
+       <br/>- set by DNG  DefaultUserCrop tag
+       <br/>- or set via raw aspect ratio tags (e.g. 16:9 aspect on Fujifilm cameras)
+          raw_inset_crops[1] is filled only if aspect ratio tags provides different
+          aspect ratio compared to raw_inset_crops[0].
+        </li></ul></dd>
+    </dl>
+    <p><a name="libraw_colordata_t"></a></p>
+    <h3>Structure libraw_colordata_t: Color Information</h3>
+    <p>Structure libraw_colordata_t unites all color data, both retrieved from
+      the RAW file and calculated on the basis of the image itself. For
+      different cameras, there are different ways of color handling. </p>
+    <h4>Data fields:</h4>
+    <dl>
+      <dt><strong> ushort curve[0x10000]; </strong></dt>
+      <dd>Camera tone curve. May be read from file as is, or calculated,
+        depending on file format;</dd>
+      <dt><strong> unsigned black; </strong></dt>
+      <dd>Black level. Depending on the camera, it may be zero (this means that
+        black has been subtracted at the unpacking stage or by the camera
+        itself), calculated at the unpacking stage, read from the RAW file, or
+        hardcoded.</dd>
+      <dt><strong> unsigned cblack[4102]; </strong></dt>
+      <dd>Per-channel black level correction. First 4 values are per-channel
+        correction, next two are black level pattern block size, than
+        cblack[4]*cblack[5] correction values (for indexes
+        [6....6+cblack[4]*cblack[5]).</dd>
+      <dt><strong> unsigned data_maximum; </strong></dt>
+      <dd>Maximum pixel value in current file. Calculated at raw2image or
+        dcraw_process() calls.</dd>
+      <dt><strong> unsigned maximum; </strong></dt>
+      <dd>Maximum pixel value. Calculated from the data for most cameras,
+        hardcoded for others. This value may be changed on postprocessing stage
+        (when black subtraction performed) and by automated maximum adjustment
+        (this adjustment performed if <strong> params.adjust_maximum_thr </strong>
+        is set to nonzero).</dd>
+      <dt><strong> unsigned linear_max[4]; </strong></dt>
+      <dd>Per-channel linear data maximum read from file metadata. If RAW file
+        does not contains this data, linear_max[] is set to zero. Black value is
+        not subtracted</dd>
+      <dt><strong> float fmaximum; </strong></dt>
+      <dd>Maximum pixel value in real image for floating data files.</dd>
+      <dt><strong> float fnorm; </strong></dt>
+      <dd>Normalization coefficient used while converting floating point raw
+        data to integer.</dd>
+      <dt><strong> ushort white[8][8]; </strong></dt>
+      <dd>Block of white pixels extracted from files CIFF/CRW. Not extracted for
+        other formats. Used to calculate white balance coefficients.</dd>
+      <dt><strong> float cam_xyz[4][3]; </strong></dt>
+      <dd>Camera RGB - XYZ conversion matrix. This matrix is constant (different
+        for different models). Last row is zero for RGB cameras and non-zero for
+        different color models (CMYG and so on).</dd>
+      <dt><strong> float cam_mul[4]; </strong></dt>
+      <dd>White balance coefficients (as shot). Either read from file or
+        calculated.</dd>
+      <dt><strong> float pre_mul[4]; </strong></dt>
+      <dd>White balance coefficients for daylight (daylight balance). Either
+        read from file, or calculated on the basis of file data, or taken from
+        hardcoded constants.</dd>
+      <dt><strong> float cmatrix[3][4]; </strong></dt>
+      <dd>Camera color data read from RAW file (if any)</dd>
+      <dt><strong> float rgb_cam[3][4]; </strong></dt>
+      <dd>Camera to sRGB conversion matrix</dd>
+      <dt><strong> float ccm[3][4]; </strong></dt>
+      <dd>Camera color correction matrix readed from file metadata (uniform
+        matrix if no such data in file)</dd>
+      <dt><strong> ph1_t phase_one_data; </strong></dt>
+      <dd>Color data block that is read for Phase One cameras.</dd>
+      <dt><strong> float flash_used; </strong></dt>
+      <dt><strong> float canon_ev; </strong></dt>
+      <dd>Fields used for white balance calculations (for some P&amp;S Canon
+        cameras).</dd>
+      <dt><strong> char model2[64]; </strong></dt>
+      <dd>Firmware revision (for some cameras).</dd>
+      <dt><strong> char UniqueCameraModel[64],LocalizedCameraModel[64]; </strong></dt>
+      <dd>Values from DNG tags with same names.</dd>
+      <dt><strong> void *profile; </strong></dt>
+      <dd>Pointer to the retrieved ICC profile (if it is present in the RAW
+        file).</dd>
+      <dt><strong> unsigned profile_length; </strong></dt>
+      <dd>Length of ICC profile in bytes.</dd>
+      <dt><strong> unsigned black_stat[8]; </strong></dt>
+      <dd>Black level statistics if calcluated from masked area: 4 sum of pixel
+        values, than 4 pixel counts (per channel).</dd>
+      <dt><strong> libraw_dng_color_t dng_color[2]; </strong></dt>
+      <dd>Color data read from DNG: illuminant, calbiration matrix and color
+        matrix for two light sources. (see DNG specs for details).</dd>
+      <dt><strong>libraw_dng_levels_t dng_levels</strong></dt>
+      <dd>DNG black/white levels, analog balance, WB for active IFD. See DNG
+        specs for details.</dd>
+      <dt><strong>int WB_Coeffs[256][4]</strong></dt>
+      <dd>Index: EXIF color source value, [i][0..3] WB Coeffs</dd>
+      <dt><strong>float WBCT_Coeffs[64][5]</strong></dt>
+      <dd>Color temperature in [i][0], WB coeffs in [i][1..4]</dd>
+      <dt><strong>int as_shot_wb_applied</strong></dt>
+      <dd>Set to 1 if WB already applied in camera (multishot modes; small raw)</dd>
+      <dt><strong>libraw_P1_color_t P1_color[2]</strong></dt>
+      <dd>Phase-one specific color data</dd>
+      <dt><strong>unsigned raw_bps</strong></dt>
+      <dd>RAW bits per pixel (PhaseOne: Raw format used)</dd>
+      <dt><strong>int ExifColorSpace</strong></dt>
+      <dd>EXIF color space parsed from EXIF tags: LIBRAW_COLORSPACE_Unknown,
+        LIBRAW_COLORSPACE_sRGB, or LIBRAW_COLORSPACE_Adobe</dd>
+    </dl>
+    <p><a name="libraw_imgother_t"></a></p>
+    <h3>Structure libraw_imgother_t: Other Parameters of the Image</h3>
+    <h4>Data fields:</h4>
+    <dl>
+      <dt><strong> float iso_speed; </strong></dt>
+      <dd>ISO sensitivity.</dd>
+      <dt><strong> float shutter; </strong></dt>
+      <dd>Shutter speed.</dd>
+      <dt><strong> float aperture; </strong></dt>
+      <dd>Aperture.</dd>
+      <dt><strong> float focal_len; </strong></dt>
+      <dd>Focal length.</dd>
+      <dt><strong> time_t timestamp; </strong></dt>
+      <dd>Date of shooting.</dd>
+      <dt><strong> unsigned shot_order; </strong></dt>
+      <dd>Serial number of image.</dd>
+      <dt><strong> unsigned gpsdata[32]; </strong></dt>
+      <dd>GPS data (unparsed block, to write to output as is).</dd>
+      <dt><strong> libraw_gps_info_t parsed_gps; </strong></dt>
+      <dd>Parsed GPS-data: longitude/latitude/altitude and time stamp.</dd>
+      <dt><strong> char desc[512]; </strong></dt>
+      <dd>Image description.</dd>
+      <dt><strong> char artist[64]; </strong></dt>
+      <dd>Author of image.</dd>
+      <dt><strong> float FlashEC; </strong></dt>
+      <dd>Flash exposure compensation.</dd>
+    </dl>
+    <p><a name="libraw_rawdata_t"></a></p>
+    <h3>Structure libraw_rawdata_t: holds unpacked RAW data</h3>
+    <p>Structure libraw_rawdata_t holds:</p>
+    <ul>
+      <li>RAW-data from sensor, readed and unpacked by the <a href="API-CXX.html#unpack">
+          unpack() </a> call.</li>
+      <li>"backup" copy of color and over data modified during postprocessing.
+        When postprocessing calls repeats, the needed data is restored from this
+        backup.</li>
+    </ul>
+    <h4>Data fields:</h4>
+    <dl>
+      <dt>void *raw_alloc;</dt>
+      <dd>Buffer allocated to hold RAW-data</dd>
+      <dt><strong> unsigned short *raw_image; </strong></dt>
+      <dd>Pointer to buffer with one-component (bayer) data.</dd>
+      <dt><strong> unsigned short (*color3_image)[3]; </strong></dt>
+      <dd>Pointer to 3-component pixel array.</dd>
+      <dt><strong> unsigned short (*color4_image)[4]; </strong></dt>
+      <dd>Pointer to buffer with 4-component pixel data data</dd>
+      <dt><strong> float *float_image; </strong></dt>
+      <dd>Pointer to buffer with one-component (bayer) data in FP-format.</dd>
+      <dt><strong> float (*float3_image)[3]; </strong></dt>
+      <dd>Pointer to 3-component FP pixel array.</dd>
+      <dt><strong> float (*float4_image)[4]; </strong></dt>
+      <dd>Pointer to buffer with 4-component pixel data data</dd>
+    </dl>
+    <p>After call to <a href="API-CXX.html#unpack"> unpack() </a> only one of
+      these fields is non-NULL.</p>
+    <p>All other fields of this structure are for internal use and should not be
+      touched by user code. <a name="libraw_thumbnail_t"></a></p>
+    <h3>Structure libraw_thumbnail_t: Description of Thumbnail</h3>
+    <p>Structure libraw_thumbnail_t describes all parameters associated with the
+      preview saved in the RAW file. </p>
+    <h4>Data fields:</h4>
+    <dl>
+      <dt><strong> LibRaw_thumbnail_formats tformat; </strong></dt>
+      <dd>Thumbnail data format. One of the values among enum <a href="#LibRaw_thumbnail_formats">
+          LibRaw_thumbnail_formats </a> .</dd>
+      <dt><strong> ushort twidth, theight; </strong></dt>
+      <dd>Dimensions of the preview image in pixels.</dd>
+      <dt><strong> unsigned tlength; </strong></dt>
+      <dd>Thumbnail length in bytes.</dd>
+      <dt><strong> int tcolors; </strong></dt>
+      <dd>Number of colors in the preview.</dd>
+      <dt><strong> char *thumb; </strong></dt>
+      <dd>Pointer to thumbmail, extracted from the data file.</dd>
+    </dl>
+    <p><a name="libraw_lensinfo_t"></a></p>
+    <h3>Structure libraw_lensinfo_t: parsed lens data</h3>
+    <p>The following parameters are extracted from Makernotes and EXIF, to help
+      identify which lens was mounted on the camera. If the value is missing in
+      Makernotes or EXIF, the parameter is set to zero with some exceptions
+      noted below. In some cases the values for the fields like CameraFormat and
+      CameraMount are set based on the camera model and/or camera ID.</p>
+    <h4>libraw_makernotes_lens_t structure:</h4>
+    <ul>
+      <li><strong>LensID</strong> (if not -1) and <strong>CamID</strong>
+        (camera id, if non-zero) values are compatible with those used in
+        exiftool, like |0x0010 CanonModelID| and |22 LensType| see <a href="http://www.sno.phy.queensu.ca/%7Ephil/exiftool/TagNames/Canon.html">http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Canon.html</a>
+        or 0x0207/CameraType and 0x0201/LensType (see <a href="http://www.sno.phy.queensu.ca/%7Ephil/exiftool/TagNames/Olympus.htmlhttp://www.sno.phy.queensu.ca/%7Ephil/exiftool/TagNames/Olympus.html">http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Olympus.html</a>
+        )</li>
+      <li><strong>Lens</strong> string, if not empty, contains the lens name
+        present in Makernotes.</li>
+      <li><strong>LensFormat </strong>and <strong>CameraFormat</strong>
+        currently provide one of value from <strong>enum LibRaw_camera_formats</strong>;</li>
+      <li>In a similar manner, values for <strong>LensMount</strong> and <strong>CameraMount</strong>
+        follow the <strong>enum LibRaw_camera_mounts</strong>;</li>
+      <li>In some cases, the Makernotes for MF cameras contain either an id for
+        the body, or a string containing the name of the body. The name is
+        copied to <strong>body</strong> field, while the id is converted to the
+        appropriate body name and also copied to 'body' field. In other cases
+        the 'body' field is empty.</li>
+      <li><strong>FocalType</strong> is set based on Makernotes tag, if present.
+        The values are: </li>
+      <ul>
+        <li>-1 Undefined</li>
+        <li>0 Unknown;</li>
+        <li>1 Fixed focal length lens</li>
+        <li>2 Zoom lens</li>
+      </ul>
+      <li><strong>LensFeatures_pre</strong> - lens name prefix and <strong>LensFeatures_suf</strong>
+        - lens name suffix: (if not empty) some cameras record alphabet soup
+        that characterizes the lens in separate Makernote tags (see, for
+        example, 0xb02a LensSpec at&nbsp;<a href="http://www.sno.phy.queensu.ca/%7Ephil/exiftool/TagNames/Sony.html">http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Sony.html</a>
+        ), and for some lenses those acronyms can be derived from the 'Lens'
+        field itself (see processCanonCameraInfo). Those can also help better
+        lens identification.</li>
+      <li><strong>MinFocal</strong> and <strong>MaxFocal</strong> , if
+        non-zero, contain the minimum and maximum focal lengths for the lens
+        mounted on the camera.</li>
+      <li><strong>MaxAp4MinFocal</strong>, <strong>MaxAp4MaxFocal</strong>, <strong>MinAp4MinFocal</strong>,
+        <strong>MinAp4MaxFocal</strong> - if non-zero, contain maximum aperture
+        available at minimal focal length, maximum aperture available at maximum
+        focal length, minimum aperture available at minimal focal length,
+        minimum aperture available at maximum focal length, respectively.</li>
+      <li><strong>MaxAp</strong> and <strong>MinAp</strong>, if non-zero,
+        contain the maximum aperture for the lens (usually it is the maximum
+        aperture for minimal focal length) and the minimum aperture across the
+        focal length range. For zooms with variable maximum aperture this is
+        usually the minimum aperture for the maximum focal length.</li>
+      <li><strong>CurFocal</strong>, if non-zero, is current focal length - that
+        is the focal length used to take the shot.</li>
+      <li><strong>CurAp</strong>, if non-zero, is current aperture.</li>
+      <li><strong>MaxAp4CurFocal</strong> and <strong>MinAp4CurFocal</strong>,
+        if non-zero, contain the minimum and maximum apertures for the current
+        focal length.</li>
+      <li><strong>LensFStops</strong> - if non-zero, contains the number of
+        aperture "clicks" or the number of f-stops, depending on the model of
+        the camera.</li>
+      <li><strong>TeleconverterID</strong>, <strong>AdapterID</strong>, <strong>AttachmentID</strong>,
+        if non-zero, are the numbers extracted from Makernotes to identify lens
+        accessories used to take the shot.</li>
+      <li><strong>Teleconverter</strong>, <strong>Adapter</strong>, <strong>Attachment</strong>,
+        if non-empty, are the strings containing the names of the accessories as
+        they appear in Makernotes, or for some cameras, decoded from a numeric
+        field in Makernotes.</li>
+      <li><strong>FocalUnits</strong> - an auxiliary field, should not be needed
+        most of the cases. See Canon.pm module in exiftool for more information
+        on this value.</li>
+      <li><strong>FocalLengthIn35mmFormat</strong>, if non-zero: for some reason
+        certain Samsung cameras record this value in Makernotes instead of the
+        EXIF proper. Also used for Sigma cameras.</li>
+    </ul>
+    <h4>libraw_nikonlens_t structure:</h4>
+    <p>Contains additional parameters needed to identify the lens on a Nikon
+      camera using a table - please see Nikon LensID Values at <a href="http://www.sno.phy.queensu.ca/%7Ephil/exiftool/TagNames/Nikon.html">http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html</a></p>
+    <h4>libraw_dnglens_t structure:</h4>
+    <p>Contains minimum focal length, maximum focal length, maximum aperture
+      available at minimal focal length, and maximum aperture available at
+      maximum focal length, extracted from EXIF field of a DNG raw file.</p>
+    <h4>libraw_lensinfo_t structure:</h4>
+    <p>Contains all the structures described above, plus parameters extracted
+      directly from EXIF fields:</p>
+    <ul>
+      <li><strong>MinFocal</strong> and <strong>MaxFocal</strong> , if
+        non-zero, contain the minimum and maximum focal lengths for the lens
+        mounted on the camera.</li>
+      <li><strong>MaxAp4MinFocal</strong>, <strong>MaxAp4MaxFocal</strong> - if
+        non-zero, contain maximum aperture available at minimal focal length and
+        maximum aperture available at maximum focal length</li>
+      <li><strong>LensMake</strong>, if not empty, contains a string with the
+        lens manufacturer name.</li>
+      <li><strong>Lens</strong>, if not empty, contains the lens name as
+        recorded in EXIF</li>
+      <li><strong>FocalLengthIn35mmFormat</strong> - if non-zero, same as
+        FocalLengthIn35mmFilm in EXIF standard, tag 0xa405.</li>
+      <li><strong>EXIF_MaxAp</strong> - if non-zero, contains the value derived
+        from EXIF tag 0x9205.</li>
+    </ul>
+    <p><a name="libraw_raw_unpack_params_t"></a></p>
+    <h3>Structure libraw_raw_unpack_params_t: RAW decoding options and flags</h3>
+    <p>Structure libraw_raw_unpack_params_t contains fields/flags that affects
+      RAWdata and metadata decoding</p>
+    <dl>
+      <dt><strong> int options </strong></dt>
+      <dd>Processing options used on unpack() phase for specific image formats,
+        see below for possible values:<a href="#LibRaw_processing_options">
+          LibRaw_processing_options</a></dd>
+      <dt><strong> unsigned shot_select; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -s <br>
+        Selection of image number for processing (for formats that contain
+        several RAW images in one file).</dd>
+      <dt><strong> int specials </strong></dt>
+      <dd>Special processing mode (e.g. omit YCC to RGB conversion), see below
+        for possible values. <a href="#LibRaw_rawspecial_t">
+          LibRaw_rawspecial_t</a></dd>
+      <dt><strong>int max_raw_memory_mb</strong></dt>
+      <dd>Stop processing if raw buffer size grows larger than that value (in
+        megabytes). Default is LIBRAW_MAX_ALLOC_MB_DEFAULT (2048Mb)</dd>
+      <dt><strong> int sony_arw2_posterization_thr </strong></dt>
+      <dd>If LIBRAW_PROCESSING_SONYARW2_DELTATOVALUE used for
+        raw_processing_options, sets the level to suppress posterization display
+        in shadows.</dd>
+      <dt><strong> float coolscan_nef_gamma; </strong></dt>
+      <dd>Gamma value for Coolscan NEF decoding (no way to get if from file, it
+        should be set by calling application).</dd>
+      <dt><strong> char p4shot_order[5]; </strong></dt>
+      <dd>Shot order for Pentax 4shot files. Default is "3102".</dd>
+    </dl>
+    <h3></h3>
+    <h3>Structure libraw_output_params_t: management of dcraw-style
+      postprocessing</h3>
+    <p>Structure libraw_output_params_t (imgdata.params) is used for management
+      of dcraw-compatible calls dcraw_process(), dcraw_ppm_tiff_writer(), and
+      dcraw_thumb_writer(). Fields of this structure correspond to command line
+      keys of dcraw. </p>
+    <h4> Data fields:</h4>
+    <dl>
+      <dt><strong> unsigned greybox[4]; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -A x y w h <br>
+        4 numbers corresponding to the coordinates (in pixels) of the rectangle
+        that is used to calculate the white balance. X and Y are coordinates of
+        the left-top rectangle corner; w and h are the rectangle's width and
+        height, respectively.</dd>
+      <dt><strong> unsigned cropbox[4]; </strong></dt>
+      <dd><strong> dcraw keys: </strong> none <br>
+        This field sets the image cropping rectangle. Cropbox[0] and cropbox[1]
+        are the rectangle's top-left corner coordinates, remaining two values
+        are width and height respectively. All coordinates are applied before
+        any image rotation.</dd>
+      <dt><strong> double aber[4]; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -C <br>
+        Correction of chromatic aberrations; the only specified values are <br>
+        aber[0], the red multiplier <br>
+        aber[2], the blue multiplier. For some formats, it affects <a href="API-notes.html">
+          RAW data reading </a> , since correction of aberrations changes the
+        output size.</dd>
+      <dt><strong> double gamm[6]; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -g power toe_slope <br>
+        Sets user gamma-curve. Library user should set first two fields of gamm
+        array: <br>
+        gamm[0] - <strong> inverted </strong> gamma value) <br>
+        gamm[1] - slope for linear part (so called toe slope). Set to zero for
+        simple power curve. <br>
+        Remaining 4 values are filled automatically.<br>
+        By default settings for rec. BT.709 are used: power 2.222 (i.e.
+        gamm[0]=1/2.222) and slope 4.5. For sRGB curve use gamm[0]=1/2.4 and
+        gamm[1]=12.92, for linear curve set gamm[0]/gamm[1] to 1.0. </dd>
+      <dt><strong> float user_mul[4]; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -r mul0 mul1 mul2 mul3 <br>
+        4 multipliers (r,g,b,g) of the user's white balance.</dd>
+      <dt><strong>float bright; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -b <br>
+        Brightness (default 1.0).</dd>
+      <dt><strong> float threshold; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -n <br>
+        Parameter for noise reduction through wavelet denoising.</dd>
+      <dt><strong> int half_size; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -h <br>
+        Outputs the image in 50% size. For some formats, it affects <a href="API-notes.html">
+          RAW data reading </a> .</dd>
+      <dt><strong> int four_color_rgb; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -f <br>
+        Switches on separate interpolations for two green components.</dd>
+      <dt><strong> int highlight; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -H <br>
+        0-9: Highlight mode (0=clip, 1=unclip, 2=blend, 3+=rebuild).</dd>
+      <dt><strong> int use_auto_wb; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -a <br>
+        Use automatic white balance obtained after averaging over the entire
+        image.</dd>
+      <dt><strong> int use_camera_wb; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -w <br>
+        If possible, use the white balance from the camera.
+        <p> If camera-recorded WB is not available, dcraw_process() will
+          fallback to: </p>
+        <ul>
+          <li>Auto-WB if bit LIBRAW_PROCESSING_CAMERAWB_FALLBACK_TO_DAYLIGHT is
+            not set in params.raw_processing_options (or for the rare specific
+            case: no valid WB index was parsed from CRW file) </li>
+          <li>Daylight-WB if abovementioned bit is not set. </li>
+        </ul>
+      </dd>
+      <dt><strong> int use_camera_matrix; </strong></dt>
+      <dd><strong> dcraw keys: </strong> +M/-M <br>
+        <ul>
+          <li>0: do not use embedded color profile</li>
+          <li>1 (default): use embedded color profile (if present) for DNG files
+            (always); for other files only if use_camera_wb is set;</li>
+          <li>3: use embedded color data (if present) regardless of white
+            balance setting.</li>
+        </ul>
+      </dd>
+      <dt><strong> int output_color; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -o <br>
+        [0-8] Output colorspace (raw, sRGB, Adobe, Wide, ProPhoto, XYZ, ACES,
+        DCI-P3, Rec. 2020).</dd>
+      <dt><strong> char* output_profile; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -o filename <br>
+        Path to output profile ICC file (used only if LibRaw compiled with LCMS
+        support)</dd>
+      <dt><strong> char* camera_profile; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -p file <br>
+        Path to input (camera) profile ICC file (or 'embed' for embedded
+        profile). Used only if LCMS support compiled in.</dd>
+      <dt><strong> char* bad_pixels; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -P file <br>
+        Path to file with bad pixels map (in dcraw format: "column row
+        date-of-pixel-death-in-UNIX-format", one pixel per row).</dd>
+      <dt><strong> char* dark_frame; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -K file <br>
+        Path to dark frame file (in 16-bit PGM format)</dd>
+      <dt><strong> int output_bps; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -4 <br>
+        8 bit (default)/16 bit (key -4).</dd>
+      <dt><strong> int output_tiff; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -T <br>
+        0/1: output PPM/TIFF.</dd>
+      <dt><strong> int output_flags; </strong></dt>
+      <dd><strong> dcraw keys:</strong> none<br>
+        Bitfield that allows to set output file options:
+        <ul>
+          <li><strong>LIBRAW_OUTPUT_FLAGS_PPMMETA</strong> - write additional
+            metadata into PPM/PGM output files</li>
+        </ul>
+      </dd>
+      <dt><strong> int user_flip; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -t <br>
+        [0-7] Flip image (0=none, 3=180, 5=90CCW, 6=90CW). Default -1, which
+        means taking the corresponding value from RAW. <br>
+        For some formats, <a href="API-notes.html"> affects RAW data reading </a>
+        , e.g., unpacking of thumbnails from Kodak cameras.</dd>
+      <dt><strong> int user_qual; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -q <br>
+        0-10: interpolation quality:
+        <ul>
+          <li>0 - linear interpolation</li>
+          <li>1 - VNG interpolation</li>
+          <li>2 - PPG interpolation</li>
+          <li>3 - AHD interpolation</li>
+          <li>4 - DCB interpolation</li>
+          <li>11 - DHT interpolation</li>
+          <li>12 - Modified AHD interpolation (by Anton Petrusevich)</li>
+        </ul>
+      </dd>
+      <dt><strong> int user_black; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -k <br>
+        User black level.</dd>
+      <dt><strong> int user_cblack[4]; </strong></dt>
+      <dd><strong> dcraw keys: </strong> none <br>
+        Per-channel corrections to user_black.</dd>
+      <dt><strong> int user_sat; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -S <br>
+        Saturation adjustment.</dd>
+      <dt><strong> int med_passes; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -m <br>
+        Number of median filter passes.</dd>
+      <dt><strong> int no_auto_bright; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -W <br>
+        Don't use automatic increase of brightness by histogram.</dd>
+      <dt><strong> float auto_bright_thr; </strong></dt>
+      <dd><strong> dcraw keys: </strong> none <br>
+        Portion of clipped pixels when auto brighness increase is used. Default
+        value is 0.01 (1%) for dcraw compatibility. Recommended value for modern
+        low-noise multimegapixel cameras depends on shooting style. Values in
+        0.001-0.00003 range looks reasonable.</dd>
+      <dt><strong> float adjust_maximum_thr; </strong></dt>
+      <dd><strong> dcraw keys: </strong> none <br>
+        This parameters controls auto-adjusting of maximum value based on
+        channel_maximum[] data, calculated from real frame data. If calculated
+        maximum is greater than adjust_maximum_thr*maximum, than maximum is set
+        to calculated_maximum. <br>
+        Default: 0.75. If you set this value above 0.99999, than default value
+        will be used. If you set this value below 0.00001, than no maximum
+        adjustment will be performed. <br>
+        Adjusting maximum should not damage any picture (esp. if you use default
+        value) and is very useful for correcting channel overflow problems
+        (magenta clouds on landscape shots, green-blue highlights for indoor
+        shots).</dd>
+      <dt><strong> int use_fuji_rotate; </strong></dt>
+      <dd><strong> dcraw keys: </strong> -j <br>
+        Default -1 (use), 0 - don't use rotation for cameras on a Fuji sensor.</dd>
+      <dt><strong> int green_matching; </strong></dt>
+      <dd>Turns on fixing of green channels disbalance. <strong> dcraw keys: </strong>
+        none <br>
+        Default: 0 (not use), 1 - turns on this postprocessing stage.
+        green_matching requires additional memory for image data.</dd>
+      <dt><strong> int dcb_iterations </strong></dt>
+      <dd><strong> dcraw keys: </strong> none <br>
+        Number of DCB correction passes. Default is -1 (no correction). Useful
+        only for DCB interpolation.</dd>
+      <dt><strong> int dcb_enhance_fl </strong></dt>
+      <dd><strong> dcraw keys: </strong> none <br>
+        nonzero: DCB interpolation with enhance interpolated colors.</dd>
+      <dt><strong> int fbdd_noiserd </strong></dt>
+      <dd><strong> dcraw keys: </strong> none <br>
+        Controls FBDD noise reduction before demosaic.
+        <ul>
+          <li>0 - do not use FBDD noise reduction</li>
+          <li>1 - light FBDD reduction</li>
+          <li>2 (and more) - full FBDD reduction</li>
+        </ul>
+      </dd>
+      <dt><strong> int exp_correc; float exp_shift,exp_preser; </strong></dt>
+      <dd>Exposure correction before demosaic. <br>
+        <ul>
+          <li>exp_correc: positive value turns the feature on (default: off).</li>
+          <li>exp_shift: exposure shift in linear scale. Usable range from 0.25
+            (2-stop darken) to 8.0 (3-stop lighter). Default: 1.0 (no exposure
+            shift).</li>
+          <li>exp_preser: preserve highlights when lighten the image. Usable
+            range from 0.0 (no preservation) to 1.0 (full preservation). 0.0 is
+            the default value.</li>
+        </ul>
+      </dd>
+      <dt><strong> int use_rawspeed; </strong></dt>
+      <dd>Turns on using RawSpeed library for data unpacking (only if RawSpeed
+        support compiled in).</dd>
+      <dt><strong>int use_dng_sdk; </strong></dt>
+      <dd>Turns on using Adobe DNG SDK (if compiled with it and dng host is set:
+        <br>
+        <ul>
+          <li>0 - do not use</li>
+          <li>1 - use for speciality formats (Float, Linear DNG, deflate
+            compression, 8 bit)</li>
+          <li>2 - use for all DNG files</li>
+        </ul>
+      </dd>
+      <dt><strong> int no_auto_scale; </strong></dt>
+      <dd>Disables pixel values scaling (call to LibRaw::scale_colors()) in
+        LibRaw::dcraw_process().<br>
+        This is <strong>special use value</strong> because white balance is
+        performed in scale_colors(), so skipping it will result in non-balanced
+        image.<br>
+        This setting is targeted to use with no_interpolation, or with own
+        interpolation callback call.</dd>
+      <dt><strong> int no_interpolation; </strong></dt>
+      <dd>Disables call to demosaic code in LibRaw::dcraw_process()</dd>
+    </dl>
+    <p><a name="libraw_callbacks_t"></a></p>
+    <h3>Structure libraw_callbacks_t: user-settable callbacks</h3>
+    <dl>
+      <dt>memory_callback mem_cb</dt>
+      <dd>Called on memory allocation error. Settable via set_memerror_handler.
+        See <a href="API-CXX.html#callbacks">C++ API</a> for details.</dd>
+      <dt>data_callback data_cb</dt>
+      <dd>Called on data error, settable via set_dataerror_handler. See <a href="API-CXX.html#callbacks">C++
+          API</a> for details.</dd>
+      <dt>progress_callback progress_cb</dt>
+      <dd>Called on process callback, settable via set_progress_handler. See <a
+
+          href="API-CXX.html#callbacks">C++ API</a> for details.</dd>
+      <dt>exif_parser_callback exif_cb, params: (void *context, int tag, int
+        type, int len, unsigned int ord, void *ifp)</dt>
+      <dd> Called by EXIF/TIFF IFD parsers on each processed tag.<br>
+        Parameters:
+        <ul>
+          <li>context: user-specified context, set via set_exifparser_handler()</li>
+          <li>tag: 16-bit of TIFF/EXIF tag or'ed with
+            <ul>
+              <li>0 - for EXIF parsing</li>
+              <li>0x20000 - for Kodak makernotes parsing</li>
+              <li>0x30000 - for Panasonic makernotes parsing</li>
+              <li>0x40000 - for EXIF Interop IFD parsing</li>
+              <li>0x50000 - for EXIF GPS IFD parsing</li>
+              <li>(ifdN + 1) &lt;&lt; 20) - for TIFF ifdN</li>
+            </ul>
+          </li>
+          <li>type: tag type (see TIFF/EXIF specs)</li>
+          <li>len: tag length</li>
+          <li>ord: byte order: 0x4949 for intel, 0x4d4d for motorola</li>
+          <li>ifp: pointer to LibRaw_abstract_datastream input stream,
+            positioned to start of data. There is no need to restore data
+            position in callback.</li>
+        </ul>
+      </dd>
+      <dt>int pre_identify_cb(void *)</dt>
+      <dd>Called with this pointer as the only arg before calling to
+        LibRaw::identify. If this callback return non-zero value, that means
+        that identify() is not needed and all internal data fields are filled
+        with values.</dd>
+      <dt>void post_identify_cb(void *)</dt>
+      <dd>Called after identify() from open_datastream(). May be used to tune
+        internal variables after metadata parse.</dd>
+      <dt>dcraw_process() callbacks</dt>
+      <dd>These callbacks are called before/after dcraw_process phases, the only
+        passed parameter is this pointer
+        <ul>
+          <li>pre_subtractblack_cb - called before black subtraction</li>
+          <li>pre_scalecolors_cb - called before scale_colors() call</li>
+          <li>pre_preinterpolate_cb - called before interpolaton (demosaic)</li>
+          <li>interpolate_bayer_cb - if set, called for bayer demosaic
+            (regardless of params.user_qual value)</li>
+          <li>interpolate_xtrans_cb - if set, called for X-Trans demosaic</li>
+          <li>post_interpolate_cb - called after demosaic step. Note: if this
+            callback is set, standard median_filter() is not called. So, if you
+            need median filtering you should call it from callback function.</li>
+          <li>pre_converttorgb_cb - called after convert_to_rgb()</li>
+          <li>post_converttorgb_cb - called after convert_to_rgb(), so very last
+            processing step.</li>
+        </ul>
+      </dd>
+    </dl>
+    <p><a name="libraw_decoder_info_t"></a></p>
+    <h3>Structure libraw_decoder_info_t: RAW decoder name and data format</h3>
+    <p>This structure describes RAW format decoder name and data format:</p>
+    <dl>
+      <dt>const char *decoder_name</dt>
+      <dd>Decoder function name</dd>
+      <dt>unsigned decoder_flags</dt>
+      <dd>Decoder data format. See <a href="#decoder_flags"> list of
+          LibRaw_decoder_flags </a> for details.</dd>
+    </dl>
+    <p><a name="libraw_processed_image_t"></a></p>
+    <h3>Structure libraw_processed_image_t - result set for
+      dcraw_make_mem_image()/dcraw_make_mem_thumb() functions</h3>
+    <p>Structure libraw_processed_image_t is produced by call of
+      dcraw_make_mem_image()/dcraw_make_mem_thumb() and contains in-memory image
+      of interpolated data or thumbnail. </p>
+    <h4>Data fields:</h4>
+    <dl>
+      <dt><strong> LibRaw_image_formats type </strong></dt>
+      <dd>This field records type of data, containing in remaining fields of
+        structure.
+        <ul>
+          <li><strong> LIBRAW_IMAGE_BITMAP </strong> - structure contains RGB
+            bitmap. All metadata fields (see below) are valid and describes
+            image data.</li>
+          <li><strong> LIBRAW_IMAGE_JPEG </strong> - structure contain
+            in-memory image of JPEG file. Only type, data_size and data fields
+            are valid (and nonzero);</li>
+        </ul>
+      </dd>
+      <dt><strong> ushort height,width </strong></dt>
+      <dd>Image size (in pixels). Valid only if type==LIBRAW_IMAGE_BITMAP.</dd>
+      <dt><strong> ushort colors, bits </strong></dt>
+      <dd>Number of colors components (1 or 3) and color depth in bits (8 or
+        16). These fields are valid only if type==LIBRAW_IMAGE_BITMAP.</dd>
+      <dt><strong> ushort gamma_corrected </strong></dt>
+      <dd>Is bitmap data gamma-corrected (always 1 for 8-bit data, may be 0 or 1
+        for 16-bit). Valid only if type==LIBRAW_IMAGE_BITMAP.</dd>
+      <dt><strong> unsigned int data_size </strong></dt>
+      <dd>Size of <strong> data </strong> field (in bytes). For bitmap image
+        equal to (height*width*colors * (bits/8)). For JPEG image - exact JPEG
+        size (i.e. extracted thnumbnail size + JPEG header + EXIF header).</dd>
+      <dt><strong> unsigned char data[] </strong></dt>
+      <dd>Data array itself. Should be interpreted as RGB triplets for bitmap
+        type and as JPEG file for JPEG type.</dd>
+    </dl>
+    <p><a name="datastream"></a></p>
+    <h2>Input abstraction layer</h2>
+    <p>RAW data input (read) in LibRaw implemented by calling methods of object
+      derived from <strong> LibRaw_abstract_datastream </strong> abstract
+      class. Full list of methods is described in
+      href="API-CXX.html#datastream"&gt;C++ API reference.</p>
+    <p>There is two ready to use implementations of datastream objects:</p>
+    <ul>
+      <li><a href="API-CXX.html#file_datastream"> LibRaw_file_datastream </a> -
+        file input (filename provided to LibRaw).</li>
+      <li><a href="API-CXX.html#buffer_datastream"> LibRaw_buffer_datastream </a>
+        - input from memory buffer.</li>
+    </ul>
+    <p>LibRaw user can create own datastream object derived from <a href="API-CXX.html#datastream">
+        LibRaw_abstract_datastream </a> . For example, such object may
+      implement reading RAW data directly from camera (by remote interface).
+      LibRaw can use these objects via <a href="API-CXX.html#open_datastream">
+        LibRaw::open_datastream() </a> interface.</p>
+    <p>Datastreams can be used either via <a href="API-CXX.html#open_datastream">
+        LibRaw::open_datastream() </a> call (in this case datastream object
+      should be created an maintained by user) or via <a href="API-CXX.html#open_file">
+        LibRaw::open_file() </a> and <a href="API-CXX.html#open_buffer">
+        LibRaw::open_buffer() </a> shortcuts.</p>
+    <p>Only <a href="API-CXX.html"> C++ API </a> users may use object-oriented
+      interface and implement own input interfaces. For <a href="API-C.html"> C
+        API </a> users only built-on <strong>
+        libraw_open_file()/libraw_open_buffer() </strong> shortcuts are
+      available.</p>
+    <p><a name="datastream_data"></a></p>
+    <h4>Data fields</h4>
+    <p>Definition:</p>
+    <pre>	class LibRaw_abstract_datastream {...protected: LibRaw_abstract_datastream *substream;}
+</pre>
+    <p><strong> Description: </strong> Ojects derived from
+      LibRaw_abstract_datastream always contains pointer to secondary data
+      stream (substream). This substream initialized internally when needed
+      (really used only for Sony RAW data) and used for temporary switch input
+      stream to temporary memory buffer allocated internally in LibRaw.</p>
+    <p>Substream usage details described more precisely in <a href="API-CXX.html#own_datastreams">
+        own datastream objects creation guide </a> .</p>
+    <p><a name="const"></a></p>
+    <h2>Constants</h2>
+    <p><a name="LibRaw_errors"></a></p>
+    <h3>enum LibRaw_errors: Error Codes</h3>
+    <p>All functions returning integer numbers must return either errno or one
+      of the following error codes (see also <a href="API-notes.html#errors">
+        error code conventions </a> ).</p>
+    <p><strong> Fatal errors </strong> (return of such an error code implies
+      that file processing has to be terminated, since the state of data
+      structures is unknown).</p>
+    <dl>
+      <dt><strong> LIBRAW_UNSUFFICIENT_MEMORY </strong></dt>
+      <dd>Attempt to get memory from the system has failed. <br>
+        All allocated resources will be freed, <a href="API-CXX.html#recycle">
+          recycle() </a> will be called, and the LibRaw object will be brought
+        to the state "right after creation."</dd>
+      <dt><strong> LIBRAW_DATA_ERROR </strong></dt>
+      <dd>A fatal error emerged during data unpacking. <br>
+        All allocated resources will be freed, <a href="API-CXX.html#recycle">
+          recycle() </a> will be called, and the LibRaw object will be brought
+        to the state "right after creation."</dd>
+      <dt><strong> LIBRAW_IO_ERROR </strong></dt>
+      <dd>A fatal error emerged during file reading (premature end-of-file
+        encountered or file is corrupt). <br>
+        All allocated resources will be freed, <a href="API-CXX.html#recycle">
+          recycle() </a> will be called, and the LibRaw object will be brought
+        to the state "right after creation."</dd>
+      <dt><strong> LIBRAW_CANCELLED_BY_CALLBACK </strong></dt>
+      <dd>Processing cancelled due to calling application demand (by returning
+        nonzero code from <a href="API-CXX.html#progress"> progress callback </a>
+        ). <br>
+        All allocated resources will be freed, <a href="API-CXX.html#recycle">
+          recycle() </a> will be called, and the LibRaw object will be brought
+        to the state "right after creation."</dd>
+      <dt><strong> LIBRAW_BAD_CROP </strong></dt>
+      <dd>The incorrect cropping coordinates are set via params.cropbox[]: the
+        left-top corner of cropping rectangle is outside the image. The
+        processing will be cancelled, all allocated resources will be freed, <a
+
+          <dt=""><strong> LIBRAW_TOO_BIG</strong> </a></dd>
+      <dd><a <dt="">Raw data size exceeds data limit.</a></dd>
+      <a <dt=""> </a>
+    </dl>
+    <a <dt="">
+      <p><strong> Non-Fatal Errors </strong></p>
+    </a>
+    <dl>
+      <a <dt=""> <dt><strong> LIBRAW_SUCCESS=0 </strong></dt>
+        <dd>No error; function terminated successfully.</dd>
+        <dt><strong> LIBRAW_UNSPECIFIED_ERROR </strong></dt>
+        <dd>An unknown error has been encountered. This code should never be
+          generated.</dd>
+        <dt><strong> LIBRAW_FILE_UNSUPPORTED </strong></dt>
+        <dd>Unsupported file format (attempt to open a RAW file with a format
+          unknown to the program).</dd>
+        <dt><strong> LIBRAW_REQUEST_FOR_NONEXISTENT_IMAGE </strong></dt>
+        <dd>Attempt to retrieve a RAW image with a number absent in the data
+          file (only for formats supporting storage of several images in a
+          file).</dd>
+        <dt><strong> LIBRAW_OUT_OF_ORDER_CALL </strong></dt>
+      </a><dd><a <dt="">API functions have been called in wrong order (e.g., </a><a
+
+          href="API-CXX.html#unpack"> unpack() </a> before <a href="API-CXX.html#open_file">
+          open_file() </a> ) or the previous stage has ended with an error
+        (e.g., <a href="API-CXX.html#unpack"> unpack() </a> is called after <a
+
+          href="API-CXX.html#open_file"> open_file() </a> has returned an
+        error).</dd>
+      <dt><strong> LIBRAW_NO_THUMBNAIL </strong></dt>
+      <dd>Returned upon an attempt to retrieve a thumbnail from a file
+        containing no preview.</dd>
+      <dt><strong> LIBRAW_UNSUPPORTED_THUMBNAIL </strong></dt>
+      <dd>RAW file contains a preview of unsupported format.</dd>
+    </dl>
+    <p><a name="decoder_flags"></a></p>
+    <h3>enum LibRaw_decoder_flags - RAW data format description</h3>
+    <p>Depending of capabilities of given data format, the buffer with RAW data
+      may have different layouts:</p>
+    <dl>
+      <dt><strong> LIBRAW_DECODER_HASCURVE </strong></dt>
+      <dd>This flag is set if decoder uses RAW tone curve and curve data may be
+        modified before call to decoder (i.e. curve values are not read or
+        calculated within decoder).</dd>
+      <dt><strong> LIBRAW_DECODER_SONYARW2 </strong></dt>
+      <dd>This flag is set if file format is Sony ARW2.3, so sony_arw2_options
+        is applicable.</dd>
+      <dt><strong> LIBRAW_DECODER_TRYRAWSPEED </strong></dt>
+      <dd>This flag is set if file format is (possibly) supported by RawSpeed
+        library, so unpack() will try to use it.</dd>
+      <dt><strong> LIBRAW_DECODER_FIXEDMAXC </strong></dt>
+      <dd>Do not use automated maximum calculation for this data format.</dd>
+      <dt><strong> LIBRAW_DECODER_OWNALLOC </strong></dt>
+      <dd>Decoder allocates data, no need to pass allocated memory to decoder.</dd>
+      <dt><strong>LIBRAW_DECODER_ADOBECOPYPIXEL</strong></dt>
+      <dd>Internal flag, special to adobe DNG decoder.</dd>
+      <dt><strong>LIBRAW_DECODER_LEGACY_WITH_MARGINS</strong></dt>
+      <dd>Special flag uset for 4-channel (legacy) decoders with black/masked
+        areas</dd>
+      <dt><strong>LIBRAW_DECODER_3CHANNEL</strong></dt>
+      <dd>3-component full-color data (not usual 4-component)</dd>
+    </dl>
+    <p><a name="progress"></a></p>
+    <h3>enum LibRaw_progress: Current State of LibRaw Object</h3>
+    <p>LibRaw::imgdata.progress_flags contains a bit mask describing all stages
+      of file processing that have already been performed.</p>
+    <p><strong> File opening and RAW data extraction phase. </strong></p>
+    <dl>
+      <dt><strong> LIBRAW_PROGRESS_START=0 </strong></dt>
+      <dd>Object just created, no processing carried out.</dd>
+      <dt><strong> LIBRAW_PROGRESS_OPEN </strong></dt>
+      <dd>File to be processed has been opened.</dd>
+      <dt><strong> LIBRAW_PROGRESS_IDENTIFY </strong></dt>
+      <dd>Data identification performed, format recognized, metadata extracted.</dd>
+      <dt><strong> LIBRAW_PROGRESS_SIZE_ADJUST </strong></dt>
+      <dd>Data sizes adjusted (for files that require such adjustment, namely,
+        certain files from Kodak cameras).</dd>
+      <dt><strong> LIBRAW_PROGRESS_LOAD_RAW </strong></dt>
+      <dd>RAW data loaded.</dd>
+    </dl>
+    <p><strong> The following flags are set during usage of image processing
+        that has been taken from dcraw. </strong></p>
+    <dl>
+      <dt><strong> LIBRAW_PROGRESS_RAW2_IMAGE </strong></dt>
+      <dd>imgdata.image array allocated and filled with data.</dd>
+      <dt><strong> LIBRAW_PROGRESS_REMOVE_ZEROES </strong></dt>
+      <dd>Zero values removed for cameras that require such removal (Panasonic
+        cameras).</dd>
+      <dt><strong> LIBRAW_PROGRESS_BAD_PIXELS </strong></dt>
+      <dd>Bad (dead) pixels removed.</dd>
+      <dt><strong> LIBRAW_PROGRESS_DARK_FRAME </strong></dt>
+      <dd>Dark frame subtracted from RAW data.</dd>
+      <dt><strong> LIBRAW_PROGRESS_FOVEON_INTERPOLATE </strong></dt>
+      <dd>Interpolation for cameras with a Foveon sensor performed.</dd>
+      <dt><strong> LIBRAW_PROGRESS_SCALE_COLORS </strong></dt>
+      <dd>White balance performed.</dd>
+      <dt><strong> LIBRAW_PROGRESS_PRE_INTERPOLATE </strong></dt>
+      <dd>Image size reduction (for the half_size mode) performed, as well as
+        copying of 2nd green channel to the 1st one in points where the second
+        channel is present and the first one is absent.</dd>
+      <dt><strong> LIBRAW_PROGRESS_INTERPOLATE </strong></dt>
+      <dd>Interpolation (debayer) performed.</dd>
+      <dt><strong> LIBRAW_PROGRESS_MIX_GREEN </strong></dt>
+      <dd>Averaging of green channels performed.</dd>
+      <dt><strong> LIBRAW_PROGRESS_MEDIAN_FILTER </strong></dt>
+      <dd>Median filtration performed.</dd>
+      <dt><strong> LIBRAW_PROGRESS_HIGHLIGHTS </strong></dt>
+      <dd>Work with highlights performed.</dd>
+      <dt><strong> LIBRAW_PROGRESS_FUJI_ROTATE </strong></dt>
+      <dd>For images from Fuji cameras, rotation performed (or
+        adjust_sizes_info_only() called).</dd>
+      <dt><strong> LIBRAW_PROGRESS_FLIP </strong></dt>
+      <dd>Dimensions recalculated for images shot with a rotated camera
+        (sizes.iwidth/sizes.iheight swapped).</dd>
+      <dt><strong> LIBRAW_PROGRESS_CONVERT_RGB </strong></dt>
+      <dd>Conversion into output RGB space performed.</dd>
+      <dt><strong> LIBRAW_PROGRESS_STRETCH </strong></dt>
+      <dd>Image dimensions changed for cameras with non-square pixels.</dd>
+      <dt><strong> LIBRAW_PROGRESS_STAGE17 - LIBRAW_PROGRESS_STAGE27 </strong></dt>
+      <dd>Reserved for possible appearance of other processing stages.</dd>
+    </dl>
+    <p><strong> The following flags are set during loading of thumbnails. </strong></p>
+    <p><strong> LIBRAW_PROGRESS_THUMB_LOAD </strong> Thumbnail data have been
+      loaded (for Kodak cameras, the necessary conversions have also been made).
+      <strong> LIBRAW_PROGRESS_TRESERVED1 - LIBRAW_PROGRESS_TRESERVED3 </strong>
+      Reserved for possible future processing stages.</p>
+    <p><a name="LibRaw_whitebalance_code"></a></p>
+    <h3>enum LibRaw_whitebalance_code - names for standard light sources</h3>
+    <p>LIBRAW_WBI_lightsource_name, where name and value are standard EXIF light
+      sources. <a name="LibRaw_runtime_capabilities"></a></p>
+    <h3>enum LibRaw_camera_mounts - codes for camera mounts</h3>
+    <p>Constant name (e.g. LIBRAW_MOUNT_Leica_SL) speaks for itself</p>
+    <h3>enum LibRaw_runtime_capabilities - libraw capabilities set at build</h3>
+    <ul>
+      <li><strong>LIBRAW_CAPS_RAWSPEED</strong> - compiled with RawSpeed</li>
+      <li><strong>LIBRAW_CAPS_DNGSDK </strong>- compiled with Adobe DNG SDK</li>
+      <li><strong>LIBRAW_CAPS_GPRSDK</strong> - compiled w/ GoPro GPR SDK</li>
+      <li><strong>LIBRAW_CAPS_UNICODEPATHS</strong> - compiled with Windows
+        unicode (wchar_t*) filenames support</li>
+    </ul>
+    <p><a name="LibRaw_thumbnail_formats"></a></p>
+    <h3>enum LibRaw_thumbnail_formats: Thumbnail Data Formats</h3>
+    <p>Thumbnail data format is written in the imgdata.thumbnail.tformat data
+      field. <br>
+      Presently LibRaw knows about four thumbnail formats, among which two are
+      unpacked:</p>
+    <dl>
+      <dt><strong> LIBRAW_THUMBNAIL_UNKNOWN </strong></dt>
+      <dd>Format unknown or thumbnail not yet read.</dd>
+      <dt><strong> LIBRAW_THUMBNAIL_JPEG </strong></dt>
+      <dd>The thumbnail buffer contains a JPEG file (read from the RAW file "as
+        is," without any manipulations performed on it).</dd>
+      <dt><strong> LIBRAW_THUMBNAIL_BITMAP </strong></dt>
+      <dd>The thumbnail buffer contains the gamma-adjusted RGB bitmap (for Kodak
+        cameras, the gamma correction is performed with allowance for maximum
+        values and the white balance is set in accordance with the camera
+        settings). <br>
+        In this format, each pixel of the image is represented by a 8-bit RGB
+        triplet.</dd>
+      <dt><strong>LIBRAW_THUMBNAIL_BITMAP16</strong></dt>
+      <dd>The thumbnail buffer contains the gamma-adjusted 16-bit RGB bitmap. To
+        get this format instead of <strong> LIBRAW_THUMBNAIL_BITMAP </strong>you
+        need to set <strong>LIBRAW_PROCESSING_USE_PPM16_THUMBS</strong> in
+        processing options.</dd>
+      <dt><strong> LIBRAW_THUMBNAIL_LAYER </strong></dt>
+      <dd>Data format is presently recognized upon opening of RAW file but not
+        supported: not unpacked into LibRaw::unpack_thumb.</dd>
+      <dt><strong> LIBRAW_THUMBNAIL_ROLLEI </strong></dt>
+      <dd>Data format is presently recognized upon opening of RAW file but not
+        supported: not unpacked into LibRaw::unpack_thumb.</dd>
+      <dt><strong>LIBRAW_THUMBNAIL_H265</strong></dt>
+      <dd>The thumbnail buffer contains a H.265 data frame (read from RAW file
+        as is, no manipulations performed on it).</dd>
+    </dl>
+    <p><a name="warnings"></a></p>
+    <h3>Nonstandard Situations (Warnings) during RAW Data Processing</h3>
+    <p>Some suspicious situations emerging during image processing are not fatal
+      but may affect the result of data retrieval or postprocessing. Such states
+      are indicated by setting a bit in the imgdata.process_warnings field.</p>
+    <dl>
+      <dt><strong> LIBRAW_WARN_BAD_CAMERA_WB </strong></dt>
+      <dd>Postprocessing must use white balance of the camera but this balance
+        is not suitable for use.</dd>
+      <dt><strong> LIBRAW_WARN_NO_METADATA </strong></dt>
+      <dd>Only for cameras where the metadata are taken from an external JPEG
+        file: metadata extraction has failed.</dd>
+      <dt><strong> LIBRAW_WARN_NO_JPEGLIB </strong></dt>
+      <dd>Only for P&amp;S Kodak cameras: data in JPEG format. At the same time,
+        open_file() will return LIBRAW_FILE_UNSUPPORTED.</dd>
+      <dt><strong> LIBRAW_WARN_NO_EMBEDDED_PROFILE </strong></dt>
+      <dd>(only if LCMS support compiled in). Caller set embedded input profile
+        use, but no such profile exists in RAW.</dd>
+      <dt><strong> LIBRAW_WARN_NO_INPUT_PROFILE </strong></dt>
+      <dd>(only if LCMS support compiled in). Error when opening input profile
+        ICC file.</dd>
+      <dt><strong> LIBRAW_WARN_BAD_OUTPUT_PROFILE </strong></dt>
+      <dd>(only if LCMS support compiled in). Error when opening output profile
+        ICC file.</dd>
+      <dt><strong> LIBRAW_WARN_NO_BADPIXELMAP </strong></dt>
+      <dd>Error when opening bad pixels map file.</dd>
+      <dt><strong> LIBRAW_WARN_BAD_DARKFRAME_FILE </strong></dt>
+      <dd>Error when opening dark frame file.</dd>
+      <dt><strong> LIBRAW_WARN_BAD_DARKFRAME_DIM </strong></dt>
+      <dd>Dark frame file either differs in dimensions from RAW-file processed,
+        or have wrong format. Dark frame should be in 16-bit PGM format (one can
+        generate it using simple_dcraw -4 -D).</dd>
+      <dt><strong> LIBRAW_WARN_RAWSPEED_PROBLEM </strong></dt>
+      <dd>Problems detected in RawSpeed decompressor. The image data processed
+        by LibRaw own decoder.</dd>
+      <dt><strong> LIBRAW_WARN_RAWSPEED_UNSUPPORTED </strong></dt>
+      <dd>This file not supported by RawSpeed (although compatible decoder
+        exists).</dd>
+      <dt><strong> LIBRAW_WARN_RAWSPEED_PROCESSED </strong></dt>
+      <dd>Not warning, but information. The file was decoded by RawSpeed.</dd>
+      <dt><strong> LIBRAW_WARN_FALLBACK_TO_AHD </strong></dt>
+      <dd>Incorrect/unsupported user_qual was set, AHD demosaic used instead.</dd>
+      <dt><strong> LIBRAW_WARN_PARSEFUJI_PROCESSED</strong></dt>
+      <dd>Not really a warning, but flag that fuji parser was used.</dd>
+      <dt><strong>LIBRAW_DNGSDK_PROCESSED</strong></dt>
+      <dd>Not really a warning: image was decoded by DNG SDK</dd>
+      <dt><strong> LIBRAW_DNG_IMAGES_REORDERED</strong></dt>
+      <dd>DNG sub0images was reordered </dd>
+      <dt><strong>LIBRAW_DNG_STAGE2_APPLIED</strong></dt>
+      <dd>DNG Stage2 conversion was performed</dd>
+      <dt><strong> LIBRAW_DNG_STAGE3_APPLIED</strong></dt>
+      <dd>DNG Stage3 conversion was performed</dd>
+    </dl>
+    <dl>
+    </dl>
+    <p><a name="LibRaw_image_formats"></a></p>
+    <h3>enum LibRaw_image_formats - possible types of data, contains in
+      libraw_processed_image_t structure</h3>
+    <p><strong> type </strong> field of libraw_processed_image_t structure may
+      have one of these values:</p>
+    <dl>
+      <dt><strong> LIBRAW_IMAGE_BITMAP </strong></dt>
+      <dd>The structure contains RGB-bitmap, metadata described in other fields
+        of libraw_processed_image_t.</dd>
+      <dt><strong> LIBRAW_IMAGE_JPEG </strong></dt>
+      <dd>libraw_processed_image_t structure contains JPEG image (in memory).
+        Only data_size field is meaningful.</dd>
+    </dl>
+    <p> <a name="LibRaw_processing_options"></a></p>
+    <h3> enum enum LibRaw_processing_options - bit that affects RAW data
+      extraction</h3>
+    These flags could be OR'ed with imgdata.params.raw_processing_options:
+    <p>Pentax 4-shot options:</p>
+    <ul>
+      <li><b>LIBRAW_RAWOPTIONS_PENTAX_PS_ALLFRAMES</b> - merge all frames for
+        Pentax 4-shot files</li>
+    </ul>
+    <p>Floating point DNG files:</p>
+    <ul>
+      <li><b>LIBRAW_RAWOPTIONS_CONVERTFLOAT_TO_INT</b> - convert FP data to
+        16-bit integer</li>
+    </ul>
+    <p>Sony ARQ Files:</p>
+    <ul>
+      <li><b>LIBRAW_RAWOPTIONS_ARQ_SKIP_CHANNEL_SWAP</b> - do not perform Sony
+        ARQ channel swap to RGBG channel format, but use RGGB original channel
+        order</li>
+    </ul>
+    <p>DNG processing flags:</p>
+    <ul>
+      <li><b>LIBRAW_RAWOPTIONS_DONT_CHECK_DNG_ILLUMINANT</b> - skip DNG
+        illuminant check when parsing DNG color data (use for compatibility w/
+        older LibRaw versions).</li>
+      <li><b>LIBRAW_RAWOPTIONS_DNGSDK_ZEROCOPY</b> - do not copy data extracted
+        by Adobe DNG SDK into separate buffer, but use DNG SDK buffer as is.</li>
+      <li><b>LIBRAW_RAWOPTIONS_DNG_ADD_ENHANCED</b> - if set, LibRaw will add
+        Enhanced DNG frame (NewSubfileType == 16) to the list of available
+        frames.</li>
+      <li><b>LIBRAW_RAWOPTIONS_DNG_ADD_PREVIEWS</b> - if set, LibRaw will add
+        previews (NewSubfileType == 1) to the frames list.</li>
+      <li><b>LIBRAW_RAWOPTIONS_DNG_PREFER_LARGEST_IMAGE</b>- By default, DNG
+        frames are not reordered and are available in same order as in DNG&nbsp;
+        (LibRaw traverses IFD/Sub-IFD trees in deep-first order).This bit will
+        prioritize the largest image</li>
+      <li><strong>LIBRAW_RAWOPTIONS_DNG_STAGE2</strong> - request DNG Stage2
+        processing (by DNG SDK)</li>
+      <li><strong>LIBRAW_RAWOPTIONS_DNG_STAGE3</strong> - request DNG Stage3
+        processing</li>
+      <li><strong>LIBRAW_RAWOPTIONS_DNG_ALLOWSIZECHANGE</strong> - by default,
+        if image size parsed by DNG SDK does not match image dimensions parsed
+        by LibRaw, processing will stop with LIBRAW_DATA_ERROR code. This flags
+        allows size change in LibRaw::unpack() stage.</li>
+      <li><strong>LIBRAW_RAWOPTIONS_DNG_DISABLEWBADJUST</strong> - by default,
+        for DNG images with different per-channel maximums WB adjustment
+        procedure is performed. This flag disables such adjustment.</li>
+    </ul>
+    Other flags
+    <ul>
+      <li><b>LIBRAW_RAWOPTIONS_NO_ROTATE_FOR_KODAK_THUMBNAILS</b> - disable
+        auto-rotation for Kodak PPM bitmaps</li>
+      <li><b>LIBRAW_RAWOPTIONS_USE_PPM16_THUMBS</b> - enable 16-bit PPM
+        thumbnails</li>
+      <li><b>LIBRAW_RAWOPTIONS_ZEROFILTERS_FOR_MONOCHROMETIFFS</b> - by default,
+        LibRaw assigns bayer pattern for Monochrome TIFF files (e.g. images from
+        Kodak 760).This does not work as expected if input file is really
+        monochrome (e.g. scan from Imacon X1 in monochrome mode).This flag will
+        force monochrome mode for TIFF RAWs w/o bayer filter tags (so, it will
+        break old Kodak processing). It is better to make it settable via user
+        interaction.</li>
+      <li><strong>LIBRAW_RAWOPTIONS_PROVIDE_NONSTANDARD_WB</strong> - If set and
+        when applicable, color.cam_mul[] and color.WB_Coeffs/WBCT_Coeffs will
+        contain WB settings for a non-standard workflow. Right now only Sony
+        DSC-F828 is affected: camera-recorded white balance can't be directly
+        applied to raw data because WB is for RGB, while raw data is RGBE.</li>
+      <li><strong>LIBRAW_RAWOPTIONS_CAMERAWB_FALLBACK_TO_DAYLIGHT</strong> - if
+        use_camera_wb is set, but no camera-recorded white balance present in
+        metadata, then fallback to daylight WB (default: fallback to
+        auto-balance).</li>
+      <li><strong>LIBRAW_RAWOPTIONS_CHECK_THUMBNAILS_KNOWN_VENDORS</strong> -
+        Some cameras (e.g.Ricoh) may record broken thumbnail in file:data offset
+        plus data size is beyond filecontents. This flag enforces size+offset
+        checks for files from known vendors (this will result into correct but
+        smaller thumbnail selected).</li>
+      <li><strong>LIBRAW_RAWOPTIONS_CHECK_THUMBNAILS_ALL_VENDORS</strong> - same
+        is above, but check is performed regardless of vendor (Make tag).</li>
+    </ul>
+    <ul>
+    </ul>
+    <p> <a name="LibRaw_rawspecial_t"></a></p>
+    <h3>enum LibRaw_rawspecial_t - special/non standard RAW extraction modes</h3>
+    These flags are applied to imgdata.rawparams:
+    <p>Sony ARW2.3 processing options: (for more details see
+      http://www.rawdigger.com/howtouse/sony-craw-arw2-posterization-detection)</p>
+    <ul>
+      <li><b>LIBRAW_RAWSPECIAL_SONYARW2_BASEONLY</b> - decode only base pixels,
+        leave delta pixels as zero;</li>
+      <li><b>LIBRAW_RAWSPECIAL_SONYARW2_DELTAONLY</b> - decode only delta pixels
+        with base pixels zeroed;</li>
+      <li><b>LIBRAW_RAWSPECIAL_SONYARW2_DELTAZEROBASE</b> - decode delta pixels,
+        do not add base value;</li>
+      <li><b>LIBRAW_RAWSPECIAL_SONYARW2_DELTATOVALUE</b> - show possible
+        posterization areas;</li>
+    </ul>
+    <p>Sigma Quattro decoding flags:</p>
+    <ul>
+      <li><b>LIBRAW_RAWSPECIAL_NODP2Q_INTERPOLATERG</b> - disable R/G channels
+        interpolation</li>
+      <li><b>LIBRAW_RAWSPECIAL_NODP2Q_INTERPOLATEAF</b> - disable data
+        interpolation of low-sensitivity (AF or overexposure control) points on
+        Quattro sensors.</li>
+    </ul>
+    <p>Canon/Nikon small RAW (YCC) decoding flags (do not use both at same
+      time):</p>
+    <ul>
+      <li><b>LIBRAW_RAWSPECIAL_SRAW_NO_RGB</b> - disable YCC to RGB conversion</li>
+      <li><b>LIBRAW_RAWSPECIAL_SRAW_NO_INTERPOLATE</b> - disable missing color
+        values interpolation</li>
+    </ul>
+    <a href="index.html">[back to Index] </a>
+  </body>
+</html>

+ 305 - 0
raw.mod/libraw/doc/API-notes.html

@@ -0,0 +1,305 @@
+<html>
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=windows-1252">
+  </head>
+  <body>
+    <p>LibRaw: General Notes on API<a href="index.html">[back to Index]</a></p>
+    <h1>LibRaw: General Notes on API</h1>
+    <h2>Contents</h2>
+    <ol>
+      <li><a href="#versions">LibRaw editions</a></li>
+      <li><a href="#errors">Error Code Conventions and Error Handling</a></li>
+      <li><a href="#warnings">Nonstandard Situations That Are Not Errors</a></li>
+      <li><a href="#io">Input Layer Abstraction</a></li>
+      <li><a href="threads">Thread Safety</a></li>
+      <li><a href="#CXX">The Use of C++</a></li>
+      <li><a href="#imgdata_params">Parameters of the LibRaw::imgdata.params
+          Structure Affecting the Behavior of open_file/unpack/unpack_thumb</a></li>
+      <li><a href="#memory">Memory Usage</a>
+        <ol>
+          <li><a href="#stack">Stack Usage</a></li>
+          <li><a href="#memmgr">Dynamic Memory Management</a></li>
+          <li><a href="#memuse">Dynamic Memory Usage</a>
+            <ol>
+              <li><a href="#memraw">Memory Buffer for the RAW Image</a></li>
+              <li><a href="#memimage">Memory for the Postprocessed Image</a></li>
+              <li><a href="#memthumb">Memory for the Decoded Thumbnail</a></li>
+              <li><a href="#memraw">Memory for RAW Unpacking</a></li>
+              <li><a href="#mempostproces">Memory for Postprocessing</a></li>
+              <li><a href="#memwrite">Memory for File Writing</a></li>
+              <li><a href="#memunpack">Unpacking into memory buffer</a></li>
+            </ol>
+          </li>
+        </ol>
+      </li>
+      <li><a href="#incompat">Incompatibilities with dcraw</a>
+        <ol>
+          <li><a href="#incompat_max">Automatic maximum search/brightness
+              adjustment</a></li>
+          <li><a href="#incompat_kodak">Processing of Thumbnails from Kodak
+              cameras</a></li>
+        </ol>
+      </li>
+    </ol>
+    <p><a name="versions"></a></p>
+    <h2>LibRaw Versions</h2>
+    <p>Since version 0.9, there is only one LibRaw variants. Older versions have
+      three separate editions (normal, -Lite and -Commercial versions).</p>
+    <p><a name="errors"></a></p>
+    <h2>Error Code Conventions and Error Handling</h2>
+    <p>The following conventions concern the returned errors:</p>
+    <ol>
+      <li>All functions that can return an error code have integer type of
+        return data.</li>
+      <li>If there is no error, the return value is 0 (LIBRAW_SUCCESS).</li>
+      <li>If an error has happened in a system call, the return value is errno
+        (a positive number), which can be analyzed using strerror() or similar
+        means.</li>
+      <li>All LibRaw's own error codes are negative; each of these errors
+        belongs to one of two types:
+        <dl>
+          <dt><strong>Non-fatal errors</strong></dt>
+          <dd>Non-fatal errors do not forbid execution of other functions in the
+            processing succession (e.g., <a href="API-CXX.html#unpack_thumb">unpack_thumb()</a>
+            can easily return the code corresponding to "preview is absent" but
+            this does not prevent further call of <a href="API-CXX.html#unpack">unpack()</a>.</dd>
+          <dt><strong>Fatal errors</strong></dt>
+          <dd>In the case of fatal errors (memory shortage, input data error,
+            data unpacking failure), the current stage of processing is
+            terminated and all allocated resouces are freed.<br>
+            If an attempt to continue processing is made, all subsequent API
+            calls will return the LIBRAW_OUT_OF_ORDER_CALL error.<br>
+            At the same time, the LibRaw instance in which a fatal error has
+            occurred can process the next RAW files in the usual way (by calling
+            <a href="API-CXX.html#open_file">open_file()</a> (or other input
+            methods), then <a href="API-CXX.html#unpack">unpack()</a>, etc.).</dd>
+        </dl>
+      </li>
+      <li>The macro LIBRAW_FATAL_ERROR(error code) checks if an error is fatal
+        or not.</li>
+      <li>The error codes are <a href="API-datastruct.html#errors">listed and
+          deciphered here</a>.</li>
+    </ol>
+    <p><a name="warnings"></a></p>
+    <h2>Nonstandard Situations That Are Not Errors</h2>
+    <p>If the program has encountered a nonstandard situation that does not
+      prevent retrieval of some data from a file, it sends a signal by setting
+      the corresponding bit in <a href="API-datastruct.html#libraw_data_t">imgdata.process_warnings</a>.
+      The possible types of warnings are <a href="API-datastruct.html#warnings">listed
+        and deciphered here</a>.</p>
+    <p><a name="io"></a></p>
+    <h2>Input Layer Abstraction</h2>
+    <p>LibRaw uses objects derived from <a href="API-CXX.html#datastream">LibRaw_abstract_datastream</a>
+      for data input. Semantics of these objects is similar to 'file with
+      arbitrary seek' object: both read and seek operations are used.</p>
+    <p>Some RAW formats requires temporary switch to another data stream created
+      on top on memory buffer for metadata read. Methods for doing so are
+      implemented in base class <a href="API-CXX.html#datastream">LibRaw_abstract_datastream</a>
+      by internal data field <strong>substream</strong>. Look into source code
+      of <a href="API-CXX.html#file_datastream">LibRaw_file_datastream</a>
+      class in <strong>libraw/libraw_datastream.h</strong> file for more
+      details. <br>
+      When implementing own datastream classes, you need to take <strong>substream</strong>
+      into account and pass control to methods of this field if it is active
+      (not NULL).</p>
+    <p>If datastream implementaton knows name of input file, it should provide
+      fname() call. This name will be used in <a href="API-CXX.html#callbacks">error
+        callbacks</a> and in guessing name of JPEG file with metadata (for RAW
+      files with external metadata).</p>
+    <p>For external metadata support input class should implement <strong>subfile_open()/subfile_close()</strong>
+      methods. âîçâðàøàþò êîä îøèáêè. <br>
+      Sample of these methods implementation may be found in <a href="API-CXX.html#file_datastream">LibRaw_file_datastream</a>
+      class (look into <strong>libraw/libraw_datastream.h</strong> file for
+      details).</p>
+    <p><a name="threads"></a></p>
+    <h2>Thread safety</h2>
+    <p>Thread safety is ensured if a LibRaw object is created and used within
+      one thread. At the same time, the number of threads (each with its own
+      LibRaw object) is not limited in any way (except by memory requirements).</p>
+    <p>If a LibRaw object is created in one execution thread and used in
+      another, external synchronization is necessary.</p>
+    <p>There is two libraries under Unix enviroment (Linux/FreeBSD/MacOS):
+      libraw_r.a (thread-safe) and libraw.a (single-threaded, slightly faster).</p>
+    <p>Thread-safe library version stores intermediate unpacker data into LibRaw
+      class data. So, several copies of LibRaw, working in parallel, is
+      possible.</p>
+    <p>Not thread-safe library uses global variable for intermediate data store
+      which is faster but not reenterant. This non-thread-safe library still may
+      be used in multi-threaded apps, but only if exactly one LibRaw class copy
+      exists in program.</p>
+    <p>Windows version is similar to multi-threaded Unix one.</p>
+    <p><a name="CXX"></a></p>
+    <h2>The Use of C++</h2>
+    <p>Exception situations within LibRaw are handled using the C++ exception
+      mechanism. All exceptions are caught inside the library functions and
+      should not penetrate outside.</p>
+    <p>Memory is allocated/freed using functions malloc(calloc)/free rather than
+      new/delete.</p>
+    <p>If C API is used, references to C++ calls new/delete still remain, and so
+      linking with libstdc++(Unix)/....(Windows) is necessary.</p>
+    <p><a name="imgdata_params"></a></p>
+    <h2>Parameters of the LibRaw::imgdata.params Structure Affecting the
+      Behavior of open_file/unpack/unpack_thumb</h2>
+    <p>Most data fields of structure LibRaw::imgdata.params affect only <a href="API-CXX.html#dcrawemu">data
+        postprocessing</a>, but there are some exceptions, which have been
+      inherited by the current version of LibRaw from/ dcraw source texts (these
+      dependences will be gradually removed).</p>
+    <dl>
+      <dt><strong>imgdata.params.use_camera_matrix and
+          imgdata.params.use_camera_wb</strong></dt>
+      <dd>These fields affect loading of RAW data for cameras with a color
+        matrix.<br>
+        <strong>Attention!</strong> If parameter <strong>imgdata.params.use_camera_matrix</strong>
+        is not set by the user, it is copied from <strong>imgdata.params.use_camera_wb</strong>
+        at the stage of file opening.</dd>
+      <dt><strong>imgdata.params.user_flip</strong></dt>
+      <dd>If this parameter is greater than or equal to zero, assignment <code>imgdata.sizes.flip
+          = imgdata.params.user_flip</code> is performed at the <a href="API-CXX.html#open_file">open_file()</a>
+        stage.</dd>
+      <dt><strong>imgdata.params.shot_select</strong></dt>
+      <dd>This parameter makes it possible to select the number of the extracted
+        image for data formats in which storage of several RAW images in one
+        data file is possible.</dd>
+      <dt><strong>imgdata.params.half_size</strong></dt>
+      <dd>Affects RAW data loading for Phase One and Sinar backs. Also, it this
+        parameter is set then image bitmap will be reduced by half in each
+        dimension. In later case, all 4 components of bitmap will be filled
+        during data extraction phase.</dd>
+      <dt><strong>imgdata.params.threshold, imgdata.params.aber</strong></dt>
+      <dd>If these parameters used, then half-sized bitmap will be used for data
+        unpacking. See above for details.</dd>
+      <dt><strong>imgdata.params.use_camera_wb</strong></dt>
+      <dd>Affects loading of white balance matrix for Leaf backs.</dd>
+    </dl>
+    <p><a name="memory"></a></p>
+    <h2>Memory Usage</h2>
+    <p><a name="stack"></a></p>
+    <h3>Stack Usage</h3>
+    <p>An instance of the LibRaw class has its own size about <strong>800 Kb</strong>;
+      if constructions like <code>LibRaw imageProcessor;</code> are used, this
+      memory is stack-allocated.</p>
+    <p>Methods of class LibRaw (and C API calls) may allocate up to 130-140 Kb
+      of data on the stack (to place auto variables) during their work.</p>
+    <p>Thus, the work of one LibRaw instance may require about <strong>1MB</strong>
+      of stack memory. This is not a problem for most contemporary
+      architectures. However, when working in a multithreaded environment, one
+      should not forget to allocate a sufficient amount of memory for the thread
+      stack.</p>
+    <p>In the case of dynamic allocation (<code>LibRaw *iProcessor = new LibRaw;</code>),
+      the requirements to stack memory will decrease by ~800 Kb, which is the
+      size of a class instance). If <a href="API-C.html">C API</a> is used, the
+      LibRaw instance is allocated dynamically.</p>
+    <p><a name="memmgr"></a></p>
+    <h3>Dynamic Memory Management</h3>
+    <p>LibRaw keeps record of all allocated dynamic memory blocks; in the case
+      of an exceptional situation (fatal error), they are all freed. The code
+      for keeping this record is fairly primitive and not designed to consider
+      allocation of many blocks (in the normal situation, allocation takes place
+      from 2 to 6 times during file processing); this fact should be taken into
+      account by developers trying to add new methods to LibRaw.</p>
+    <p><a name="memuse"></a></p>
+    <h3>Dynamic Memory Usage</h3>
+    <p>LibRaw uses dynamic memory</p>
+    <ul>
+      <li>for the decoded image;</li>
+      <li>for the decoded thumbnail;</li>
+      <li>for the postprocessed image;</li>
+      <li>for the ICC profile retrieved from the RAW file (if available);</li>
+      <li>for temporary data at the stage of RAW file unpacking;</li>
+      <li>for temporary data at the stage of postprocessing and result output;</li>
+      <li>for reading of the RAW source file (only under Win32).</li>
+    </ul>
+    <p><a name="memraw"></a></p>
+    <h4>Memory buffer for the RAW image</h4>
+    <p>Decoded RAW data are stored:</p>
+    <ul>
+      <li>one 16-bit value per pixel for "bayer" images. The masked pixels
+        (black or dark or masked frame) are stored with image data.</li>
+      <li>Free or four 16-bit values for full-color images (Foveon, Linear DNG,
+        Canon sRAW etc.).</li>
+      <li>one,three, or four 32-bit floating point values per pixel for
+        floating-point data.</li>
+    </ul>
+    <p>The buffer for RAW data is allocated by <a href="API-CXX.html#unpack">unpack()</a>
+      call and freeed upon calling <a href="API-CXX.html#recycle">recycle()</a>.</p>
+    <p><a name="memimage"></a></p>
+    <h4>Memory for the Postprocessed Image</h4>
+    <p>On postprocessing stage each pixel contains four 16-bit values, one for
+      each possible color channel (some sensors are actually 4-color).</p>
+    <p>The buffer for the decoded image is allocated upon calling <a href="API-CXX.html#raw2image">raw2image()</a>
+      or <a href="API-CXX.html#dcraw_process">dcraw_process()</a></p>
+    <p>The buffer freed upon calling <a href="API-CXX.html#recycle">recycle()</a>
+      or <a href="API-CXX.html#free_image">free_image()</a> calls.</p>
+    <p><a name="memthumb"></a></p>
+    <h4>Memory for the Decoded Thumbnail</h4>
+    <p>Memory for the thumbmail is allocated upon calling <a href="API-CXX.html#unpack_thumb">unpack_thumb()</a>
+      and freed upon calling <a href="API-CXX.html#recycle">recycle()</a>. The
+      size of the allocated buffer is precisely adjusted to the thumbnail size,
+      i.e., up to several Mb.</p>
+    <p><a name="memprofile"></a></p>
+    <p><a name="memraw"></a></p>
+    <h4>Memory for RAW Unpacking</h4>
+    <p>Memory for temporary buffer needed during RAW data unpacking may be
+      allocated during the work of <a href="API-CXX.html#unpack">unpack()</a>
+      and freed before completion of this function. The sizes of the allocated
+      buffers are small, up to tens of Kb.</p>
+    <p><a name="mempostproces"></a></p>
+    <h4>Memory for Postprocessing</h4>
+    <p>During image postprocessing (inherited from dcraw), memory for the
+      histogram (128 Kb) is allocated. This memory is allocated upon calling <a

+        href="API-CXX.html#dcraw_process">dcraw_process()</a> and freed upon
+      calling <a href="API-CXX.html#recycle">recycle()</a>.</p>
+    <p>In addition, during the work of <a href="API-CXX.html#dcraw_process">dcraw_process()</a>
+      and during the usage of some available possibilities, like</p>
+    <ul>
+      <li>rotation of images from FUJI cameras;</li>
+      <li>correction of chromatic aberrations;</li>
+      <li>image size changes (including correction of non-square pixels);</li>
+      <li>highlight recovery;</li>
+    </ul>
+    <p>a temporary buffer with the size equal to the size of the resultant image
+      (6-8 bytes per pixel for various processing stages) will be allocated. As
+      soon as the intermediate substage of processing is completed, the buffer
+      with the previous copy of the image will be freed.<br>
+      If postprocessing is not used, then temporary buffers are not allocated.</p>
+    <p><a name="memwrite"></a></p>
+    <h4>Memory for File Writing</h4>
+    <p>Upon calling <a href="API-CXX.html#dcraw_ppm_tiff_writer">dcraw_ppm_tiff_writer()</a>,
+      memory for a single row of the output image is allocated. The allocated
+      memory is freed before the end of this call.</p>
+    <p><a name="memunpack"></a></p>
+    <h4>Unpacking into memory buffer</h4>
+    <p>Functons <a href="API-CXX.html#dcraw_make_mem_image">dcraw_make_mem_image()</a>
+      <a href="API-CXX.html#dcraw_make_mem_thumb">dcraw_make_mem_thumb()</a>
+      (and complementary calls in C-API) allocates memory for entire output
+      datasets (full RGB bitmap and thumbnail, respectively).To free allocated
+      memory use <a href="API-CXX.html#dcraw_clear_mem">dcraw_clear_mem()</a>
+      function.</p>
+    <p><a name="incompat"></a></p>
+    <h2>Incompatibilities with dcraw</h2>
+    <p><a name="incompat_max"></a></p>
+    <h3>Automatic maximum search/brightness adjustment</h3>
+    <p>Many camera formats really use less data range, than possible by format
+      nature (bit count). If data maximum estimated incorrectly (too low) this
+      may resuls in colored highlights ('pink clouds') because of data cut at
+      wrong level.</p>
+    <p>To prevent this, LibRaw uses real data maximum from current file if this
+      maximum is larger than format maximum multiplied by
+      imdata.params.adjust_maximum_thr value (default is 0.75).</p>
+    <p>To turn off this feature (and repeat dcraw.c pink clouds) set
+      imdata.params.adjust_maximum_thr to 0.0</p>
+    <p><a name="incompat_kodak"></a></p>
+    <h3>Processing of Thumbnails from Kodak cameras</h3>
+    <p>In some Kodak cameras, the preview (thumbnail) is stored in the form of
+      uncorrected image. During its extraction using <strong>dcraw -e</strong>,
+      the white balance, color conversion, and other settings are the same as
+      those used for extraction of the main RAW data (including defect removal
+      and dark frame subtraction, which is erroneous, since the image size is
+      different). <br>
+      In LibRaw::unpack_thumb() calls, the white balance taken from the camera
+      ("as shot") is used and no settings from imgdata.params are considered.</p>
+    <p>For all other cameras, thumbnails are extracted "as is," without any
+      color conversions, both in dcraw and in LibRaw.</p>
+    <p><a href="index.html">[back to Index]</a></p>
+  </body>
+</html>

+ 66 - 0
raw.mod/libraw/doc/API-overview.html

@@ -0,0 +1,66 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <title>Overview of LibRaw API (C++)</title>
+  </head>
+
+  <body>
+    <a href=index.html>[back to Index]</a>
+    <h1>Overview of LibRaw API (C++)</h1>
+    <h2>General Remarks</h2>
+    <ol>
+      <li>The entire processing is carried out by an instance of the LibRaw class, which is an image processor.</li>
+      <li>One image processor can simultaneously process only one data source file, but consecutive processing of any number of files
+is possible.</li>
+      <li>There may be several simultaneously working image processors in a software program (e.g., in different threads), although one
+should remember that each image processor may require much memory.</li>
+      <li>Reading of source data from the RAW file requires virtually no customization (see <a
+          href="API-notes.html">API Notes</a> for exceptions to this rule).</li>
+      <li>All data extracted from the RAW file are accessible through data fields of the image processor (LibRaw class instance).</li>
+      <li>Although LibRaw <b>is not intended for RAW data postprocessing</b>, the library includes calls that enable complete
+emulation of the <b>dcraw</b> utility.
+      <li>All customization for the processing is performed via data fields of the LibRaw class.</li>
+    </ol>
+        
+    <h2>Brief Demonstration</h2>
+    <p> 
+      The example below contains no error processing for the sake of brevity.
+    </p>
+    <pre>
+#include "libraw/libraw.h"
+int process_image(char *file)
+{
+        // Let us create an image processor
+        LibRaw iProcessor;
+
+        // Open the file and read the metadata
+        iProcessor.open_file(file);
+
+        // The metadata are accessible through <a href="API-datastruct.html">data fields of the class</a>
+        printf("Image size: %d x %d\n",iProcessor.imgdata.sizes.width,iProcessor.imgdata.sizes.height);
+
+        // Let us unpack the image
+        iProcessor.unpack();
+
+        // Convert from imgdata.rawdata to imgdata.image:
+        iProcessor.raw2image();
+
+        // And let us print its dump; the data are accessible through <a href="API-datastruct.html">data fields of the class</a>
+        for(i = 0;i lt; iProcessor.imgdata.sizes.iwidth *  iProcessor.imgdata.sizes.iheight; i++)
+           printf("i=%d R=%d G=%d B=%d G2=%d\n",
+                        i,
+                        iProcessor.imgdata.image[i][0],
+                        iProcessor.imgdata.image[i][1],
+                        iProcessor.imgdata.image[i][2],
+                        iProcessor.imgdata.image[i][3]
+                );
+
+        // Finally, let us free the image processor for work with the next image
+        iProcessor.recycle();
+}
+</pre>
+
+
+    <a href=index.html>[back to Index]</a>
+  </body>
+</html>

+ 124 - 0
raw.mod/libraw/doc/Install-LibRaw.html

@@ -0,0 +1,124 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=windows-1252">
+    <title>LibRaw Compilation and Installation</title>
+  </head>
+  <body> <a href="index.html">[back to Index]</a>
+    <h1>LibRaw Compilation and Installation</h1>
+    <p>LibRaw is distributed in the form of source codes. For further use, they
+      should be compiled (and, if desired, placed into system folders with
+      libraries and include-files).</p>
+    <a name="unix"></a>
+    <h2>Unix Systems (FreeBSD, Linux, Mac OS X)</h2>
+    <p> To build the library, you will need a working C++ compiler (gcc 3+ and
+      clang 2+ are OK) and the make utility. </p>
+    <p>Additional libraries (optional):</p>
+    <ul>
+      <li>zlib (used to decode deflated DNGs)</li>
+      <li>libjasper (used to decode RED files)</li>
+      <li>libjpeg8 (used to decode lossy DNGs and several old Kodak cameras)</li>
+    </ul>
+    <p> LibRaw has been tested on 32- and 64-bit Unix systems working on x86-
+      (and AMD64-) compatible processors. Building and work on other
+      architectures have not been tested. </p>
+    <h3>Compilation of Library and Examples</h3>
+    <p> Unpack the downloaded distribution package.</p>
+    <pre>        tar xzvf LibRaw-X.YY.tar.gz
+</pre>
+    <p>For GitHub downloads (clones), perform ./configure script generation via</p>
+    <pre>        autoreconf --install</pre>
+    <p>Go to LibRaw directory and run <b>./configure</b> and <b>make</b>: </p>
+    <pre>cd LibRaw-X.YY
+./configure # with optional args
+make
+    </pre>
+    <p>As a result, you will compile</p>
+    <ul>
+      <li>Library libraw.a in the lib/ folder</li>
+      <li><a href="Samples-LibRaw.html">Examples</a> in the bin/ folder (source
+        codes of examples are in the samples/ folder).</li>
+    </ul>
+    <p>In the current version, only static libraries are built:</p>
+    <ul>
+      <li>libraw.a: non-thread-safe version</li>
+      <li>libraw_r.a: thread-safe</li>
+    </ul>
+    <h3>Build parameters</h3>
+    <p> ./configure script have some non-standard parameters: </p>
+    <dl>
+      <dt> --enable-openmp<br>
+        --disable-openmp </dt>
+      <dd> Enable/disable OpenMP support if compiler supports it. OpenMP is
+        enabled by default. </dd>
+      <dt> --enable-lcms<br>
+        --disable-lcms </dt>
+      <dd> Enable/disable LCMS color engine support. If enabled, ./configure
+        will try to find lcms library. Both LCMS-1.x and LCMS-2.x are supported
+        LCMS support is enabled by default </dd>
+      <dt> --enable-examples<br>
+        --disable-examples </dt>
+      <dd> Enables/disables examples compilation and installation. Enabled by
+        default </dd>
+    </dl>
+    <h3>Installation and Usage</h3>
+    <p>To install the library, run</p>
+    <pre>    sudo make install
+    </pre>
+    <p> It will place the libraries in <b>/usr/local/lib</b>, the include-files
+      in <b>/usr/local/include</b> (subfolder of libraw) and LibRaw samples to
+      <b>/usr/local/bin</b>. You can override installation path by using
+      ./configure script. <br>
+      To use LibRaw, add the following parameters to the compiler call (when
+      building your own projects): </p>
+    <ul>
+      <li>Path to include-files: -I/usr/local/include</li>
+      <li>Path to libraries: -L/usr/local/lib</li>
+      <li>Library: -lraw (ordinary version) or -lraw_r (thread-safe version).</li>
+    </ul>
+    <h2>Windows: Building under Cygwin</h2>
+    <p> Building and installation are completely similar to <a href="#unix">building
+        and installation under Unix systems</a>. </p>
+    <h2>Windows: Native Building</h2>
+    <p> Building under Windows has three steps: </p>
+    <ul>
+      <li>Unpack the distribution package (if you have got no tar+gzip, take the
+        LibRaw distribution package in the .ZIP format) and go to folder
+        LibRaw-X.YYY. </li>
+      <li>Set the environment parameters so that the compiler/linker would find
+        the libraries and include-files. For Visual C++, this is done by running
+        <b>vcvars32.bat</b>. </li>
+      <li> Run<br>
+        <b>nmake -f Makefile.msvc</b><br>
+      </li>
+    </ul>
+    <p>You may need to edit Makefile.msvc to provide libjpeg/zlib/libjasper
+      paths to INCLUDE/LIB.</p>
+    <p> If all paths are set correctly and the include-files/libraries have been
+      found, then the following will be compiled:</p>
+    <ul>
+      <li>Library libraw_static.lib in folder lib</li>
+      <li>Dynamic library bin/libraw.dll and linking library for it
+        lib/libraw.lib</li>
+      <li>Examples in folder bin/.</li>
+    </ul>
+    <p>Only the thread-safe library is built under Win32, but it can be used
+      with non-threaded applications as well. All examples are linked with the
+      dynamic library (DLL); if static linking is necessary, one should link
+      applications with library libraw_static.lib and set the preprocessor
+      option /DLIBRAW_NODLL during compilation. </p>
+    <p> Windows-version compiles without LCMS support for now. </p>
+    <p> During building of DLL, all public functions are exported; further, the
+      exported subset may be reduced. </p>
+    <p> Unfortunately, paths to include/ libraries depend on the way Visual C
+      (or other compiler) is installed; therefore, it is impossible to specify
+      some standard paths in Makefile.msvc. </p>
+    <h2>Windows Installation</h2>
+    <p> No installation under Windows is supported. It is assumed that all DLLs
+      will be supplied together with the software using them (and this software
+      will perform the installation). Accordingly, in building of programs using
+      LibRaw, the paths to libraries, DLLs, and include-files should be
+      specified manually. </p>
+    <a href="index.html">[back to Index]</a>
+  </body>
+</html>

+ 213 - 0
raw.mod/libraw/doc/Samples-LibRaw.html

@@ -0,0 +1,213 @@
+<html>
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=windows-1252">
+  </head>
+  <body>
+    <p>LibRaw: Usage Examples<a href="index.html">[back to Index]</a></p>
+    <h1>LibRaw: Usage Examples</h1>
+    <h2>Overview of Examples in the Distribution Package (samples/*)</h2>
+    <p>The LibRaw package contains several examples illustrating the use of this
+      library. Their source codes are located in the samples/ folder, and after
+      library build they will be in the bin/ folder:</p>
+    <ul>
+      <li><strong>raw-identify</strong> The only LibRaw call it uses is <a href="API-CXX.html#open_file">open_file()</a>;
+        further code prints the values of the fields of the imgdata structure. <strong><br>
+        </strong><strong>raw-identify -v</strong> provides extensive dump of
+        metadata/<br>
+        Command line key <strong>-u</strong> shows unpacking function name,
+        while <strong>-u -f</strong> prints function name and masked are sizes.<br>
+        <strong>raw-identify -w </strong>will print white balance tables stored
+        in RAW file.</li>
+      <li><strong>simple_dcraw</strong> A simple "emulation" of dcraw
+        reproducing the behavior of <strong>dcraw [-e] [-v] [-T]</strong>.&nbsp;
+        A simplified version of this example is <a href="#code">considered
+          below</a>. <br>
+        <strong>-B</strong> command-line switch turns on use of <a href="API-CXX.html#open_buffer">open_buffer()
+          API call</a> used via mmap() of input file (Unix only).</li>
+      <li><strong>dcraw_half</strong> Demonstrates the use of <a href="API-C.html">C
+          API</a>. The example emulates the behavior of <strong>dcraw -h</strong>
+        (no other control parameters can be specified in this example). </li>
+      <li><strong>dcraw_emu</strong> Almost complete emulation of dcraw (except for
+        keys -D -d -E -i -v -e, which are considered in other usage examples).
+        Of most interest is processing of command line keys (copied from dcraw).
+        <br>
+        <p>This sample supports additional command-line parameters absent in
+          original dcraw:</p>
+        <dl>
+          <dt><strong>-mmap</strong></dt>
+          <dd>Use <a href="API-CXX.html#open_buffer">open_buffer()</a>
+            interface. Buffer prepared by mmap() call. This option not supported
+            under Win32.</dd>
+          <dt><strong>-meme</strong></dt>
+          <dd>Use <a href="API-CXX.html#open_buffer">open_buffer()</a>
+            interface. Buffer prepared by malloc()+read() calls.</dd>
+          <dt><strong>-c float-value</strong></dt>
+          <dd>This key sets <strong>params.adjust_maximum_thr</strong>
+            parameter.<br>
+            Use -c 0 to completely disable automatic maximum calculation. <br>
+            Default value: 0.75</dd>
+          <dt><strong>-timing</strong></dt>
+          <dd>Turns on detailed timing print.</dd>
+          <dt><strong>-G</strong></dt>
+          <dd>Turns on "green_matching" mode to suppress color mazes on cameras
+            with different green channels.</dd>
+          <dt><strong>-B x y w h</strong></dt>
+          <dd>Crops output to rectangle with width w, height h and x,y
+            coordinates of left upper corner. All coordinates applied before any
+            image rotation.</dd>
+          <dt><strong>-F</strong></dt>
+          <dd>Will use FILE I/O (bigfile_datastream) instead on standard
+            LibRaw_file_datastream.</dd>
+          <dt><strong>-dcbi N</strong></dt>
+          <dd>Sets number of additional DCB-demosaic iterations (option valid
+            only for -q 4, i.e. for DCB demosaic).</dd>
+          <dt><strong>-dcbe</strong></dt>
+          <dd>Turns on DCB color enhance mode (only for DCB demosaic, -q 4).</dd>
+          <dt><strong>-aexpo e p</strong></dt>
+          <dd>Turns on exposure correction. e is exposure shift in linear scale
+            from 0.25 (darken 2 stops) to 8.0 (lighten 3 stops). p is highlights
+            preservation amount from 0.0 (no preservation, full clipping) to 1.0
+            (full preservation, S-like curve in highlights).</dd>
+          <dt><strong>-apentax4shot</strong></dt>
+          <dd>Will merge 4 frames from Pentax 4-shot RAWs</dd>
+          <dt><strong>-apentax4shotorder abce</strong></dt>
+          <dd>Order of frames in pentax 4-shot files (default is 3102)</dd>
+          <dt><strong>-mmap</strong></dt>
+          <dd>Use mmap + memory IO instead of file IO (unix only)</dd>
+          <dt><strong>-disars</strong></dt>
+          <dd>Disable RawSpeed library (if compiled with this library)</dd>
+          <dt><strong>-doutputflags N</strong></dt>
+          <dd>set imgdata.params.output_flags to N</dd>
+          <dt><strong>-disinterp</strong></dt>
+          <dd>Do not run interpolation step</dd>
+          <dt><strong>-dsrawrgb1</strong></dt>
+          <dd>Disable YCbCr to RGB conversion for sRAW (Cb/Cr interpolation
+            enabled)</dd>
+          <dt><strong>-dsrawrgb2</strong></dt>
+          <dd>Disable YCbCr to RGB conversion for sRAW (Cb/Cr interpolation
+            disabled)</dd>
+        </dl>
+      </li>
+      <li><strong>half_mt</strong> Emulation of <strong>dcraw -h</strong>. It
+        "understands" the following keys: -a (automatic white balance over the
+        entire image), -w (white balance of the camera), -T (output in the tiff
+        format), and -J n (number of parallel threads launched for image
+        processing).<br>
+        On multiprocessor/multicore computers, the speed gain is notable in the
+        case of mass processing. On a Win32 machine, the example is assembled
+        from the initial file half_mt_win32.c, since work with threads under
+        Windows is fundamentally different and it it easier to copy simple
+        source codes than write one complex code.</li>
+      <li><strong>mem_image</strong> This sample uses <a href="API-CXX.html#dcraw_make_mem_image">dcraw_make_mem_image</a>
+        and <a href="API-CXX.html#dcraw_make_mem_thumb">dcraw_make_mem_thumb</a>
+        calls, than writes data in PPM format. </li>
+      <li><strong>unprocessed_raw</strong> This sample extracts (mostly)
+        unaltered RAW data including masked pixels data (on supported cameras).
+        If black frame exists and black frame extraction is supported for given
+        format, masked pixels data is added to resulting .TIFF file. Command
+        line options: <strong>-q</strong> - be quiet, <strong>-A</strong> -
+        autoscale data (integer multiplier), <strong>-g</strong>
+        gamma-correction (gamma 2.2) for data (instead of precise linear one), <strong>-B</strong>
+        turns on black level subtraction</li>
+      <li><strong>4channnels</strong> - splits RAW-file into four separate
+        16-bit grayscale TIFFs (per RAW channel).<br>
+        Command line switches:
+        <ul>
+          <li><strong>-s N</strong> selects N-th image from RAW with multiple
+            images</li>
+          <li><strong>-g</strong> gamma correction (gamma 2.2)</li>
+          <li><strong>-A</strong> values autoscale by auto-calculated integer
+            factor</li>
+          <li><strong>-B</strong> turn off black subtraction</li>
+          <li><strong>-N</strong> no RAW curve</li>
+        </ul>
+      </li>
+      <li><strong>multirender_test</strong> - very simple example of multiple
+        rendering on one file without reopen.</li>
+      <li><strong>postprocessing_benchmark</strong> - will print timings of RAW
+        processing steps</li>
+    </ul>
+    <h2>Example of docmode</h2>
+    <p>Below we consider the samples/simple_dcraw.cpp example, which emulates
+      the behavior of <strong>dcraw [-e][-v][-t]</strong>. To save space, let
+      us assume that keys -t -v are always specified (to avoid comments on
+      command line parsing) and there is always one parameter (name of file),
+      which is the only one and always passed to the program.</p>
+    <pre>int main(int ac, char *av[])
+{
+ int i, ret, verbose=0, output_thumbs=0;
+ char outfn[1024],thumbfn[1024];
+ // Creation of image processing object
+ LibRaw RawProcessor;
+ // The date in TIFF is written in the local format; let us specify the timezone for compatibility with dcraw
+ putenv ((char*)"TZ=UTC");
+// Let us define variables for convenient access to fields of RawProcessor
+#define P1 RawProcessor.imgdata.idata
+#define S RawProcessor.imgdata.sizes
+#define C RawProcessor.imgdata.color
+#define T RawProcessor.imgdata.thumbnail
+#define P2 RawProcessor.imgdata.other
+#define OUT RawProcessor.imgdata.params
+ OUT.output_tiff = 1; // Let us output TIFF
+ // Let us open the file
+ if( (ret = RawProcessor.open_file(av[1])) != LIBRAW_SUCCESS)
+ {
+ fprintf(stderr,"Cannot open %s: %s\n",av[i],libraw_strerror(ret));
+ // recycle() is needed only if we want to free the resources right now.
+ // If we process files in a cycle, the next open_file()
+ // will also call recycle(). If a fatal error has happened, it means that recycle()
+ // has already been called (repeated call will not cause any harm either).
+ RawProcessor.recycle();
+ goto end;
+ }
+ // Let us unpack the image
+ if( (ret = RawProcessor.unpack() ) != LIBRAW_SUCCESS)
+ {
+ fprintf(stderr,"Cannot unpack_thumb %s: %s\n",av[i],libraw_strerror(ret));
+ if(LIBRAW_FATAL_ERROR(ret))
+ goto end;
+ // if there has been a non-fatal error, we will try to continue
+ }
+ // Let us unpack the thumbnail
+ if( (ret = RawProcessor.unpack_thumb() ) != LIBRAW_SUCCESS)
+ {
+ // error processing is completely similar to the previous case
+ fprintf(stderr,"Cannot unpack_thumb %s: %s\n",av[i],libraw_strerror(ret));
+ if(LIBRAW_FATAL_ERROR(ret))
+ goto end;
+ }
+ else // We have successfully unpacked the thumbnail, now let us write it to a file
+ {
+ snprintf(thumbfn,sizeof(thumbfn),"%s.%s",av[i],T.tformat == LIBRAW_THUMBNAIL_JPEG ? "thumb.jpg" : "thumb.ppm");
+ if( LIBRAW_SUCCESS != (ret = RawProcessor.dcraw_thumb_writer(thumbfn)))
+ {
+ fprintf(stderr,"Cannot write %s: %s\n",thumbfn,libraw_strerror(ret));
+ // in the case of fatal error, we should terminate processing of the current file
+ if(LIBRAW_FATAL_ERROR(ret))
+ goto end;
+ }
+ }
+ // Data unpacking
+ ret = RawProcessor.dcraw_process();
+ if(LIBRAW_SUCCESS != ret ) // error at the previous step
+ {
+ fprintf(stderr,"Cannot do postprocessing on %s: %s\n",av[i],libraw_strerror(ret));
+ if(LIBRAW_FATAL_ERROR(ret))
+ goto end;
+ }
+ else // Successful document processing
+ {
+ snprintf(outfn,sizeof(outfn),"%s.%s", av[i], "tiff");
+ if( LIBRAW_SUCCESS != (ret = RawProcessor.dcraw_ppm_tiff_writer(outfn)))
+ fprintf(stderr,"Cannot write %s: error %d\n",outfn,ret);
+ }
+ // we don't evoke recycle() or call the destructor; C++ will do everything for us
+ return 0;
+end:
+ // got here after an error
+ return 1;
+}
+</pre>
+    <p><a href="index.html">[back to Index]</a></p>
+  </body>
+</html>

+ 65 - 0
raw.mod/libraw/doc/Why-LibRaw.html

@@ -0,0 +1,65 @@
+<html>
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=windows-1252">
+  </head>
+  <body>
+    <p>Purpose and Objectives<a href="index.html">[back to Index]</a></p>
+    <h1>LibRaw Project Goals and Objectives</h1>
+    <h2>Who May Be Interested in This Project</h2>
+    <p>The proposed project and the software products generated within this project are intended for:</p>
+    <ul>
+      <li>Developers of RAW converters, including current and new developments</li>
+      <li>Developers of applications that need access to decoded RAW data (for pre-processing, stitching, stacking, color profiling, etc.)</li>
+      <li>Those willing to write their own graphic interface for RAW file processing</li>
+      <li>Developers and enthusiasts creating their own primary and auxiliary data processing algorithms, including
+        <ul>
+          <li>Interpolation (demosaic),</li>
+          <li>Noise reduction</li>
+          <li>White balance</li>
+          <li>Correction of aberrations and distortions</li>
+          <li>RAW data analysis</li>
+          <li>Comparison of cameras and lenses</li>
+          <li>and so on...</li>
+        </ul>
+      </li>
+    </ul>
+    <h2>Some History</h2>
+    <p>The LibRaw project started in 2008. At that time <a href="https://www.cybercom.net/%7Edcoffin/dcraw/">dcraw</a> was very popular as a method of accessing RAW data. It was hard to find a more or less popular camera that was not supported by this utility; while the implementation of RAW data extraction in <strong>dcraw</strong> was of a very high quality.</p>
+    <p>However, developers and enthusiasts were experiencing a number of difficulties when using <strong>dcraw</strong>. First, the author of <strong>dcraw</strong> refused to turn his product into a handy library. Besides, <strong>dcraw</strong> contains a number of questionable features that may hinder its use without modifications, as well as instances of distortions in the photographic sense of it. As a result, once every several months, with each new release of <strong>dcraw</strong>, virtually all developers, part of them listed on the <a

+        href="https://www.cybercom.net/%7Edcoffin/dcraw/">dcraw Web site</a>, were to check the differences, figure out the patches, and apply those patches to their dcraw-based code and libraries.</p>
+    <p>As for enthusiasts, the "entry cost" of verifying their own ideas and implementing their own algorithms in such an environment is often unreasonably high: they have to either use the dcraw command line, thus being forced to use the unavoidable early processing stages, or understand the source code and maintain their own library based on it.</p>
+    <p>Thus, the inconveniences of <strong>dcraw</strong> make the developers' community quite small and halt further evolution and improvement of RAW format converters.</p>
+    <p>Our project started with the idea to <em>get a library based on dcraw, only better</em>. Today we are well past that initial goal, not in the least because <strong>dcraw</strong> is not actively supported since 2015, and the latest release was published nearly 2 years ago, in May 2016. Since then several distinctly different RAW formats (introduced by Fujifilm, Nikon, Pentax, Samsung, Sigma, Sony) emerged, none of which is supported by <strong>dcraw</strong>. Additionally, we see it necessary to extract more metadata to help better interpretation of RAW data and to add flexibility to the RAW conversion process.</p>
+    <h2>Goals and Objectives</h2>
+    <p>We are maintaining LibRaw as a library providing access to decoded raw data and metadata useful for correct interpretation of the said data. Thus:</p>
+    <ol>
+      <li>To keep on adding RAW decoding for new and previously unsupported cameras</li>
+      <li>To continue the development of a stable and consistent API suitable for other applications (RAW converters, data analyzers, panorama stitchers, etc.)</li>
+      <li>To have RAW processing as separate independent parts (groups of API calls)
+        <ul>
+          <li>Reading, decoding, and unpacking of RAW data: <em><strong>this is the main functionality of LibRaw</strong></em></li>
+          <li>Data conversions: interpolation, white balance, etc.: <em><strong>this part of LibRaw is frozen: we ported dcraw functionality, but expect that library users will create own postprocessing code.</strong></em></li>
+          <li>File output of the processing results. <em><strong>This part is very primitive, only tiff and ppm output is supported.</strong></em></li>
+        </ul>
+      </li>
+    </ol>
+    <p style="margin-left:.5in;">The latter two groups of functions are maintained to provide some postprocessing/saving ability from scratch, without writing own code. We do not have any plans to extend/improve this code.</p>
+    <ol>
+      <li value="4">To improve the procedures of RAW data retrieval and decoding.</li>
+      <li>To supply other developers with a "framework" (freeware and open-source), e.g., for experimenting with their own methods of RAW data processing (interpolation, noise reduction, white balance, etc.; some directions of the possible efforts are <a>listed above</a>), so that they could create their own GUI programs and interfaces without developing the entire RAW converter.</li>
+    </ol>
+    <h2>LibRaw Release Schedule</h2>
+    <ol>
+      <li><strong>Production releases</strong> will be published at intervals of 1-1.5 years. Production releases will be maintained through bugfixes. New cameras will not be added to production releases, but only to snapshots and non-stable/beta releases.<em> Patch </em>(bugfix) releases of production releases should provide API/ABI consistency (so, version 0.21.5 should be binary compatible with 0.21.0).</li>
+      <li><strong>Snapshots</strong> are planned to be released every 2-3 quarters. Snapshots will include support for new cameras, stable and tested in our own applications. API calls and internal routines may be changed. No binary compatibility maintained, to upgrade to newer snapshot one need to recompile application that uses it.</li>
+      <li><strong>Non-stable/beta releases</strong> with new features, like initial support for some new RAW format that needs extensive testing by the community.&nbsp; No exact schedule, to be published as needed.</li>
+    </ol>
+    <h2>How You Can Help/Participate</h2>
+    <p><strong>We welcome any help</strong>, however:</p>
+    <ol>
+      <li>If you are submitting any core functionality extensions/improvements, that is, something that has to do with the decoding of RAW and/or metadata, that would be highly valuable and we will maintain your submission on our own, if necessary; you don’t need to be committed.</li>
+      <li>If your contribution adds to post-processing, please be committed to supporting and maintaining such a contribution. Our previous experience with such contributions has been less than positive, exactly because of the lack of maintenance on the part of the contributors. We are unable to maintain such contributions on our own, because our primary goal is to maintain RAW and metadata decoding.</li>
+    </ol>
+    <p><a href="index.html">[back to Index]</a></p>
+  </body>
+</html>

+ 38 - 0
raw.mod/libraw/doc/index.html

@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=windows-1252">
+    <title>LibRaw: better dcraw (library)</title>
+  </head>
+  <body>
+    <h1>LibRaw: RAW image decoding/processing library</h1>
+    <p>LibRaw is a library for reading RAW files from digital photo cameras (CRW/CR2, NEF, RAF, DNG, MOS, KDC, DCR, etc.; virtually all RAW formats are supported). It pays special attention to correct retrieval of data required for subsequent RAW conversion.</p>
+    <p>The library is intended for embedding in RAW converters, data analyzers, and other programs using RAW files as the initial data.</p>
+    <p> Contents </p>
+    <ol>
+      <li><a href="#copyright">Copyright</a></li>
+      <li><a href="Why-LibRaw.html">Purpose and Objectives</a></li>
+      <li><a href="API-overview.html">Overview of LibRaw API (C++)</a></li>
+      <li><a href="Install-LibRaw.html">Compilation and Installation</a></li>
+      <li><a href="API-datastruct.html">Data Structures, Error Codes, and Constants</a> </li>
+      <li><a href="API-CXX.html">C++ API</a> </li>
+      <li><a href="API-C.html">C API</a></li>
+      <li><a href="API-notes.html">Notes on API (error code conventions, memory usage)</a></li>
+      <li><a href="Samples-LibRaw.html">Examples</a> </li>
+    </ol>
+    <a name="copyright"></a>
+    <h2>Copyright</h2>
+    <p> LibRaw library, Copyright (C) 2008-2021 LibRaw LLC ([email protected])<br>
+      The library includes source code from<br>
+      <i>dcraw.c, Dave Coffin's raw photo decoder<br>
+        Copyright 1997-2016 by Dave Coffin, dcoffin a cybercom o net<br>
+      </i> </p>
+    <p> LibRaw is distributed for free under two different licenses: </p>
+    <ul>
+      <li><a href="http://www.gnu.org/licenses/lgpl-2.1.html">GNU Lesser General Public License, version 2.1</a></li>
+      <li><a href="http://www.opensource.org/licenses/cddl1.txt">COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0</a></li>
+    </ul>
+    You may use one of these licensing modes and switch between them.
+    <p></p>
+  </body>
+</html>

+ 28 - 0
raw.mod/libraw/export-dist.sh

@@ -0,0 +1,28 @@
+#!/bin/sh
+
+DEST=$1
+VERSION=$2
+if test x$VERSION = x ; then
+ VERSION=`./version.sh`
+ echo VERSION set to $VERSION
+fi
+
+if test -d $DEST ; then
+ echo Using $DEST/$VERSION
+else
+  echo Usage: $0 destination-dir
+  exit 1
+fi
+cd ..
+for dir in LibRaw 
+do
+ cd $dir
+ git pull origin
+ cd ..
+done
+for dir in LibRaw 
+do
+ cd $dir
+ git archive --prefix=$dir-$VERSION/ $VERSION | (cd $DEST; tar xvf - )
+ cd ..
+done

+ 66 - 0
raw.mod/libraw/internal/dcraw_defs.h

@@ -0,0 +1,66 @@
+/* -*- C++ -*-
+ * Copyright 2019-2021 LibRaw LLC ([email protected])
+ *
+
+ LibRaw is free software; you can redistribute it and/or modify
+ it under the terms of the one of two licenses as you choose:
+
+1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1
+   (See file LICENSE.LGPL provided in LibRaw distribution archive for details).
+
+2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+   (See file LICENSE.CDDL provided in LibRaw distribution archive for details).
+
+ */
+
+#ifndef DCRAW_DEFS_H
+#define DCRAW_DEFS_H
+
+#include <math.h>
+#define LIBRAW_LIBRARY_BUILD
+#define LIBRAW_IO_REDEFINED
+#include "libraw/libraw.h"
+#include "libraw/libraw_types.h"
+#include "internal/defines.h"
+#include "internal/var_defines.h"
+
+#define stmread(buf, maxlen, fp) stread(buf, MIN(maxlen, sizeof(buf)), fp)
+#define strbuflen(buf) strnlen(buf, sizeof(buf) - 1)
+#define makeIs(idx) (maker_index == idx)
+#define strnXcat(buf, string)                                                  \
+  strncat(buf, string, LIM(sizeof(buf) - strbuflen(buf) - 1, 0, sizeof(buf)))
+
+// DNG was written by:
+#define nonDNG    0
+#define CameraDNG 1
+#define AdobeDNG  2
+
+// Makernote tag type:
+#define is_0x927c 0 /* most cameras */
+#define is_0xc634 2 /* Adobe DNG, Sony SR2, Pentax */
+
+// abbreviations
+#define ilm imgdata.lens.makernotes
+#define icWBC imgdata.color.WB_Coeffs
+#define icWBCCTC imgdata.color.WBCT_Coeffs
+#define imCanon imgdata.makernotes.canon
+#define imFuji imgdata.makernotes.fuji
+#define imHassy imgdata.makernotes.hasselblad
+#define imKodak imgdata.makernotes.kodak
+#define imNikon imgdata.makernotes.nikon
+#define imOly imgdata.makernotes.olympus
+#define imPana imgdata.makernotes.panasonic
+#define imPentax imgdata.makernotes.pentax
+#define imPhaseOne imgdata.makernotes.phaseone
+#define imRicoh imgdata.makernotes.ricoh
+#define imSamsung imgdata.makernotes.samsung
+#define imSony imgdata.makernotes.sony
+#define imCommon imgdata.makernotes.common
+
+
+#define ph1_bits(n) ph1_bithuff(n, 0)
+#define ph1_huff(h) ph1_bithuff(*h, h + 1)
+#define getbits(n)  getbithuff(n, 0)
+#define gethuff(h)  getbithuff(*h, h + 1)
+
+#endif

+ 25 - 0
raw.mod/libraw/internal/dcraw_fileio_defs.h

@@ -0,0 +1,25 @@
+/* -*- C++ -*-
+ * Copyright 2019-2021 LibRaw LLC ([email protected])
+ *
+
+ LibRaw is free software; you can redistribute it and/or modify
+ it under the terms of the one of two licenses as you choose:
+
+1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1
+   (See file LICENSE.LGPL provided in LibRaw distribution archive for details).
+
+2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+   (See file LICENSE.CDDL provided in LibRaw distribution archive for details).
+
+ */
+
+#ifndef DCRAW_FILEIO_DEFS_H
+#define DCRAW_FILEIO_DEFS_H
+
+#include <math.h>
+#define LIBRAW_LIBRARY_BUILD
+#include "libraw/libraw.h"
+#include "internal/defines.h"
+#include "internal/var_defines.h"
+
+#endif

+ 193 - 0
raw.mod/libraw/internal/defines.h

@@ -0,0 +1,193 @@
+/*
+  Copyright 2008-2021 LibRaw LLC ([email protected])
+
+LibRaw is free software; you can redistribute it and/or modify
+it under the terms of the one of two licenses as you choose:
+
+1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1
+   (See file LICENSE.LGPL provided in LibRaw distribution archive for details).
+
+2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+   (See file LICENSE.CDDL provided in LibRaw distribution archive for details).
+
+   This file is generated from Dave Coffin's dcraw.c
+   dcraw.c -- Dave Coffin's raw photo decoder
+   Copyright 1997-2010 by Dave Coffin, dcoffin a cybercom o net
+
+   Look into dcraw homepage (probably http://cybercom.net/~dcoffin/dcraw/)
+   for more information
+*/
+
+#ifndef LIBRAW_INT_DEFINES_H
+#define LIBRAW_INT_DEFINES_H
+#ifndef USE_JPEG
+#define NO_JPEG
+#endif
+#ifndef USE_JASPER
+#define NO_JASPER
+#endif
+#define DCRAW_VERSION "9.26"
+
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#define _USE_MATH_DEFINES
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <float.h>
+#include <limits.h>
+#include <math.h>
+#include <setjmp.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <sys/types.h>
+#ifdef __CYGWIN__
+#include <io.h>
+#endif
+#if defined LIBRAW_WIN32_CALLS
+#include <sys/utime.h>
+#ifndef LIBRAW_NO_WINSOCK2
+#include <winsock2.h>
+#pragma comment(lib, "ws2_32.lib")
+#endif
+#define snprintf _snprintf
+#define strcasecmp stricmp
+#define strncasecmp strnicmp
+#else
+#include <unistd.h>
+#include <utime.h>
+#include <netinet/in.h>
+typedef long long INT64;
+typedef unsigned long long UINT64;
+#endif
+
+#ifdef NODEPS
+#define NO_JASPER
+#define NO_JPEG
+#define NO_LCMS
+#endif
+#ifndef NO_JASPER
+#include <jasper/jasper.h> /* Decode Red camera movies */
+#endif
+#ifndef NO_JPEG
+#include <jpeglib.h> /* Decode compressed Kodak DC120 photos */
+#endif               /* and Adobe Lossy DNGs */
+#ifndef NO_LCMS
+#ifdef USE_LCMS
+#include <lcms.h> /* Support color profiles */
+#else
+#include <lcms2.h> /* Support color profiles */
+#endif
+#endif
+#ifdef LOCALEDIR
+#include <libintl.h>
+#define _(String) gettext(String)
+#else
+#define _(String) (String)
+#endif
+
+#ifdef LJPEG_DECODE
+#error Please compile dcraw.c by itself.
+#error Do not link it with ljpeg_decode.
+#endif
+
+#ifndef LONG_BIT
+#define LONG_BIT (8 * sizeof(long))
+#endif
+#define FORC(cnt) for (c = 0; c < cnt; c++)
+#define FORC3 FORC(3)
+#define FORC4 FORC(4)
+#define FORCC for (c = 0; c < colors && c < 4; c++)
+
+#define SQR(x) ((x) * (x))
+#define ABS(x) (((int)(x) ^ ((int)(x) >> 31)) - ((int)(x) >> 31))
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
+#define LIM(x, min, max) MAX(min, MIN(x, max))
+#define ULIM(x, y, z) ((y) < (z) ? LIM(x, y, z) : LIM(x, z, y))
+#define CLIP(x) LIM((int)(x), 0, 65535)
+#define CLIP15(x) LIM((int)(x), 0, 32767)
+#define SWAP(a, b)                                                             \
+  {                                                                            \
+    a = a + b;                                                                 \
+    b = a - b;                                                                 \
+    a = a - b;                                                                 \
+  }
+
+#define my_swap(type, i, j)                                                    \
+  {                                                                            \
+    type t = i;                                                                \
+    i = j;                                                                     \
+    j = t;                                                                     \
+  }
+
+#ifdef __GNUC__
+inline
+#elif defined(_MSC_VER)
+__forceinline
+#else
+static
+#endif
+float fMAX(float a, float b) { return MAX(a, b); }
+
+/*
+   In order to inline this calculation, I make the risky
+   assumption that all filter patterns can be described
+   by a repeating pattern of eight rows and two columns
+
+   Do not use the FC or BAYER macros with the Leaf CatchLight,
+   because its pattern is 16x16, not 2x8.
+
+   Return values are either 0/1/2/3 = G/M/C/Y or 0/1/2/3 = R/G1/B/G2
+
+        PowerShot 600	PowerShot A50	PowerShot Pro70	Pro90 & G1
+        0xe1e4e1e4:	0x1b4e4b1e:	0x1e4b4e1b:	0xb4b4b4b4:
+
+          0 1 2 3 4 5	  0 1 2 3 4 5	  0 1 2 3 4 5	  0 1 2 3 4 5
+        0 G M G M G M	0 C Y C Y C Y	0 Y C Y C Y C	0 G M G M G M
+        1 C Y C Y C Y	1 M G M G M G	1 M G M G M G	1 Y C Y C Y C
+        2 M G M G M G	2 Y C Y C Y C	2 C Y C Y C Y
+        3 C Y C Y C Y	3 G M G M G M	3 G M G M G M
+                        4 C Y C Y C Y	4 Y C Y C Y C
+        PowerShot A5	5 G M G M G M	5 G M G M G M
+        0x1e4e1e4e:	6 Y C Y C Y C	6 C Y C Y C Y
+                        7 M G M G M G	7 M G M G M G
+          0 1 2 3 4 5
+        0 C Y C Y C Y
+        1 G M G M G M
+        2 C Y C Y C Y
+        3 M G M G M G
+
+   All RGB cameras use one of these Bayer grids:
+
+        0x16161616:	0x61616161:	0x49494949:	0x94949494:
+
+          0 1 2 3 4 5	  0 1 2 3 4 5	  0 1 2 3 4 5	  0 1 2 3 4 5
+        0 B G B G B G	0 G R G R G R	0 G B G B G B	0 R G R G R G
+        1 G R G R G R	1 B G B G B G	1 R G R G R G	1 G B G B G B
+        2 B G B G B G	2 G R G R G R	2 G B G B G B	2 R G R G R G
+        3 G R G R G R	3 B G B G B G	3 R G R G R G	3 G B G B G B
+ */
+
+// _RGBG means R, G1, B, G2 sequence
+#define GRBG_2_RGBG(q)    (q ^ (q >> 1) ^ 1)
+#define RGGB_2_RGBG(q)    (q ^ (q >> 1))
+#define BG2RG1_2_RGBG(q)  (q ^ 2)
+#define G2BRG1_2_RGBG(q)  (q ^ (q >> 1) ^ 3)
+#define GRGB_2_RGBG(q)    (q ^ 1)
+#define RBGG_2_RGBG(q)    ((q >> 1) | ((q & 1) << 1))
+
+#define RAWINDEX(row, col) ((row)*raw_width + (col))
+#define RAW(row, col) raw_image[(row)*raw_width + (col)]
+#define BAYER(row, col)                                                        \
+  image[((row) >> shrink) * iwidth + ((col) >> shrink)][FC(row, col)]
+
+#define BAYER2(row, col)                                                       \
+  image[((row) >> shrink) * iwidth + ((col) >> shrink)][fcol(row, col)]
+#define BAYERC(row, col, c)                                                    \
+  imgdata.image[((row) >> IO.shrink) * S.iwidth + ((col) >> IO.shrink)][c]
+
+#endif

+ 27 - 0
raw.mod/libraw/internal/dmp_include.h

@@ -0,0 +1,27 @@
+/* -*- C++ -*-
+ * Copyright 2019-2021 LibRaw LLC ([email protected])
+ *
+
+ LibRaw is free software; you can redistribute it and/or modify
+ it under the terms of the one of two licenses as you choose:
+
+1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1
+   (See file LICENSE.LGPL provided in LibRaw distribution archive for details).
+
+2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+   (See file LICENSE.CDDL provided in LibRaw distribution archive for details).
+
+ */
+
+#ifndef DMP_INCLUDE_H
+#define DMP_INCLUDE_H
+
+#define LIBRAW_LIBRARY_BUILD
+#define LIBRAW_IO_REDEFINED
+#include "libraw/libraw.h"
+#include "internal/defines.h"
+#define SRC_USES_SHRINK
+#define SRC_USES_BLACK
+#define SRC_USES_CURVE
+
+#endif

+ 316 - 0
raw.mod/libraw/internal/libraw_cameraids.h

@@ -0,0 +1,316 @@
+/* -*- C++ -*-
+ * File: internal/libraw_cameraids.h
+ * Copyright 2008-2021 LibRaw LLC ([email protected])
+ * Created: Sat Aug  17, 2020
+
+LibRaw is free software; you can redistribute it and/or modify
+it under the terms of the one of two licenses as you choose:
+
+1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1
+   (See file LICENSE.LGPL provided in LibRaw distribution archive for details).
+
+2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+   (See file LICENSE.CDDL provided in LibRaw distribution archive for details).
+
+ */
+
+#ifndef LIBRAW_CONST_H
+#define LIBRAW_CONST_H
+
+#define CanonID_EOS_M50            0x00000412ULL
+#define CanonID_EOS_M6_Mark_II     0x00000811ULL
+#define CanonID_EOS_M200           0x00000812ULL
+#define CanonID_EOS_D30            0x01140000ULL
+#define CanonID_EOS_D60            0x01668000ULL
+#define CanonID_EOS_M3             0x03740000ULL
+#define CanonID_EOS_M10            0x03840000ULL
+#define CanonID_EOS_M5             0x03940000ULL
+#define CanonID_EOS_M100           0x03980000ULL
+#define CanonID_EOS_M6             0x04070000ULL
+#define CanonID_EOS_1D            (0x80000000ULL + 0x001ULL)
+#define CanonID_EOS_1Ds           (0x80000000ULL + 0x167ULL)
+#define CanonID_EOS_10D           (0x80000000ULL + 0x168ULL)
+#define CanonID_EOS_1D_Mark_III   (0x80000000ULL + 0x169ULL)
+#define CanonID_EOS_300D          (0x80000000ULL + 0x170ULL)
+#define CanonID_EOS_1D_Mark_II    (0x80000000ULL + 0x174ULL)
+#define CanonID_EOS_20D           (0x80000000ULL + 0x175ULL)
+#define CanonID_EOS_450D          (0x80000000ULL + 0x176ULL)
+#define CanonID_EOS_1Ds_Mark_II   (0x80000000ULL + 0x188ULL)
+#define CanonID_EOS_350D          (0x80000000ULL + 0x189ULL)
+#define CanonID_EOS_40D           (0x80000000ULL + 0x190ULL)
+#define CanonID_EOS_5D            (0x80000000ULL + 0x213ULL)
+#define CanonID_EOS_1Ds_Mark_III  (0x80000000ULL + 0x215ULL)
+#define CanonID_EOS_5D_Mark_II    (0x80000000ULL + 0x218ULL)
+#define CanonID_EOS_1D_Mark_II_N  (0x80000000ULL + 0x232ULL)
+#define CanonID_EOS_30D           (0x80000000ULL + 0x234ULL)
+#define CanonID_EOS_400D          (0x80000000ULL + 0x236ULL)
+#define CanonID_EOS_7D            (0x80000000ULL + 0x250ULL)
+#define CanonID_EOS_500D          (0x80000000ULL + 0x252ULL)
+#define CanonID_EOS_1000D         (0x80000000ULL + 0x254ULL)
+#define CanonID_EOS_50D           (0x80000000ULL + 0x261ULL)
+#define CanonID_EOS_1D_X          (0x80000000ULL + 0x269ULL)
+#define CanonID_EOS_550D          (0x80000000ULL + 0x270ULL)
+#define CanonID_EOS_1D_Mark_IV    (0x80000000ULL + 0x281ULL)
+#define CanonID_EOS_5D_Mark_III   (0x80000000ULL + 0x285ULL)
+#define CanonID_EOS_600D          (0x80000000ULL + 0x286ULL)
+#define CanonID_EOS_60D           (0x80000000ULL + 0x287ULL)
+#define CanonID_EOS_1100D         (0x80000000ULL + 0x288ULL)
+#define CanonID_EOS_7D_Mark_II    (0x80000000ULL + 0x289ULL)
+#define CanonID_EOS_650D          (0x80000000ULL + 0x301ULL)
+#define CanonID_EOS_6D            (0x80000000ULL + 0x302ULL)
+#define CanonID_EOS_1D_C          (0x80000000ULL + 0x324ULL)
+#define CanonID_EOS_70D           (0x80000000ULL + 0x325ULL)
+#define CanonID_EOS_700D          (0x80000000ULL + 0x326ULL)
+#define CanonID_EOS_1200D         (0x80000000ULL + 0x327ULL)
+#define CanonID_EOS_1D_X_Mark_II  (0x80000000ULL + 0x328ULL)
+#define CanonID_EOS_M             (0x80000000ULL + 0x331ULL)
+#define CanonID_EOS_100D          (0x80000000ULL + 0x346ULL)
+#define CanonID_EOS_760D          (0x80000000ULL + 0x347ULL)
+#define CanonID_EOS_5D_Mark_IV    (0x80000000ULL + 0x349ULL)
+#define CanonID_EOS_80D           (0x80000000ULL + 0x350ULL)
+#define CanonID_EOS_M2            (0x80000000ULL + 0x355ULL)
+#define CanonID_EOS_5DS           (0x80000000ULL + 0x382ULL)
+#define CanonID_EOS_750D          (0x80000000ULL + 0x393ULL)
+#define CanonID_EOS_5DS_R         (0x80000000ULL + 0x401ULL)
+#define CanonID_EOS_1300D         (0x80000000ULL + 0x404ULL)
+#define CanonID_EOS_800D          (0x80000000ULL + 0x405ULL)
+#define CanonID_EOS_6D_Mark_II    (0x80000000ULL + 0x406ULL)
+#define CanonID_EOS_77D           (0x80000000ULL + 0x408ULL)
+#define CanonID_EOS_200D          (0x80000000ULL + 0x417ULL)
+#define CanonID_EOS_R5            (0x80000000ULL + 0x421ULL)
+#define CanonID_EOS_3000D         (0x80000000ULL + 0x422ULL)
+#define CanonID_EOS_R             (0x80000000ULL + 0x424ULL)
+#define CanonID_EOS_1D_X_Mark_III (0x80000000ULL + 0x428ULL)
+#define CanonID_EOS_1500D         (0x80000000ULL + 0x432ULL)
+#define CanonID_EOS_RP            (0x80000000ULL + 0x433ULL)
+#define CanonID_EOS_850D          (0x80000000ULL + 0x435ULL)
+#define CanonID_EOS_250D          (0x80000000ULL + 0x436ULL)
+#define CanonID_EOS_90D           (0x80000000ULL + 0x437ULL)
+#define CanonID_EOS_R3            (0x80000000ULL + 0x450ULL)
+#define CanonID_EOS_R6            (0x80000000ULL + 0x453ULL)
+#define CanonID_EOS_M50_Mark_II   (0x80000000ULL + 0x468ULL)
+
+// CanonID_EOS_D2000C after Canon's TIFF2CR2 convertor:
+#define CanonID_EOS_D2000C        (0x80000000ULL + 0x520ULL)
+// CanonID_EOS_D6000C id after Canon's TIFF2CR2 convertor:
+#define CanonID_EOS_D6000C        (0x80000000ULL + 0x560ULL)
+
+#define OlyID_str2hex(str) ((unsigned long long)str[0]<<32 | str[1]<<24 | str[2]<<16 | str[3]<<8 | str[4])
+#define OlyID_E_20            OlyID_str2hex("D4029")
+#define OlyID_E_1             OlyID_str2hex("D4040")
+#define OlyID_E_300           OlyID_str2hex("D4041")
+#define OlyID_SP_550UZ        OlyID_str2hex("D4321")
+#define OlyID_SP_510UZ        OlyID_str2hex("D4322")
+#define OlyID_SP_560UZ        OlyID_str2hex("D4355")
+#define OlyID_SP_570UZ        OlyID_str2hex("D4364")
+#define OlyID_SP_565UZ        OlyID_str2hex("D4374")
+#define OlyID_XZ_1            OlyID_str2hex("D4401")
+#define OlyID_XZ_2            OlyID_str2hex("D4531")
+#define OlyID_XZ_10           OlyID_str2hex("D4546")
+#define OlyID_STYLUS_1        OlyID_str2hex("D4572")
+#define OlyID_SH_2            OlyID_str2hex("D4585")
+#define OlyID_TG_4            OlyID_str2hex("D4586")
+#define OlyID_TG_5            OlyID_str2hex("D4593")
+#define OlyID_TG_6            OlyID_str2hex("D4603")
+#define OlyID_E_10            OlyID_str2hex("D4842")
+#define OlyID_AIR_A01         OlyID_str2hex("K0055")
+#define OlyID_NORMA           OlyID_str2hex("NORMA")
+#define OlyID_E_330           OlyID_str2hex("S0003")
+#define OlyID_E_500           OlyID_str2hex("S0004")
+#define OlyID_E_400           OlyID_str2hex("S0009")
+#define OlyID_E_510           OlyID_str2hex("S0010")
+#define OlyID_E_3             OlyID_str2hex("S0011")
+#define OlyID_E_410           OlyID_str2hex("S0013")
+#define OlyID_E_420           OlyID_str2hex("S0016")
+#define OlyID_E_30            OlyID_str2hex("S0017")
+#define OlyID_E_520           OlyID_str2hex("S0018")
+#define OlyID_E_P1            OlyID_str2hex("S0019")
+#define OlyID_E_620           OlyID_str2hex("S0023")
+#define OlyID_E_P2            OlyID_str2hex("S0026")
+#define OlyID_E_PL1           OlyID_str2hex("S0027")
+#define OlyID_E_450           OlyID_str2hex("S0029")
+#define OlyID_E_600           OlyID_str2hex("S0030")
+#define OlyID_E_P3            OlyID_str2hex("S0032")
+#define OlyID_E_5             OlyID_str2hex("S0033")
+#define OlyID_E_PL2           OlyID_str2hex("S0034")
+#define OlyID_E_M5            OlyID_str2hex("S0036")
+#define OlyID_E_PL3           OlyID_str2hex("S0038")
+#define OlyID_E_PM1           OlyID_str2hex("S0039")
+#define OlyID_E_PL1s          OlyID_str2hex("S0040")
+#define OlyID_E_PL5           OlyID_str2hex("S0042")
+#define OlyID_E_PM2           OlyID_str2hex("S0043")
+#define OlyID_E_P5            OlyID_str2hex("S0044")
+#define OlyID_E_PL6           OlyID_str2hex("S0045")
+#define OlyID_E_PL7           OlyID_str2hex("S0046")
+#define OlyID_E_M1            OlyID_str2hex("S0047")
+#define OlyID_E_M10           OlyID_str2hex("S0051")
+#define OlyID_E_M5_Mark_II    OlyID_str2hex("S0052")
+#define OlyID_E_M10_Mark_II   OlyID_str2hex("S0059")
+#define OlyID_PEN_F           OlyID_str2hex("S0061")
+#define OlyID_E_PL8           OlyID_str2hex("S0065")
+#define OlyID_E_M1_Mark_II    OlyID_str2hex("S0067")
+#define OlyID_E_M10_Mark_III  OlyID_str2hex("S0068")
+#define OlyID_E_PL9           OlyID_str2hex("S0076")
+#define OlyID_E_M1X           OlyID_str2hex("S0080")
+#define OlyID_E_PL10          OlyID_str2hex("S0085")
+#define OlyID_E_M10_Mark_IV   OlyID_str2hex("S0088")
+#define OlyID_E_M5_Mark_III   OlyID_str2hex("S0089")
+#define OlyID_E_M1_Mark_III   OlyID_str2hex("S0092")
+#define OlyID_E_P7            OlyID_str2hex("S0093")
+#define OlyID_C_3030Z         OlyID_str2hex("SX351")
+#define OlyID_C_5050Z         OlyID_str2hex("SX558")
+#define OlyID_C_350Z          OlyID_str2hex("SX751")
+#define OlyID_C_740UZ         OlyID_str2hex("SX754")
+#define OlyID_C_5060WZ        OlyID_str2hex("SX756")
+#define OlyID_C_8080WZ        OlyID_str2hex("SX757")
+#define OlyID_C_770UZ         OlyID_str2hex("SX772")
+#define OlyID_C_7070WZ        OlyID_str2hex("SX851")
+#define OlyID_C_7000Z         OlyID_str2hex("SX852")
+#define OlyID_SP_500UZ        OlyID_str2hex("SX853")
+#define OlyID_SP_310          OlyID_str2hex("SX854")
+#define OlyID_SP_350          OlyID_str2hex("SX855")
+#define OlyID_SP_320          OlyID_str2hex("SX873")
+
+#define PentaxID_Optio_S      0x1296cULL
+#define PentaxID_Optio_S_V101 0x12971ULL
+#define PentaxID_staristD     0x12994ULL
+#define PentaxID_Optio_33WR   0x129c6ULL
+#define PentaxID_Optio_S4     0x129d5ULL
+#define PentaxID_Optio_750Z   0x12a66ULL
+#define PentaxID_staristDS    0x12aa2ULL
+#define PentaxID_staristDL    0x12b1aULL
+#define PentaxID_staristDS2   0x12b60ULL
+#define PentaxID_GX_1S        0x12b62ULL
+#define PentaxID_staristDL2   0x12b7eULL
+#define PentaxID_GX_1L        0x12b80ULL
+#define PentaxID_K100D        0x12b9cULL
+#define PentaxID_K110D        0x12b9dULL
+#define PentaxID_K100D_Super  0x12ba2ULL
+#define PentaxID_K10D         0x12c1eULL
+#define PentaxID_GX10         0x12c20ULL
+#define PentaxID_K20D         0x12cd2ULL
+#define PentaxID_GX20         0x12cd4ULL
+#define PentaxID_K200D        0x12cfaULL
+#define PentaxID_K2000        0x12d72ULL
+#define PentaxID_K_m          0x12d73ULL
+#define PentaxID_K_7          0x12db8ULL
+#define PentaxID_K_x          0x12dfeULL
+#define PentaxID_645D         0x12e08ULL
+#define PentaxID_K_r          0x12e6cULL
+#define PentaxID_K_5          0x12e76ULL
+#define PentaxID_Q            0x12ee4ULL
+#define PentaxID_K_01         0x12ef8ULL
+#define PentaxID_K_30         0x12f52ULL
+#define PentaxID_Q10          0x12f66ULL
+#define PentaxID_K_5_II       0x12f70ULL
+#define PentaxID_K_5_II_s     0x12f71ULL
+#define PentaxID_Q7           0x12f7aULL
+#define PentaxID_MX_1         0x12f84ULL
+#define PentaxID_K_50         0x12fb6ULL
+#define PentaxID_K_3          0x12fc0ULL
+#define PentaxID_K_500        0x12fcaULL
+#define PentaxID_645Z         0x13010ULL
+#define PentaxID_K_S1         0x1301aULL
+#define PentaxID_K_S2         0x13024ULL
+#define PentaxID_Q_S1         0x1302eULL
+#define PentaxID_K_1          0x13092ULL
+#define PentaxID_K_3_II       0x1309cULL
+#define PentaxID_GR_III       0x1320eULL
+#define PentaxID_K_70         0x13222ULL
+#define PentaxID_KP           0x1322cULL
+#define PentaxID_K_1_Mark_II  0x13240ULL
+#define PentaxID_K_3_III      0x13254ULL
+#define PentaxID_GR_IIIx      0x1329aULL
+
+#define SonyID_DSC_R1           0x002ULL
+#define SonyID_DSLR_A100        0x100ULL
+#define SonyID_DSLR_A900        0x101ULL
+#define SonyID_DSLR_A700        0x102ULL
+#define SonyID_DSLR_A200        0x103ULL
+#define SonyID_DSLR_A350        0x104ULL
+#define SonyID_DSLR_A300        0x105ULL
+#define SonyID_DSLR_A900_APSC   0x106ULL
+#define SonyID_DSLR_A380        0x107ULL
+#define SonyID_DSLR_A330        0x108ULL
+#define SonyID_DSLR_A230        0x109ULL
+#define SonyID_DSLR_A290        0x10aULL
+#define SonyID_DSLR_A850        0x10dULL
+#define SonyID_DSLR_A850_APSC   0x10eULL
+#define SonyID_DSLR_A550        0x111ULL
+#define SonyID_DSLR_A500        0x112ULL
+#define SonyID_DSLR_A450        0x113ULL
+#define SonyID_NEX_5            0x116ULL
+#define SonyID_NEX_3            0x117ULL
+#define SonyID_SLT_A33          0x118ULL
+#define SonyID_SLT_A55          0x119ULL
+#define SonyID_DSLR_A560        0x11aULL
+#define SonyID_DSLR_A580        0x11bULL
+#define SonyID_NEX_C3           0x11cULL
+#define SonyID_SLT_A35          0x11dULL
+#define SonyID_SLT_A65          0x11eULL
+#define SonyID_SLT_A77          0x11fULL
+#define SonyID_NEX_5N           0x120ULL
+#define SonyID_NEX_7            0x121ULL
+#define SonyID_NEX_VG20         0x122ULL
+#define SonyID_SLT_A37          0x123ULL
+#define SonyID_SLT_A57          0x124ULL
+#define SonyID_NEX_F3           0x125ULL
+#define SonyID_SLT_A99          0x126ULL
+#define SonyID_NEX_6            0x127ULL
+#define SonyID_NEX_5R           0x128ULL
+#define SonyID_DSC_RX100        0x129ULL
+#define SonyID_DSC_RX1          0x12aULL
+#define SonyID_NEX_VG900        0x12bULL
+#define SonyID_NEX_VG30         0x12cULL
+#define SonyID_ILCE_3000        0x12eULL
+#define SonyID_SLT_A58          0x12fULL
+#define SonyID_NEX_3N           0x131ULL
+#define SonyID_ILCE_7           0x132ULL
+#define SonyID_NEX_5T           0x133ULL
+#define SonyID_DSC_RX100M2      0x134ULL
+#define SonyID_DSC_RX10         0x135ULL
+#define SonyID_DSC_RX1R         0x136ULL
+#define SonyID_ILCE_7R          0x137ULL
+#define SonyID_ILCE_6000        0x138ULL
+#define SonyID_ILCE_5000        0x139ULL
+#define SonyID_DSC_RX100M3      0x13dULL
+#define SonyID_ILCE_7S          0x13eULL
+#define SonyID_ILCA_77M2        0x13fULL
+#define SonyID_ILCE_5100        0x153ULL
+#define SonyID_ILCE_7M2         0x154ULL
+#define SonyID_DSC_RX100M4      0x155ULL
+#define SonyID_DSC_RX10M2       0x156ULL
+#define SonyID_DSC_RX1RM2       0x158ULL
+#define SonyID_ILCE_QX1         0x15aULL
+#define SonyID_ILCE_7RM2        0x15bULL
+#define SonyID_ILCE_7SM2        0x15eULL
+#define SonyID_ILCA_68          0x161ULL
+#define SonyID_ILCA_99M2        0x162ULL
+#define SonyID_DSC_RX10M3       0x163ULL
+#define SonyID_DSC_RX100M5      0x164ULL
+#define SonyID_ILCE_6300        0x165ULL
+#define SonyID_ILCE_9           0x166ULL
+#define SonyID_ILCE_6500        0x168ULL
+#define SonyID_ILCE_7RM3        0x16aULL
+#define SonyID_ILCE_7M3         0x16bULL
+#define SonyID_DSC_RX0          0x16cULL
+#define SonyID_DSC_RX10M4       0x16dULL
+#define SonyID_DSC_RX100M6      0x16eULL
+#define SonyID_DSC_HX99         0x16fULL
+#define SonyID_DSC_RX100M5A     0x171ULL
+#define SonyID_ILCE_6400        0x173ULL
+#define SonyID_DSC_RX0M2        0x174ULL
+#define SonyID_DSC_RX100M7      0x176ULL
+#define SonyID_ILCE_7RM4        0x177ULL
+#define SonyID_ILCE_9M2         0x178ULL
+#define SonyID_ILCE_6600        0x17aULL
+#define SonyID_ILCE_6100        0x17bULL
+#define SonyID_ZV_1             0x17cULL
+#define SonyID_ILCE_7C          0x17dULL
+#define SonyID_ZV_E10           0x17eULL
+#define SonyID_ILCE_7SM3        0x17fULL
+#define SonyID_ILCE_1           0x180ULL
+#define SonyID_ILME_FX3         0x181ULL
+#define SonyID_ILCE_7RM3A       0x182ULL
+#define SonyID_ILCE_7RM4A       0x183ULL
+#endif

+ 130 - 0
raw.mod/libraw/internal/libraw_cxx_defs.h

@@ -0,0 +1,130 @@
+/* -*- C++ -*-
+ * File: internal/libraw_cxx_defs.h
+ * Copyright 2008-2021 LibRaw LLC ([email protected])
+ * Created: Sat Aug  17, 2020
+
+LibRaw is free software; you can redistribute it and/or modify
+it under the terms of the one of two licenses as you choose:
+
+1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1
+   (See file LICENSE.LGPL provided in LibRaw distribution archive for details).
+
+2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+   (See file LICENSE.CDDL provided in LibRaw distribution archive for details).
+
+ */
+
+#ifndef _LIBRAW_CXX_DEFS_H
+#define _LIBRAW_CXX_DEFS_H
+
+#include <math.h>
+#include <errno.h>
+#include <float.h>
+#include <new>
+#include <exception>
+#include <sys/types.h>
+#include <sys/stat.h>
+#define LIBRAW_LIBRARY_BUILD
+#include "libraw/libraw.h"
+#include "internal/defines.h"
+#ifdef USE_ZLIB
+#include <zlib.h>
+#endif
+
+#ifndef LIBRAW_WIN32_CALLS
+#include <netinet/in.h>
+#else
+#ifndef LIBRAW_NO_WINSOCK2
+#include <winsock2.h>
+#endif
+#include <io.h>
+#endif
+
+#ifdef USE_RAWSPEED
+#include <RawSpeed/StdAfx.h>
+#include <RawSpeed/FileMap.h>
+#include <RawSpeed/RawParser.h>
+#include <RawSpeed/RawDecoder.h>
+#include <RawSpeed/CameraMetaData.h>
+#include <RawSpeed/ColorFilterArray.h>
+extern const char *_rawspeed_data_xml[];
+extern const int RAWSPEED_DATA_COUNT;
+class CameraMetaDataLR : public RawSpeed::CameraMetaData
+{
+public:
+  CameraMetaDataLR() : CameraMetaData() {}
+  CameraMetaDataLR(char *filename) : RawSpeed::CameraMetaData(filename) {}
+  CameraMetaDataLR(char *data, int sz);
+};
+
+CameraMetaDataLR *make_camera_metadata();
+
+#endif
+
+#ifdef USE_DNGSDK
+#include "dng_host.h"
+#include "dng_negative.h"
+#include "dng_simple_image.h"
+#include "dng_info.h"
+#endif
+
+#define P1 imgdata.idata
+#define S  imgdata.sizes
+#define O  imgdata.params
+#define C  imgdata.color
+#define T  imgdata.thumbnail
+#define MN imgdata.makernotes
+#define IO libraw_internal_data.internal_output_params
+#define ID libraw_internal_data.internal_data
+
+#define makeIs(idx) (imgdata.idata.maker_index == idx)
+#define mnCamID imgdata.lens.makernotes.CamID
+
+#define EXCEPTION_HANDLER(e)                                                   \
+  do                                                                           \
+  {                                                                            \
+    switch (e)                                                                 \
+    {                                                                          \
+    case LIBRAW_EXCEPTION_MEMPOOL:                                             \
+      recycle();                                                               \
+      return LIBRAW_MEMPOOL_OVERFLOW;                                          \
+    case LIBRAW_EXCEPTION_ALLOC:                                               \
+      recycle();                                                               \
+      return LIBRAW_UNSUFFICIENT_MEMORY;                                       \
+    case LIBRAW_EXCEPTION_TOOBIG:                                              \
+      recycle();                                                               \
+      return LIBRAW_TOO_BIG;                                                   \
+    case LIBRAW_EXCEPTION_DECODE_RAW:                                          \
+    case LIBRAW_EXCEPTION_DECODE_JPEG:                                         \
+      recycle();                                                               \
+      return LIBRAW_DATA_ERROR;                                                \
+    case LIBRAW_EXCEPTION_DECODE_JPEG2000:                                     \
+      recycle();                                                               \
+      return LIBRAW_DATA_ERROR;                                                \
+    case LIBRAW_EXCEPTION_IO_EOF:                                              \
+    case LIBRAW_EXCEPTION_IO_CORRUPT:                                          \
+      recycle();                                                               \
+      return LIBRAW_IO_ERROR;                                                  \
+    case LIBRAW_EXCEPTION_CANCELLED_BY_CALLBACK:                               \
+      recycle();                                                               \
+      return LIBRAW_CANCELLED_BY_CALLBACK;                                     \
+    case LIBRAW_EXCEPTION_BAD_CROP:                                            \
+      recycle();                                                               \
+      return LIBRAW_BAD_CROP;                                                  \
+    default:                                                                   \
+      return LIBRAW_UNSPECIFIED_ERROR;                                         \
+    }                                                                          \
+  } while (0)
+
+// copy-n-paste from image pipe
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
+#define LIM(x, min, max) MAX(min, MIN(x, max))
+#ifndef CLIP
+#define CLIP(x) LIM(x, 0, 65535)
+#endif
+#define THUMB_READ_BEYOND 16384
+
+#define ZERO(a) memset(&a, 0, sizeof(a))
+
+#endif

+ 405 - 0
raw.mod/libraw/internal/libraw_internal_funcs.h

@@ -0,0 +1,405 @@
+/* -*- C++ -*-
+ * File: libraw_internal_funcs.h
+ * Copyright 2008-2021 LibRaw LLC ([email protected])
+ * Created: Sat Mar  14, 2008
+
+LibRaw is free software; you can redistribute it and/or modify
+it under the terms of the one of two licenses as you choose:
+
+1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1
+   (See file LICENSE.LGPL provided in LibRaw distribution archive for details).
+
+2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+   (See file LICENSE.CDDL provided in LibRaw distribution archive for details).
+
+ */
+
+#ifndef _LIBRAW_INTERNAL_FUNCS_H
+#define _LIBRAW_INTERNAL_FUNCS_H
+
+#ifndef LIBRAW_LIBRARY_BUILD
+#error "This file should be used only for libraw library build"
+#else
+
+/* inline functions */
+	static int stread(char *buf, size_t len, LibRaw_abstract_datastream *fp);
+	static int getwords(char *line, char *words[], int maxwords, int maxlen);
+	static void remove_trailing_spaces(char *string, size_t len);
+	static void remove_caseSubstr(char *string, char *remove);
+	static void removeExcessiveSpaces(char *string);
+	static void trimSpaces(char *s);
+/* static tables/variables */
+	static libraw_static_table_t tagtype_dataunit_bytes;
+	static libraw_static_table_t Canon_wbi2std;
+	static libraw_static_table_t Canon_KeyIsZero_Len2048_linenums_2_StdWBi;
+	static libraw_static_table_t Canon_KeyIs0x0410_Len3072_linenums_2_StdWBi;
+	static libraw_static_table_t Canon_KeyIs0x0410_Len2048_linenums_2_StdWBi;
+	static libraw_static_table_t Canon_D30_linenums_2_StdWBi;
+	static libraw_static_table_t Canon_G9_linenums_2_StdWBi;
+
+	static libraw_static_table_t Fuji_wb_list1;
+	static libraw_static_table_t FujiCCT_K;
+	static libraw_static_table_t Fuji_wb_list2;
+
+	static libraw_static_table_t Pentax_wb_list1;
+	static libraw_static_table_t Pentax_wb_list2;
+
+	static libraw_static_table_t Oly_wb_list1;
+	static libraw_static_table_t Oly_wb_list2;
+
+	static libraw_static_table_t Sony_SRF_wb_list;
+	static libraw_static_table_t Sony_SR2_wb_list;
+	static libraw_static_table_t Sony_SR2_wb_list1;
+/*  */
+	int	find_ifd_by_offset(int );
+	ushort	sget2 (uchar *s);
+	ushort	sget2Rev(uchar *s);
+	libraw_area_t	get_CanonArea();
+	int	parseCR3(INT64 oAtomList, INT64 szAtomList, short &nesting, char *AtomNameStack, short& nTrack, short &TrackType);
+	void	selectCRXTrack(short maxTrack);
+	void	setCanonBodyFeatures (unsigned long long id);
+	void	processCanonCameraInfo (unsigned long long id, uchar *CameraInfo, unsigned maxlen, unsigned type, unsigned dng_writer);
+	static float _CanonConvertAperture(ushort in);
+	void	Canon_CameraSettings(unsigned len);
+	void	Canon_WBpresets (int skip1, int skip2);
+	void	Canon_WBCTpresets (short WBCTversion);
+	void	parseCanonMakernotes (unsigned tag, unsigned type, unsigned len, unsigned dng_writer);
+	void	processNikonLensData (uchar *LensData, unsigned len);
+	void	Nikon_NRW_WBtag (int wb, int skip);
+	void	parseNikonMakernote (int base, int uptag, unsigned dng_writer);
+	void	parseEpsonMakernote (int base, int uptag, unsigned dng_writer);
+	void	parseSigmaMakernote (int base, int uptag, unsigned dng_writer);
+	void	setOlympusBodyFeatures (unsigned long long id);
+	void	getOlympus_CameraType2 ();
+	void	getOlympus_SensorTemperature (unsigned len);
+	void	parseOlympus_Equipment (unsigned tag, unsigned type, unsigned len, unsigned dng_writer);
+	void	parseOlympus_CameraSettings (int base, unsigned tag, unsigned type, unsigned len, unsigned dng_writer);
+	void	parseOlympus_ImageProcessing (unsigned tag, unsigned type, unsigned len, unsigned dng_writer);
+	void	parseOlympus_RawInfo (unsigned tag, unsigned type, unsigned len, unsigned dng_writer);
+	void parseOlympusMakernotes (int base, unsigned tag, unsigned type, unsigned len, unsigned dng_writer);
+	void	setPhaseOneFeatures (unsigned long long id);
+	void	setPentaxBodyFeatures (unsigned long long id);
+	void	PentaxISO (ushort c);
+	void	PentaxLensInfo (unsigned long long id, unsigned len);
+	void	parsePentaxMakernotes(int base, unsigned tag, unsigned type, unsigned len, unsigned dng_writer);
+	void	parseRicohMakernotes(int base, unsigned tag, unsigned type, unsigned len, unsigned dng_writer);
+	void	parseSamsungMakernotes(int base, unsigned tag, unsigned type, unsigned len, unsigned dng_writer);
+#ifdef LIBRAW_OLD_VIDEO_SUPPORT
+	void	fixupArri();
+#endif
+	void	setSonyBodyFeatures (unsigned long long id);
+	void	parseSonyLensType2 (uchar a, uchar b);
+	void	parseSonyLensFeatures (uchar a, uchar b);
+	void	process_Sony_0x0116 (uchar * buf, ushort, unsigned long long id);
+	void	process_Sony_0x2010 (uchar * buf, ushort);
+	void	process_Sony_0x9050 (uchar * buf, ushort, unsigned long long id);
+	void	process_Sony_0x9400 (uchar * buf, ushort, unsigned long long id);
+	void	process_Sony_0x9402 (uchar * buf, ushort);
+	void	process_Sony_0x9403 (uchar * buf, ushort);
+	void	process_Sony_0x9406 (uchar * buf, ushort);
+	void	process_Sony_0x940c (uchar * buf, ushort);
+	void	process_Sony_0x940e (uchar * buf, ushort, unsigned long long id);
+	void	parseSonyMakernotes (int base, unsigned tag, unsigned type, unsigned len, unsigned dng_writer,
+                               uchar *&table_buf_0x0116, ushort &table_buf_0x0116_len,
+                               uchar *&table_buf_0x2010, ushort &table_buf_0x2010_len,
+                               uchar *&table_buf_0x9050, ushort &table_buf_0x9050_len,
+                               uchar *&table_buf_0x9400, ushort &table_buf_0x9400_len,
+                               uchar *&table_buf_0x9402, ushort &table_buf_0x9402_len,
+                               uchar *&table_buf_0x9403, ushort &table_buf_0x9403_len,
+                               uchar *&table_buf_0x9406, ushort &table_buf_0x9406_len,
+                               uchar *&table_buf_0x940c, ushort &table_buf_0x940c_len,
+                               uchar *&table_buf_0x940e, ushort &table_buf_0x940e_len);
+	void	parseSonySR2 (uchar *cbuf_SR2, unsigned SR2SubIFDOffset, unsigned SR2SubIFDLength, unsigned dng_writer);
+	void	parseSonySRF (unsigned len);
+	void	parseFujiMakernotes (unsigned tag, unsigned type, unsigned len, unsigned dng_writer);
+	const char* HassyRawFormat_idx2HR(unsigned idx);
+	void	process_Hassy_Lens (int LensMount);
+	void parseHassyModel ();
+
+	void	setLeicaBodyFeatures(int LeicaMakernoteSignature);
+	void	parseLeicaLensID();
+	int 	parseLeicaLensName(unsigned len);
+	int 	parseLeicaInternalBodySerial(unsigned len);
+	void	parseLeicaMakernote(int base, int uptag, unsigned MakernoteTagType);
+	void	parseAdobePanoMakernote ();
+	void	parseAdobeRAFMakernote ();
+	void	GetNormalizedModel ();
+	void	SetStandardIlluminants (unsigned, const char* );
+
+	ushort      get2();
+	unsigned    sget4 (uchar *s);
+	unsigned    getint(int type);
+	float       int_to_float (int i);
+	double      getreal (int type);
+	double      sgetreal(int type, uchar *s);
+	void        read_shorts (ushort *pixel, unsigned count);
+
+/* Canon P&S cameras */
+	void        canon_600_fixed_wb (int temp);
+	int         canon_600_color (int ratio[2], int mar);
+	void        canon_600_auto_wb();
+	void        canon_600_coeff();
+	void        canon_600_load_raw();
+	void        canon_600_correct();
+	int         canon_s2is();
+	void        parse_ciff (int offset, int length, int);
+	void        ciff_block_1030();
+
+
+// LJPEG decoder
+	unsigned    getbithuff (int nbits, ushort *huff);
+	ushort*     make_decoder_ref (const uchar **source);
+	ushort*     make_decoder (const uchar *source);
+	int         ljpeg_start (struct jhead *jh, int info_only);
+	void        ljpeg_end(struct jhead *jh);
+	int         ljpeg_diff (ushort *huff);
+	ushort *    ljpeg_row (int jrow, struct jhead *jh);
+	ushort *    ljpeg_row_unrolled (int jrow, struct jhead *jh);
+	void	    ljpeg_idct (struct jhead *jh);
+	unsigned    ph1_bithuff (int nbits, ushort *huff);
+
+// Canon DSLRs
+	void        crw_init_tables (unsigned table, ushort *huff[2]);
+	int         canon_has_lowbits();
+	void        canon_load_raw();
+	void        lossless_jpeg_load_raw();
+	void        canon_sraw_load_raw();
+// Adobe DNG
+	void        adobe_copy_pixel (unsigned int row, unsigned int col, ushort **rp);
+	void        lossless_dng_load_raw();
+	void        deflate_dng_load_raw();
+	void        packed_dng_load_raw();
+    void        uncompressed_fp_dng_load_raw();
+	void        lossy_dng_load_raw();
+//void        adobe_dng_load_raw_nc();
+
+// Pentax
+	void        pentax_load_raw();
+	void	pentax_4shot_load_raw();
+
+	void        pentax_tree();
+
+// Nikon (and Minolta Z2)
+	void        nikon_load_raw();
+	void        nikon_read_curve();
+	void        nikon_load_striped_packed_raw();
+	void        nikon_load_padded_packed_raw();
+	void        nikon_load_sraw();
+	void        nikon_yuv_load_raw();
+	void        nikon_coolscan_load_raw();
+	int         nikon_e995();
+	int         nikon_e2100();
+	void        nikon_3700();
+	int         minolta_z2();
+//	void        nikon_e2100_load_raw();
+
+// Fuji
+//	void        fuji_load_raw();
+	int         guess_RAFDataGeneration (uchar *RAFData_start);
+	void        parse_fuji (int offset);
+    void        parse_fuji_thumbnail(int offset);
+#ifdef LIBRAW_OLD_VIDEO_SUPPORT
+// RedCine
+	void        parse_redcine();
+	void        redcine_load_raw();
+#endif
+
+// Rollei
+	void        rollei_load_raw();
+	void        parse_rollei();
+
+// Contax
+	void        parse_kyocera ();
+
+// MF backs
+//int         bayer (unsigned row, unsigned col);
+	int         p1raw(unsigned,unsigned);
+	void        phase_one_flat_field (int is_float, int nc);
+	int 	    p1rawc(unsigned row, unsigned col, unsigned& count);
+	void 	    phase_one_fix_col_pixel_avg(unsigned row, unsigned col);
+	void 	    phase_one_fix_pixel_grad(unsigned row, unsigned col);
+	void        phase_one_load_raw();
+	unsigned    ph1_bits (int nbits);
+	void        phase_one_load_raw_c();
+	void        hasselblad_load_raw();
+	void        leaf_hdr_load_raw();
+	void        sinar_4shot_load_raw();
+	void        imacon_full_load_raw();
+	void        hasselblad_full_load_raw();
+	void        packed_load_raw();
+	float       find_green(int,int,int,int);
+	void        unpacked_load_raw();
+	void        unpacked_load_raw_FujiDBP();
+	void        unpacked_load_raw_reversed();
+	void        unpacked_load_raw_fuji_f700s20();
+	void        parse_sinar_ia();
+	void        parse_phase_one (int base);
+
+// Misc P&S cameras
+	void        parse_broadcom();
+	void        broadcom_load_raw();
+	void        nokia_load_raw();
+	void        android_loose_load_raw();
+	void        android_tight_load_raw();
+#ifdef LIBRAW_OLD_VIDEO_SUPPORT
+    void        canon_rmf_load_raw();
+#endif
+	unsigned    pana_data (int nb, unsigned *bytes);
+	void        panasonic_load_raw();
+//	void        panasonic_16x10_load_raw();
+	void        olympus_load_raw();
+//	void        olympus_cseries_load_raw();
+	void        minolta_rd175_load_raw();
+	void        quicktake_100_load_raw();
+	const int*  make_decoder_int (const int *source, int level);
+	int         radc_token (int tree);
+	void        kodak_radc_load_raw();
+	void        kodak_jpeg_load_raw();
+	void        kodak_dc120_load_raw();
+	void        eight_bit_load_raw();
+	void        smal_decode_segment (unsigned seg[2][2], int holes);
+	void        smal_v6_load_raw();
+	int         median4 (int *p);
+	void        fill_holes (int holes);
+	void        smal_v9_load_raw();
+	void        parse_riff();
+	void        parse_cine();
+	void        parse_smal (int offset, int fsize);
+	int         parse_jpeg (int offset);
+
+// Kodak
+	void        kodak_262_load_raw();
+	int         kodak_65000_decode (short *out, int bsize);
+	void        kodak_65000_load_raw();
+	void        kodak_rgb_load_raw();
+	void        kodak_ycbcr_load_raw();
+//	void        kodak_yrgb_load_raw();
+	void        kodak_c330_load_raw();
+	void        kodak_c603_load_raw();
+	void        kodak_rgb_load_thumb();
+	void        kodak_ycbcr_load_thumb();
+	void        vc5_dng_load_raw_placeholder();
+// It's a Sony (and K&M)
+	void        sony_decrypt (unsigned *data, int len, int start, int key);
+	void        sony_load_raw();
+	void        sony_arw_load_raw();
+	void        sony_arw2_load_raw();
+	void        sony_arq_load_raw();
+	void        sony_ljpeg_load_raw();
+	void        samsung_load_raw();
+	void        samsung2_load_raw();
+	void        samsung3_load_raw();
+	void        parse_minolta (int base);
+
+#ifdef USE_X3FTOOLS
+// Foveon/Sigma
+// We always have x3f code compiled in!
+	void        parse_x3f();
+	void        x3f_load_raw();
+	void        x3f_dpq_interpolate_rg();
+	void        x3f_dpq_interpolate_af(int xstep, int ystep, int scale); // 1x1 af pixels
+	void        x3f_dpq_interpolate_af_sd(int xstart,int ystart, int xend, int yend, int xstep, int ystep, int scale); // sd Quattro interpolation
+#else
+	void        parse_x3f() {}
+	void        x3f_load_raw(){}
+#endif
+#ifdef USE_6BY9RPI
+	void		rpi_load_raw8();
+	void		rpi_load_raw12();
+	void		rpi_load_raw14();
+	void		rpi_load_raw16();
+	void		parse_raspberrypi();
+#endif
+
+// CAM/RGB
+	void        pseudoinverse (double (*in)[3], double (*out)[3], int size);
+	void        simple_coeff (int index);
+
+// Openp
+	char** malloc_omp_buffers(int buffer_count, size_t buffer_size, const char* where);
+	void free_omp_buffers(char** buffers, int buffer_count);
+
+
+// Tiff/Exif parsers
+	void        tiff_get (unsigned base,unsigned *tag, unsigned *type, unsigned *len, unsigned *save);
+	short       tiff_sget(unsigned save, uchar *buf, unsigned buf_len, INT64 *tag_offset,
+                          unsigned *tag_id, unsigned *tag_type, INT64 *tag_dataoffset,
+                          unsigned *tag_datalen, int *tag_dataunit_len);
+	void        parse_thumb_note (int base, unsigned toff, unsigned tlen);
+	void        parse_makernote (int base, int uptag);
+	void        parse_makernote_0xc634(int base, int uptag, unsigned dng_writer);
+	void        parse_exif (int base);
+	void        parse_exif_interop(int base);
+	void        linear_table(unsigned len);
+	void        Kodak_DCR_WBtags(int wb, unsigned type, int wbi);
+	void        Kodak_KDC_WBtags(int wb, int wbi);
+	short       KodakIllumMatrix (unsigned type, float *romm_camIllum);
+	void        parse_kodak_ifd (int base);
+	int         parse_tiff_ifd (int base);
+	int         parse_tiff (int base);
+	void        apply_tiff(void);
+	void        parse_gps (int base);
+	void        parse_gps_libraw(int base);
+	void        aRGB_coeff(double aRGB_cam[3][3]);
+	void        romm_coeff(float romm_cam[3][3]);
+	void        parse_mos (INT64 offset);
+	void        parse_qt (int end);
+	void        get_timestamp (int reversed);
+
+// The identify
+    short       guess_byte_order (int words);
+	void		identify_process_dng_fields();
+	void		identify_finetune_pentax();
+	void		identify_finetune_by_filesize(int);
+	void		identify_finetune_dcr(char head[64],int,int);
+// Tiff writer
+	void        tiff_set(struct tiff_hdr *th, ushort *ntag,ushort tag, ushort type, int count, int val);
+	void        tiff_head (struct tiff_hdr *th, int full);
+
+// split AHD code
+	void ahd_interpolate_green_h_and_v(int top, int left, ushort (*out_rgb)[LIBRAW_AHD_TILE][LIBRAW_AHD_TILE][3]);
+	void ahd_interpolate_r_and_b_in_rgb_and_convert_to_cielab(int top, int left, ushort (*inout_rgb)[LIBRAW_AHD_TILE][3], short (*out_lab)[LIBRAW_AHD_TILE][3]);
+	void ahd_interpolate_r_and_b_and_convert_to_cielab(int top, int left, ushort (*inout_rgb)[LIBRAW_AHD_TILE][LIBRAW_AHD_TILE][3], short (*out_lab)[LIBRAW_AHD_TILE][LIBRAW_AHD_TILE][3]);
+	void ahd_interpolate_build_homogeneity_map(int top, int left, short (*lab)[LIBRAW_AHD_TILE][LIBRAW_AHD_TILE][3], char (*out_homogeneity_map)[LIBRAW_AHD_TILE][2]);
+	void ahd_interpolate_combine_homogeneous_pixels(int top, int left, ushort (*rgb)[LIBRAW_AHD_TILE][LIBRAW_AHD_TILE][3], char (*homogeneity_map)[LIBRAW_AHD_TILE][2]);
+
+	void init_fuji_compr(struct fuji_compressed_params* info);
+	void init_fuji_block(struct fuji_compressed_block* info, const struct fuji_compressed_params *params, INT64 raw_offset, unsigned dsize);
+	void copy_line_to_xtrans(struct fuji_compressed_block* info, int cur_line, int cur_block, int cur_block_width);
+	void copy_line_to_bayer(struct fuji_compressed_block* info, int cur_line, int cur_block, int cur_block_width);
+	void xtrans_decode_block(struct fuji_compressed_block* info, const struct fuji_compressed_params *params, int cur_line);
+	void fuji_bayer_decode_block(struct fuji_compressed_block* info, const struct fuji_compressed_params *params, int cur_line);
+	void fuji_compressed_load_raw();
+	void fuji_14bit_load_raw();
+	void parse_fuji_compressed_header();
+	void crxLoadRaw();
+	int  crxParseImageHeader(uchar *cmp1TagData, int nTrack);
+	void panasonicC6_load_raw();
+	void panasonicC7_load_raw();
+
+	void nikon_14bit_load_raw();
+
+// DCB
+	void  	dcb_pp();
+	void  	dcb_copy_to_buffer(float (*image2)[3]);
+	void  	dcb_restore_from_buffer(float (*image2)[3]);
+	void  	dcb_color();
+	void  	dcb_color_full();
+	void  	dcb_map();
+	void  	dcb_correction();
+	void  	dcb_correction2();
+	void  	dcb_refinement();
+	void  	rgb_to_lch(double (*image3)[3]);
+	void  	lch_to_rgb(double (*image3)[3]);
+	void  	fbdd_correction();
+	void  	fbdd_correction2(double (*image3)[3]);
+	void  	fbdd_green();
+	void  	dcb_ver(float (*image3)[3]);
+	void 	dcb_hor(float (*image2)[3]);
+	void 	dcb_color2(float (*image2)[3]);
+	void 	dcb_color3(float (*image3)[3]);
+	void 	dcb_decide(float (*image2)[3], float (*image3)[3]);
+	void 	dcb_nyquist();
+#endif
+
+#endif

+ 215 - 0
raw.mod/libraw/internal/var_defines.h

@@ -0,0 +1,215 @@
+/* -*- C++ -*-
+ * File: var_defines.h
+ * Copyright 2008-2021 LibRaw LLC ([email protected])
+ * Created: Sat Mar  8, 2008
+ *
+ * LibRaw redefinitions of dcraw internal variables
+
+LibRaw is free software; you can redistribute it and/or modify
+it under the terms of the one of two licenses as you choose:
+
+1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1
+   (See file LICENSE.LGPL provided in LibRaw distribution archive for details).
+
+2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+   (See file LICENSE.CDDL provided in LibRaw distribution archive for details).
+
+ */
+
+#ifndef VAR_DEFINES_H
+#define VAR_DEFINES_H
+
+
+// imgdata.idata
+#define make              (imgdata.idata.make)
+#define model             (imgdata.idata.model)
+#define software          (imgdata.idata.software)
+#define is_raw            (imgdata.idata.raw_count)
+#define dng_version       (imgdata.idata.dng_version)
+#define is_foveon         (imgdata.idata.is_foveon)
+#define colors            (imgdata.idata.colors)
+#define cdesc             (imgdata.idata.cdesc)
+#define filters           (imgdata.idata.filters)
+#define xtrans            (imgdata.idata.xtrans)
+#define xtrans_abs        (imgdata.idata.xtrans_abs)
+#define xmpdata           (imgdata.idata.xmpdata)
+#define xmplen            (imgdata.idata.xmplen)
+//imgdata image
+#define image             (imgdata.image)
+#define raw_image         (imgdata.rawdata.raw_image)
+#define color_image       (imgdata.rawdata.color_image)
+#define normalized_make   (imgdata.idata.normalized_make)
+#define normalized_model  (imgdata.idata.normalized_model)
+#define maker_index       (imgdata.idata.maker_index)
+
+// imgdata.sizes
+#define raw_height        (imgdata.sizes.raw_height)
+#define raw_width         (imgdata.sizes.raw_width)
+#define raw_pitch         (imgdata.sizes.raw_pitch)
+#define height            (imgdata.sizes.height)
+#define width             (imgdata.sizes.width)
+#define top_margin        (imgdata.sizes.top_margin)
+#define left_margin       (imgdata.sizes.left_margin)
+#define bottom_margin     (imgdata.sizes.bottom_margin)
+#define right_margin      (imgdata.sizes.right_margin)
+#define iheight           (imgdata.sizes.iheight)
+#define iwidth            (imgdata.sizes.iwidth)
+#define pixel_aspect      (imgdata.sizes.pixel_aspect)
+#define flip              (imgdata.sizes.flip)
+#define mask              (imgdata.sizes.mask)
+#define raw_stride        (libraw_internal_data.unpacker_data.raw_stride)
+
+//imgdata.color
+#define white             (imgdata.color.white)
+#define cam_mul           (imgdata.color.cam_mul)
+#define pre_mul           (imgdata.color.pre_mul)
+#define cmatrix           (imgdata.color.cmatrix)
+#define rgb_cam           (imgdata.color.rgb_cam)
+#ifndef SRC_USES_CURVE
+#define curve             (imgdata.color.curve)
+#endif
+#ifndef SRC_USES_BLACK
+#define black             (imgdata.color.black)
+#define cblack            (imgdata.color.cblack)
+#endif
+#define maximum           (imgdata.color.maximum)
+#define channel_maximum   (imgdata.color.channel_maximum)
+#define profile_length    (imgdata.color.profile_length)
+#define color_flags       (imgdata.color.color_flags)
+#define ph1               (imgdata.color.phase_one_data)
+#define flash_used        (imgdata.color.flash_used)
+#define canon_ev          (imgdata.color.canon_ev)
+#define model2            (imgdata.color.model2)
+
+//imgdata.thumbnail
+#define thumb_width       (imgdata.thumbnail.twidth)
+#define thumb_height      (imgdata.thumbnail.theight)
+#define thumb_length      (imgdata.thumbnail.tlength)
+
+
+//imgdata.others
+#define iso_speed         (imgdata.other.iso_speed)
+#define shutter           (imgdata.other.shutter)
+#define aperture          (imgdata.other.aperture)
+#define focal_len         (imgdata.other.focal_len)
+#define timestamp         (imgdata.other.timestamp)
+#define shot_order        (imgdata.other.shot_order)
+#define gpsdata           (imgdata.other.gpsdata)
+#define desc              (imgdata.other.desc)
+#define artist            (imgdata.other.artist)
+
+#define FujiCropMode      (imgdata.makernotes.fuji.CropMode)
+
+//imgdata.output
+#define greybox           (imgdata.params.greybox)
+#define cropbox           (imgdata.params.cropbox)
+#define aber              (imgdata.params.aber)
+#define gamm              (imgdata.params.gamm)
+#define user_mul          (imgdata.params.user_mul)
+#define shot_select       (imgdata.rawparams.shot_select)
+#define bright            (imgdata.params.bright)
+#define threshold         (imgdata.params.threshold)
+#define half_size         (imgdata.params.half_size)
+#define four_color_rgb    (imgdata.params.four_color_rgb)
+#define highlight         (imgdata.params.highlight)
+#define use_auto_wb       (imgdata.params.use_auto_wb)
+#define use_camera_wb     (imgdata.params.use_camera_wb)
+#define use_camera_matrix (imgdata.params.use_camera_matrix)
+#define output_color      (imgdata.params.output_color)
+#define output_bps        (imgdata.params.output_bps)
+#define gamma_16bit       (imgdata.params.gamma_16bit)
+#define output_tiff       (imgdata.params.output_tiff)
+#define med_passes        (imgdata.params.med_passes)
+#define no_auto_bright    (imgdata.params.no_auto_bright)
+#define auto_bright_thr   (imgdata.params.auto_bright_thr)
+#define use_fuji_rotate   (imgdata.params.use_fuji_rotate)
+#define filtering_mode    (imgdata.params.filtering_mode)
+
+// DCB
+#define dcb_iterations    (imgdata.params.iterations)
+#define dcb_enhance_fl    (imgdata.params.dcb_enhance)
+#define fbdd_noiserd      (imgdata.params.fbdd_noiserd)
+
+//libraw_internal_data.internal_data
+#define meta_data         (libraw_internal_data.internal_data.meta_data)
+#define ifp               libraw_internal_data.internal_data.input
+#define ifname            ((char*)libraw_internal_data.internal_data.input->fname())
+#define ofp               libraw_internal_data.internal_data.output
+#define profile_offset    (libraw_internal_data.internal_data.profile_offset)
+#define thumb_offset      (libraw_internal_data.internal_data.toffset)
+#define pana_black        (libraw_internal_data.internal_data.pana_black)
+
+//libraw_internal_data.internal_output_params
+#define mix_green         (libraw_internal_data.internal_output_params.mix_green)
+#define raw_color         (libraw_internal_data.internal_output_params.raw_color)
+#define use_gamma         (libraw_internal_data.internal_output_params.use_gamma)
+#define zero_is_bad       (libraw_internal_data.internal_output_params.zero_is_bad)
+#ifndef SRC_USES_SHRINK
+#define shrink            (libraw_internal_data.internal_output_params.shrink)
+#endif
+#define fuji_width        (libraw_internal_data.internal_output_params.fuji_width)
+
+
+//libraw_internal_data.output_data
+#define histogram         (libraw_internal_data.output_data.histogram)
+#define oprof             (libraw_internal_data.output_data.oprof)
+
+//libraw_internal_data.identify_data
+#define exif_cfa          (libraw_internal_data.identify_data.olympus_exif_cfa)
+#define unique_id         (libraw_internal_data.identify_data.unique_id)
+#define OlyID             (libraw_internal_data.identify_data.OlyID)
+#define tiff_nifds        (libraw_internal_data.identify_data.tiff_nifds)
+#define tiff_flip         (libraw_internal_data.identify_data.tiff_flip)
+#define metadata_blocks   (libraw_internal_data.identify_data.metadata_blocks)
+
+//libraw_internal_data.unpacker_data
+#define order             (libraw_internal_data.unpacker_data.order)
+#define data_error        (libraw_internal_data.unpacker_data.data_error)
+#define cr2_slice         (libraw_internal_data.unpacker_data.cr2_slice)
+#define sraw_mul          (libraw_internal_data.unpacker_data.sraw_mul)
+#define kodak_cbpp        (libraw_internal_data.unpacker_data.kodak_cbpp)
+#define strip_offset      (libraw_internal_data.unpacker_data.strip_offset)
+#define data_offset       (libraw_internal_data.unpacker_data.data_offset)
+#define data_size         (libraw_internal_data.unpacker_data.data_size)
+#define meta_offset       (libraw_internal_data.unpacker_data.meta_offset)
+#define meta_length       (libraw_internal_data.unpacker_data.meta_length)
+#define thumb_misc        (libraw_internal_data.unpacker_data.thumb_misc)
+#define fuji_layout       (libraw_internal_data.unpacker_data.fuji_layout)
+#define tiff_samples      (libraw_internal_data.unpacker_data.tiff_samples)
+#define tiff_bps          (libraw_internal_data.unpacker_data.tiff_bps)
+#define tiff_compress     (libraw_internal_data.unpacker_data.tiff_compress)
+#define tiff_sampleformat (libraw_internal_data.unpacker_data.tiff_sampleformat)
+#define zero_after_ff     (libraw_internal_data.unpacker_data.zero_after_ff)
+#define tile_width        (libraw_internal_data.unpacker_data.tile_width)
+#define tile_length       (libraw_internal_data.unpacker_data.tile_length)
+#define load_flags        (libraw_internal_data.unpacker_data.load_flags)
+#define pana_encoding     (libraw_internal_data.unpacker_data.pana_encoding)
+#define pana_bpp          (libraw_internal_data.unpacker_data.pana_bpp)
+#define CM_found          (libraw_internal_data.unpacker_data.CM_found)
+
+#define is_NikonTransfer  (libraw_internal_data.unpacker_data.is_NikonTransfer)
+#define is_Olympus        (libraw_internal_data.unpacker_data.is_Olympus)
+#define OlympusDNG_SubDirOffsetValid (libraw_internal_data.unpacker_data.OlympusDNG_SubDirOffsetValid)
+#define is_Sony           (libraw_internal_data.unpacker_data.is_Sony)
+#define is_PentaxRicohMakernotes    (libraw_internal_data.unpacker_data.is_PentaxRicohMakernotes)
+#define is_pana_raw       (libraw_internal_data.unpacker_data.is_pana_raw)
+
+
+#ifdef LIBRAW_IO_REDEFINED
+#define fread(ptr,size,n,stream)   stream->read(ptr,size,n)
+#define fseek(stream,o,w)          stream->seek(o,w)
+#define fseeko(stream,o,w)         stream->seek(o,w)
+#define ftell(stream)              stream->tell()
+#define ftello(stream)             stream->tell()
+#define feof(stream)               stream->eof()
+#ifdef getc
+#undef getc
+#endif
+#define getc(stream)               stream->get_char()
+#define fgetc(stream)              stream->get_char()
+#define fgetcb(stream)             stream->get_char_buf()
+#define fgets(str,n,stream)        stream->gets(str,n)
+#define fscanf(stream,fmt,ptr)     stream->scanf_one(fmt,ptr)
+#endif
+
+#endif

+ 539 - 0
raw.mod/libraw/internal/x3f_tools.h

@@ -0,0 +1,539 @@
+/* -*- C++ -*-
+ * Copyright 2019-2021 LibRaw LLC ([email protected])
+ *
+
+ LibRaw is free software; you can redistribute it and/or modify
+ it under the terms of the one of two licenses as you choose:
+
+1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1
+   (See file LICENSE.LGPL provided in LibRaw distribution archive for details).
+
+2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+   (See file LICENSE.CDDL provided in LibRaw distribution archive for details).
+ */
+
+/* Library for accessing X3F Files
+----------------------------------------------------------------
+BSD-style License
+----------------------------------------------------------------
+
+* Copyright (c) 2010, Roland Karlsson ([email protected])
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*     * Redistributions of source code must retain the above copyright
+*       notice, this list of conditions and the following disclaimer.
+*     * Redistributions in binary form must reproduce the above copyright
+*       notice, this list of conditions and the following disclaimer in the
+*       documentation and/or other materials provided with the distribution.
+*     * Neither the name of the organization nor the
+*       names of its contributors may be used to endorse or promote products
+*       derived from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY ROLAND KARLSSON ''AS IS'' AND ANY
+* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+* DISCLAIMED. IN NO EVENT SHALL ROLAND KARLSSON BE LIABLE FOR ANY
+* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+#ifndef X3F_TOOLS_H
+#define X3F_TOOLS_H
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <math.h>
+#include <stdio.h>
+#include "../libraw/libraw_datastream.h"
+
+/* From X3F_IO.H */
+
+#define SIZE_UNIQUE_IDENTIFIER 16
+#define SIZE_WHITE_BALANCE 32
+#define SIZE_COLOR_MODE 32
+#define NUM_EXT_DATA_2_1 32
+#define NUM_EXT_DATA_3_0 64
+#define NUM_EXT_DATA NUM_EXT_DATA_3_0
+
+#define X3F_VERSION(MAJ, MIN) (uint32_t)(((MAJ) << 16) + MIN)
+#define X3F_VERSION_2_0 X3F_VERSION(2, 0)
+#define X3F_VERSION_2_1 X3F_VERSION(2, 1)
+#define X3F_VERSION_2_2 X3F_VERSION(2, 2)
+#define X3F_VERSION_2_3 X3F_VERSION(2, 3)
+#define X3F_VERSION_3_0 X3F_VERSION(3, 0)
+#define X3F_VERSION_4_0 X3F_VERSION(4, 0)
+
+/* Main file identifier */
+#define X3F_FOVb (uint32_t)(0x62564f46)
+/* Directory identifier */
+#define X3F_SECd (uint32_t)(0x64434553)
+/* Property section identifiers */
+#define X3F_PROP (uint32_t)(0x504f5250)
+#define X3F_SECp (uint32_t)(0x70434553)
+/* Image section identifiers */
+#define X3F_IMAG (uint32_t)(0x46414d49)
+#define X3F_IMA2 (uint32_t)(0x32414d49)
+#define X3F_SECi (uint32_t)(0x69434553)
+/* CAMF section identifiers */
+#define X3F_CAMF (uint32_t)(0x464d4143)
+#define X3F_SECc (uint32_t)(0x63434553)
+/* CAMF entry identifiers */
+#define X3F_CMbP (uint32_t)(0x50624d43)
+#define X3F_CMbT (uint32_t)(0x54624d43)
+#define X3F_CMbM (uint32_t)(0x4d624d43)
+#define X3F_CMb (uint32_t)(0x00624d43)
+/* SDQ section identifiers ? - TODO */
+#define X3F_SPPA (uint32_t)(0x41505053)
+#define X3F_SECs (uint32_t)(0x73434553)
+
+#define X3F_IMAGE_THUMB_PLAIN (uint32_t)(0x00020003)
+#define X3F_IMAGE_THUMB_HUFFMAN (uint32_t)(0x0002000b)
+#define X3F_IMAGE_THUMB_JPEG (uint32_t)(0x00020012)
+#define X3F_IMAGE_THUMB_SDQ (uint32_t)(0x00020019) /* SDQ ? - TODO */
+
+#define X3F_IMAGE_RAW_HUFFMAN_X530 (uint32_t)(0x00030005)
+#define X3F_IMAGE_RAW_HUFFMAN_10BIT (uint32_t)(0x00030006)
+#define X3F_IMAGE_RAW_TRUE (uint32_t)(0x0003001e)
+#define X3F_IMAGE_RAW_MERRILL (uint32_t)(0x0001001e)
+#define X3F_IMAGE_RAW_QUATTRO (uint32_t)(0x00010023)
+#define X3F_IMAGE_RAW_SDQ (uint32_t)(0x00010025)
+#define X3F_IMAGE_RAW_SDQH (uint32_t)(0x00010027)
+#define X3F_IMAGE_RAW_SDQH2 (uint32_t)(0x00010029)
+
+#define X3F_IMAGE_HEADER_SIZE 28
+#define X3F_CAMF_HEADER_SIZE 28
+#define X3F_PROPERTY_LIST_HEADER_SIZE 24
+
+typedef uint16_t utf16_t;
+
+typedef int bool_t;
+
+typedef enum x3f_extended_types_e
+{
+  X3F_EXT_TYPE_NONE = 0,
+  X3F_EXT_TYPE_EXPOSURE_ADJUST = 1,
+  X3F_EXT_TYPE_CONTRAST_ADJUST = 2,
+  X3F_EXT_TYPE_SHADOW_ADJUST = 3,
+  X3F_EXT_TYPE_HIGHLIGHT_ADJUST = 4,
+  X3F_EXT_TYPE_SATURATION_ADJUST = 5,
+  X3F_EXT_TYPE_SHARPNESS_ADJUST = 6,
+  X3F_EXT_TYPE_RED_ADJUST = 7,
+  X3F_EXT_TYPE_GREEN_ADJUST = 8,
+  X3F_EXT_TYPE_BLUE_ADJUST = 9,
+  X3F_EXT_TYPE_FILL_LIGHT_ADJUST = 10
+} x3f_extended_types_t;
+
+typedef struct x3f_property_s
+{
+  /* Read from file */
+  uint32_t name_offset;
+  uint32_t value_offset;
+
+  /* Computed */
+  utf16_t *name;  /* 0x0000 terminated UTF 16 */
+  utf16_t *value; /* 0x0000 terminated UTF 16 */
+} x3f_property_t;
+
+typedef struct x3f_property_table_s
+{
+  uint32_t size;
+  x3f_property_t *element;
+} x3f_property_table_t;
+
+typedef struct x3f_property_list_s
+{
+  /* 2.0 Fields */
+  uint32_t num_properties;
+  uint32_t character_format;
+  uint32_t reserved;
+  uint32_t total_length;
+
+  x3f_property_table_t property_table;
+
+  void *data;
+
+  uint32_t data_size;
+
+} x3f_property_list_t;
+
+typedef struct x3f_table8_s
+{
+  uint32_t size;
+  uint8_t *element;
+} x3f_table8_t;
+
+typedef struct x3f_table16_s
+{
+  uint32_t size;
+  uint16_t *element;
+} x3f_table16_t;
+
+typedef struct x3f_table32_s
+{
+  uint32_t size;
+  uint32_t *element;
+} x3f_table32_t;
+
+typedef struct
+{
+  uint8_t *data; /* Pointer to actual image data */
+  void *buf;     /* Pointer to allocated buffer for free() */
+  uint32_t rows;
+  uint32_t columns;
+  uint32_t channels;
+  uint32_t row_stride;
+} x3f_area8_t;
+
+typedef struct
+{
+  uint16_t *data; /* Pointer to actual image data */
+  void *buf;      /* Pointer to allocated buffer for free() */
+  uint32_t rows;
+  uint32_t columns;
+  uint32_t channels;
+  uint32_t row_stride;
+} x3f_area16_t;
+
+#define UNDEFINED_LEAF 0xffffffff
+
+typedef struct x3f_huffnode_s
+{
+  struct x3f_huffnode_s *branch[2];
+  uint32_t leaf;
+} x3f_huffnode_t;
+
+typedef struct x3f_hufftree_s
+{
+  uint32_t free_node_index; /* Free node index in huffman tree array */
+  uint32_t total_node_index;
+  x3f_huffnode_t *nodes;    /* Coding tree */
+} x3f_hufftree_t;
+
+typedef struct x3f_true_huffman_element_s
+{
+  uint8_t code_size;
+  uint8_t code;
+} x3f_true_huffman_element_t;
+
+typedef struct x3f_true_huffman_s
+{
+  uint32_t size;
+  x3f_true_huffman_element_t *element;
+} x3f_true_huffman_t;
+
+/* 0=bottom, 1=middle, 2=top */
+#define TRUE_PLANES 3
+
+typedef struct x3f_true_s
+{
+  uint16_t seed[TRUE_PLANES]; /* Always 512,512,512 */
+  uint16_t unknown;           /* Always 0 */
+  x3f_true_huffman_t table;   /* Huffman table - zero
+                     terminated. size is the number of
+                     leaves plus 1.*/
+
+  x3f_table32_t plane_size;            /* Size of the 3 planes */
+  uint8_t *plane_address[TRUE_PLANES]; /* computed offset to the planes */
+  x3f_hufftree_t tree;                 /* Coding tree */
+  x3f_area16_t x3rgb16;                /* 3x16 bit X3-RGB data */
+} x3f_true_t;
+
+typedef struct x3f_quattro_s
+{
+  struct
+  {
+    uint16_t columns;
+    uint16_t rows;
+  } plane[TRUE_PLANES];
+  uint32_t unknown;
+
+  bool_t quattro_layout;
+  x3f_area16_t top16; /* Container for the bigger top layer */
+} x3f_quattro_t;
+
+typedef struct x3f_huffman_s
+{
+  x3f_table16_t mapping;     /* Value Mapping = X3F lossy compression */
+  x3f_table32_t table;       /* Coding Table */
+  x3f_hufftree_t tree;       /* Coding tree */
+  x3f_table32_t row_offsets; /* Row offsets */
+  x3f_area8_t rgb8;          /* 3x8 bit RGB data */
+  x3f_area16_t x3rgb16;      /* 3x16 bit X3-RGB data */
+} x3f_huffman_t;
+
+typedef struct x3f_image_data_s
+{
+  /* 2.0 Fields */
+  /* ------------------------------------------------------------------ */
+  /* Known combinations of type and format are:
+     1-6, 2-3, 2-11, 2-18, 3-6 */
+  uint32_t type;        /* 1 = RAW X3 (SD1)
+                           2 = thumbnail or maybe just RGB
+                           3 = RAW X3 */
+  uint32_t format;      /* 3 = 3x8 bit pixmap
+                           6 = 3x10 bit huffman with map table
+                           11 = 3x8 bit huffman
+                           18 = JPEG */
+  uint32_t type_format; /* type<<16 + format */
+  /* ------------------------------------------------------------------ */
+
+  uint32_t columns;    /* width / row size in pixels */
+  uint32_t rows;       /* height */
+  uint32_t row_stride; /* row size in bytes */
+
+  /* NULL if not used */
+  x3f_huffman_t *huffman; /* Huffman help data */
+  x3f_true_t *tru;        /* TRUE help data */
+  x3f_quattro_t *quattro; /* Quattro help data */
+
+  void *data; /* Take from file if NULL. Otherwise,
+                 this is the actual data bytes in
+                 the file. */
+  uint32_t data_size;
+
+} x3f_image_data_t;
+
+typedef struct camf_dim_entry_s
+{
+  uint32_t size;
+  uint32_t name_offset;
+  uint32_t n; /* 0,1,2,3... */
+  char *name;
+} camf_dim_entry_t;
+
+typedef enum
+{
+  M_FLOAT,
+  M_INT,
+  M_UINT
+} matrix_type_t;
+
+typedef struct camf_entry_s
+{
+  /* pointer into decoded data */
+  void *entry;
+
+  /* entry header */
+  uint32_t id;
+  uint32_t version;
+  uint32_t entry_size;
+  uint32_t name_offset;
+  uint32_t value_offset;
+
+  /* computed values */
+  char *name_address;
+  void *value_address;
+  uint32_t name_size;
+  uint32_t value_size;
+
+  /* extracted values for explicit CAMF entry types*/
+  uint32_t text_size;
+  char *text;
+
+  uint32_t property_num;
+  char **property_name;
+  uint8_t **property_value;
+
+  uint32_t matrix_dim;
+  camf_dim_entry_t *matrix_dim_entry;
+
+  /* Offset, pointer and size and type of raw data */
+  uint32_t matrix_type;
+  uint32_t matrix_data_off;
+  void *matrix_data;
+  uint32_t matrix_element_size;
+
+  /* Pointer and type of copied data */
+  matrix_type_t matrix_decoded_type;
+  void *matrix_decoded;
+
+  /* Help data to try to estimate element size */
+  uint32_t matrix_elements;
+  uint32_t matrix_used_space;
+  double matrix_estimated_element_size;
+
+} camf_entry_t;
+
+typedef struct camf_entry_table_s
+{
+  uint32_t size;
+  camf_entry_t *element;
+} camf_entry_table_t;
+
+typedef struct x3f_camf_typeN_s
+{
+  uint32_t val0;
+  uint32_t val1;
+  uint32_t val2;
+  uint32_t val3;
+} x3f_camf_typeN_t;
+
+typedef struct x3f_camf_type2_s
+{
+  uint32_t reserved;
+  uint32_t infotype;
+  uint32_t infotype_version;
+  uint32_t crypt_key;
+} x3f_camf_type2_t;
+
+typedef struct x3f_camf_type4_s
+{
+  uint32_t decoded_data_size;
+  uint32_t decode_bias;
+  uint32_t block_size;
+  uint32_t block_count;
+} x3f_camf_type4_t;
+
+typedef struct x3f_camf_type5_s
+{
+  uint32_t decoded_data_size;
+  uint32_t decode_bias;
+  uint32_t unknown2;
+  uint32_t unknown3;
+} x3f_camf_type5_t;
+
+typedef struct x3f_camf_s
+{
+
+  /* Header info */
+  uint32_t type;
+  union {
+    x3f_camf_typeN_t tN;
+    x3f_camf_type2_t t2;
+    x3f_camf_type4_t t4;
+    x3f_camf_type5_t t5;
+  };
+
+  /* The encrypted raw data */
+  void *data;
+  uint32_t data_size;
+
+  /* Help data for type 4 Huffman compression */
+  x3f_true_huffman_t table;
+  x3f_hufftree_t tree;
+  uint8_t *decoding_start;
+  uint32_t decoding_size;
+
+  /* The decrypted data */
+  void *decoded_data;
+  uint32_t decoded_data_size;
+
+  /* Pointers into the decrypted data */
+  camf_entry_table_t entry_table;
+} x3f_camf_t;
+
+typedef struct x3f_directory_entry_header_s
+{
+  uint32_t identifier; /* Should be ´SECp´, "SECi", ... */
+  uint32_t version;    /* 0x00020001 is version 2.1  */
+  union {
+    x3f_property_list_t property_list;
+    x3f_image_data_t image_data;
+    x3f_camf_t camf;
+  } data_subsection;
+} x3f_directory_entry_header_t;
+
+typedef struct x3f_directory_entry_s
+{
+  struct
+  {
+    uint32_t offset;
+    uint32_t size;
+  } input, output;
+
+  uint32_t type;
+
+  x3f_directory_entry_header_t header;
+} x3f_directory_entry_t;
+
+typedef struct x3f_directory_section_s
+{
+  uint32_t identifier; /* Should be ´SECd´ */
+  uint32_t version;    /* 0x00020001 is version 2.1  */
+
+  /* 2.0 Fields */
+  uint32_t num_directory_entries;
+  x3f_directory_entry_t *directory_entry;
+} x3f_directory_section_t;
+
+typedef struct x3f_header_s
+{
+  /* 2.0 Fields */
+  uint32_t identifier; /* Should be ´FOVb´ */
+  uint32_t version;    /* 0x00020001 means 2.1 */
+  uint8_t unique_identifier[SIZE_UNIQUE_IDENTIFIER];
+  uint32_t mark_bits;
+  uint32_t columns;  /* Columns and rows ... */
+  uint32_t rows;     /* ... before rotation */
+  uint32_t rotation; /* 0, 90, 180, 270 */
+
+  char white_balance[SIZE_WHITE_BALANCE]; /* Introduced in 2.1 */
+  char color_mode[SIZE_COLOR_MODE];       /* Introduced in 2.3 */
+
+  /* Introduced in 2.1 and extended from 32 to 64 in 3.0 */
+  uint8_t extended_types[NUM_EXT_DATA]; /* x3f_extended_types_t */
+  float extended_data[NUM_EXT_DATA];    /* 32 bits, but do type differ? */
+} x3f_header_t;
+
+typedef struct x3f_info_s
+{
+  char *error;
+  struct
+  {
+    LibRaw_abstract_datastream *file; /* Use if more data is needed */
+  } input, output;
+} x3f_info_t;
+
+typedef struct x3f_s
+{
+  x3f_info_t info;
+  x3f_header_t header;
+  x3f_directory_section_t directory_section;
+} x3f_t;
+
+typedef enum x3f_return_e
+{
+  X3F_OK = 0,
+  X3F_ARGUMENT_ERROR = 1,
+  X3F_INFILE_ERROR = 2,
+  X3F_OUTFILE_ERROR = 3,
+  X3F_INTERNAL_ERROR = 4
+} x3f_return_t;
+
+x3f_return_t x3f_delete(x3f_t *x3f);
+
+/* Hacky external flags                                                 */
+/* --------------------------------------------------------------------- */
+
+extern int legacy_offset;
+extern bool_t auto_legacy_offset;
+
+/* --------------------------------------------------------------------- */
+/* Huffman Decode Macros                                                 */
+/* --------------------------------------------------------------------- */
+
+#define HUF_TREE_MAX_LENGTH 27
+#define HUF_TREE_MAX_NODES(_leaves) ((HUF_TREE_MAX_LENGTH + 1) * (_leaves))
+#define HUF_TREE_GET_LENGTH(_v) (((_v) >> 27) & 0x1f)
+#define HUF_TREE_GET_CODE(_v) ((_v)&0x07ffffff)
+
+x3f_t *x3f_new_from_file(LibRaw_abstract_datastream *infile);
+x3f_return_t x3f_delete(x3f_t *x3f);
+x3f_directory_entry_t *x3f_get_raw(x3f_t *x3f);
+x3f_directory_entry_t *x3f_get_thumb_plain(x3f_t *x3f);
+x3f_return_t x3f_load_data(x3f_t *x3f, x3f_directory_entry_t *DE);
+x3f_directory_entry_t *x3f_get_thumb_huffman(x3f_t *x3f);
+x3f_directory_entry_t *x3f_get_thumb_jpeg(x3f_t *x3f);
+x3f_directory_entry_t *x3f_get_camf(x3f_t *x3f);
+x3f_directory_entry_t *x3f_get_prop(x3f_t *x3f);
+/* extern */ int64_t x3f_load_data_size(x3f_t *x3f, x3f_directory_entry_t *DE);
+
+#endif

+ 3 - 0
raw.mod/libraw/lib/Makefile

@@ -0,0 +1,3 @@
+all: 
+	@(cd ..; make library)
+	@echo Done

+ 12 - 0
raw.mod/libraw/libraw.pc.in

@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libraw
+Description: Raw image decoder library (non-thread-safe)
+Requires: @PACKAGE_REQUIRES@
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lraw -lstdc++@PC_OPENMP@
+Libs.private: @PACKAGE_LIBS_PRIVATE@
+Cflags: -I${includedir}/libraw -I${includedir}

+ 537 - 0
raw.mod/libraw/libraw/libraw.h

@@ -0,0 +1,537 @@
+/* -*- C++ -*-
+ * File: libraw.h
+ * Copyright 2008-2021 LibRaw LLC ([email protected])
+ * Created: Sat Mar  8, 2008
+ *
+ * LibRaw C++ interface
+ *
+
+LibRaw is free software; you can redistribute it and/or modify
+it under the terms of the one of two licenses as you choose:
+
+1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1
+   (See file LICENSE.LGPL provided in LibRaw distribution archive for details).
+
+2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+   (See file LICENSE.CDDL provided in LibRaw distribution archive for details).
+
+*/
+
+#ifndef _LIBRAW_CLASS_H
+#define _LIBRAW_CLASS_H
+
+#ifdef __linux__
+#define _FILE_OFFSET_BITS 64
+#endif
+
+// Enable use old cinema cameras if USE_OLD_VIDEOCAMS defined
+#ifdef USE_OLD_VIDEOCAMS
+#define LIBRAW_OLD_VIDEO_SUPPORT
+#endif
+
+#ifndef LIBRAW_USE_DEPRECATED_IOSTREAMS_DATASTREAM
+#define LIBRAW_NO_IOSTREAMS_DATASTREAM
+#endif
+
+#ifndef LIBRAW_NO_IOSTREAMS_DATASTREAM
+/* maximum file size to use LibRaw_file_datastream (fully buffered) I/O */
+#define LIBRAW_USE_STREAMS_DATASTREAM_MAXSIZE (250 * 1024L * 1024L)
+#endif
+
+#include <limits.h>
+#include <memory.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+
+/* better WIN32 defines */
+
+/* better WIN32 defines */
+
+#if defined(WIN32) || defined(_WIN32)
+
+/* Win32 API */
+#  ifndef LIBRAW_WIN32_CALLS
+#   define LIBRAW_WIN32_CALLS
+#  endif
+
+/* DLLs: Microsoft or Intel compiler */
+# if defined(_MSC_VER) || defined(__INTEL_COMPILER)
+# ifndef LIBRAW_WIN32_DLLDEFS
+#  define LIBRAW_WIN32_DLLDEFS
+# endif
+#endif
+
+/* wchar_t* API for std::filebuf */
+# if (defined(_MSC_VER)  && (_MSC_VER > 1310)) || (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 910))
+#  ifndef LIBRAW_WIN32_UNICODEPATHS
+#   define LIBRAW_WIN32_UNICODEPATHS
+#  endif
+# elif _GLIBCXX_HAVE__WFOPEN && _GLIBCXX_USE_WCHAR_T
+#  ifndef LIBRAW_WIN32_UNICODEPATHS
+#    define LIBRAW_WIN32_UNICODEPATHS
+#  endif
+# elif defined(_LIBCPP_HAS_OPEN_WITH_WCHAR)
+#  ifndef LIBRAW_WIN32_UNICODEPATHS
+#    define LIBRAW_WIN32_UNICODEPATHS
+#  endif
+# endif
+
+#endif
+
+#include "libraw_datastream.h"
+#include "libraw_types.h"
+#include "libraw_const.h"
+#include "libraw_internal.h"
+#include "libraw_alloc.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+  DllDef const char *libraw_strerror(int errorcode);
+  DllDef const char *libraw_strprogress(enum LibRaw_progress);
+  /* LibRaw C API */
+  DllDef libraw_data_t *libraw_init(unsigned int flags);
+  DllDef int libraw_open_file(libraw_data_t *, const char *);
+#ifndef LIBRAW_NO_IOSTREAMS_DATASTREAM
+  DllDef int libraw_open_file_ex(libraw_data_t *, const char *,
+                                 INT64 max_buff_sz);
+#endif
+#if defined(_WIN32) || defined(WIN32)
+  DllDef int libraw_open_wfile(libraw_data_t *, const wchar_t *);
+#ifndef LIBRAW_NO_IOSTREAMS_DATASTREAM
+  DllDef int libraw_open_wfile_ex(libraw_data_t *, const wchar_t *,
+                                  INT64 max_buff_sz);
+#endif
+#endif
+
+  DllDef int libraw_open_buffer(libraw_data_t *, const void *buffer, size_t size);
+  DllDef int libraw_open_bayer(libraw_data_t *lr, unsigned char *data,
+                               unsigned datalen, ushort _raw_width,
+                               ushort _raw_height, ushort _left_margin,
+                               ushort _top_margin, ushort _right_margin,
+                               ushort _bottom_margin, unsigned char procflags,
+                               unsigned char bayer_battern,
+                               unsigned unused_bits, unsigned otherflags,
+                               unsigned black_level);
+  DllDef int libraw_unpack(libraw_data_t *);
+  DllDef int libraw_unpack_thumb(libraw_data_t *);
+  DllDef void libraw_recycle_datastream(libraw_data_t *);
+  DllDef void libraw_recycle(libraw_data_t *);
+  DllDef void libraw_close(libraw_data_t *);
+  DllDef void libraw_subtract_black(libraw_data_t *);
+  DllDef int libraw_raw2image(libraw_data_t *);
+  DllDef void libraw_free_image(libraw_data_t *);
+  /* version helpers */
+  DllDef const char *libraw_version();
+  DllDef int libraw_versionNumber();
+  /* Camera list */
+  DllDef const char **libraw_cameraList();
+  DllDef int libraw_cameraCount();
+
+  /* helpers */
+  DllDef void libraw_set_memerror_handler(libraw_data_t *, memory_callback cb,
+                                          void *datap);
+  DllDef void libraw_set_exifparser_handler(libraw_data_t *,
+                                            exif_parser_callback cb,
+                                            void *datap);
+  DllDef void libraw_set_dataerror_handler(libraw_data_t *, data_callback func,
+                                           void *datap);
+  DllDef void libraw_set_progress_handler(libraw_data_t *, progress_callback cb,
+                                          void *datap);
+  DllDef const char *libraw_unpack_function_name(libraw_data_t *lr);
+  DllDef int libraw_get_decoder_info(libraw_data_t *lr,
+                                     libraw_decoder_info_t *d);
+  DllDef int libraw_COLOR(libraw_data_t *, int row, int col);
+  DllDef unsigned libraw_capabilities();
+
+  /* DCRAW compatibility */
+  DllDef int libraw_adjust_sizes_info_only(libraw_data_t *);
+  DllDef int libraw_dcraw_ppm_tiff_writer(libraw_data_t *lr,
+                                          const char *filename);
+  DllDef int libraw_dcraw_thumb_writer(libraw_data_t *lr, const char *fname);
+  DllDef int libraw_dcraw_process(libraw_data_t *lr);
+  DllDef libraw_processed_image_t *
+  libraw_dcraw_make_mem_image(libraw_data_t *lr, int *errc);
+  DllDef libraw_processed_image_t *
+  libraw_dcraw_make_mem_thumb(libraw_data_t *lr, int *errc);
+  DllDef void libraw_dcraw_clear_mem(libraw_processed_image_t *);
+  /* getters/setters used by 3DLut Creator */
+  DllDef void libraw_set_demosaic(libraw_data_t *lr, int value);
+  DllDef void libraw_set_output_color(libraw_data_t *lr, int value);
+  DllDef void libraw_set_adjust_maximum_thr(libraw_data_t *lr, float value);
+  DllDef void libraw_set_user_mul(libraw_data_t *lr, int index, float val);
+  DllDef void libraw_set_output_bps(libraw_data_t *lr, int value);
+  DllDef void libraw_set_gamma(libraw_data_t *lr, int index, float value);
+  DllDef void libraw_set_no_auto_bright(libraw_data_t *lr, int value);
+  DllDef void libraw_set_bright(libraw_data_t *lr, float value);
+  DllDef void libraw_set_highlight(libraw_data_t *lr, int value);
+  DllDef void libraw_set_fbdd_noiserd(libraw_data_t *lr, int value);
+  DllDef int libraw_get_raw_height(libraw_data_t *lr);
+  DllDef int libraw_get_raw_width(libraw_data_t *lr);
+  DllDef int libraw_get_iheight(libraw_data_t *lr);
+  DllDef int libraw_get_iwidth(libraw_data_t *lr);
+  DllDef float libraw_get_cam_mul(libraw_data_t *lr, int index);
+  DllDef float libraw_get_pre_mul(libraw_data_t *lr, int index);
+  DllDef float libraw_get_rgb_cam(libraw_data_t *lr, int index1, int index2);
+  DllDef int libraw_get_color_maximum(libraw_data_t *lr);
+  DllDef void libraw_set_output_tif(libraw_data_t *lr, int value);
+  DllDef libraw_iparams_t *libraw_get_iparams(libraw_data_t *lr);
+  DllDef libraw_lensinfo_t *libraw_get_lensinfo(libraw_data_t *lr);
+  DllDef libraw_imgother_t *libraw_get_imgother(libraw_data_t *lr);
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifdef __cplusplus
+
+class DllDef LibRaw
+{
+public:
+  libraw_data_t imgdata;
+
+  LibRaw(unsigned int flags = LIBRAW_OPTIONS_NONE);
+  libraw_output_params_t *output_params_ptr() { return &imgdata.params; }
+#ifndef LIBRAW_NO_IOSTREAMS_DATASTREAM
+  int open_file(const char *fname,
+                INT64 max_buffered_sz = LIBRAW_USE_STREAMS_DATASTREAM_MAXSIZE);
+#if defined(_WIN32) || defined(WIN32)
+  int open_file(const wchar_t *fname,
+                INT64 max_buffered_sz = LIBRAW_USE_STREAMS_DATASTREAM_MAXSIZE);
+#endif
+#else
+  int open_file(const char *fname);
+#if defined(_WIN32) || defined(WIN32)
+  int open_file(const wchar_t *fname);
+#endif
+
+#endif
+  int open_buffer(const void *buffer, size_t size);
+  virtual int open_datastream(LibRaw_abstract_datastream *);
+  virtual int open_bayer(const unsigned char *data, unsigned datalen,
+                         ushort _raw_width, ushort _raw_height,
+                         ushort _left_margin, ushort _top_margin,
+                         ushort _right_margin, ushort _bottom_margin,
+                         unsigned char procflags, unsigned char bayer_pattern,
+                         unsigned unused_bits, unsigned otherflags,
+                         unsigned black_level);
+  int error_count() { return libraw_internal_data.unpacker_data.data_error; }
+  void recycle_datastream();
+  int unpack(void);
+  int unpack_thumb(void);
+  int thumbOK(INT64 maxsz = -1);
+  int adjust_sizes_info_only(void);
+  int subtract_black();
+  int subtract_black_internal();
+  int raw2image();
+  int raw2image_ex(int do_subtract_black);
+  void raw2image_start();
+  void free_image();
+  int adjust_maximum();
+  int adjust_to_raw_inset_crop(unsigned mask, float maxcrop = 0.55f); 
+  void set_exifparser_handler(exif_parser_callback cb, void *data)
+  {
+    callbacks.exifparser_data = data;
+    callbacks.exif_cb = cb;
+  }
+  void set_memerror_handler(memory_callback cb, void *data)
+  {
+    callbacks.memcb_data = data;
+    callbacks.mem_cb = cb;
+  }
+  void set_dataerror_handler(data_callback func, void *data)
+  {
+    callbacks.datacb_data = data;
+    callbacks.data_cb = func;
+  }
+  void set_progress_handler(progress_callback pcb, void *data)
+  {
+    callbacks.progresscb_data = data;
+    callbacks.progress_cb = pcb;
+  }
+
+  static const char* cameramakeridx2maker(unsigned maker);
+  int setMakeFromIndex(unsigned index);
+
+  void convertFloatToInt(float dmin = 4096.f, float dmax = 32767.f,
+                         float dtarget = 16383.f);
+  /* helpers */
+  static unsigned capabilities();
+  static const char *version();
+  static int versionNumber();
+  static const char **cameraList();
+  static int cameraCount();
+  static const char *strprogress(enum LibRaw_progress);
+  static const char *strerror(int p);
+  /* dcraw emulation */
+  int dcraw_ppm_tiff_writer(const char *filename);
+  int dcraw_thumb_writer(const char *fname);
+  int dcraw_process(void);
+  /* information calls */
+  int is_fuji_rotated()
+  {
+    return libraw_internal_data.internal_output_params.fuji_width;
+  }
+  int is_sraw();
+  int sraw_midpoint();
+  int is_nikon_sraw();
+  int is_coolscan_nef();
+  int is_jpeg_thumb();
+  int is_floating_point();
+  int have_fpdata();
+  /* memory writers */
+  virtual libraw_processed_image_t *dcraw_make_mem_image(int *errcode = NULL);
+  virtual libraw_processed_image_t *dcraw_make_mem_thumb(int *errcode = NULL);
+  static void dcraw_clear_mem(libraw_processed_image_t *);
+
+  /* Additional calls for make_mem_image */
+  void get_mem_image_format(int *width, int *height, int *colors,
+                            int *bps) const;
+  int copy_mem_image(void *scan0, int stride, int bgr);
+
+  /* free all internal data structures */
+  void recycle();
+  virtual ~LibRaw(void);
+
+  int COLOR(int row, int col)
+  {
+    if (!imgdata.idata.filters)
+      return 6; /* Special value 0+1+2+3 */
+    if (imgdata.idata.filters < 1000)
+      return fcol(row, col);
+    return libraw_internal_data.internal_output_params.fuji_width
+               ? FCF(row, col)
+               : FC(row, col);
+  }
+
+  int FC(int row, int col)
+  {
+    return (imgdata.idata.filters >> (((row << 1 & 14) | (col & 1)) << 1) & 3);
+  }
+  int fcol(int row, int col);
+
+  const char *unpack_function_name();
+  virtual int get_decoder_info(libraw_decoder_info_t *d_info);
+  libraw_internal_data_t *get_internal_data_pointer()
+  {
+    return &libraw_internal_data;
+  }
+
+  static float powf_lim(float a, float b, float limup)
+  {
+    return (b > limup || b < -limup) ? 0.f : powf(a, b);
+  }
+  static float libraw_powf64l(float a, float b) { return powf_lim(a, b, 64.f); }
+
+  static unsigned sgetn(int n, uchar *s)
+  {
+    unsigned result = 0;
+    while (n-- > 0)
+      result = (result << 8) | (*s++);
+    return result;
+  }
+
+  /* Phase one correction/subtractBL calls */
+  /* Returns libraw error code */
+
+  int phase_one_subtract_black(ushort *src, ushort *dest);
+  int phase_one_correct();
+
+  int set_rawspeed_camerafile(char *filename);
+  virtual void setCancelFlag();
+  virtual void clearCancelFlag();
+  virtual int adobe_coeff(unsigned, const char *, int internal_only = 0);
+
+  void set_dng_host(void *);
+
+protected:
+  static void *memmem(char *haystack, size_t haystacklen, char *needle,
+                      size_t needlelen);
+  static char *strcasestr(char *h, const char *n);
+  static size_t strnlen(const char *s, size_t n);
+
+#ifdef LIBRAW_NO_IOSTREAMS_DATASTREAM
+  int libraw_openfile_tail(LibRaw_abstract_datastream *stream);
+#endif
+
+  int is_curve_linear();
+  void checkCancel();
+  void cam_xyz_coeff(float _rgb_cam[3][4], double cam_xyz[4][3]);
+  void phase_one_allocate_tempbuffer();
+  void phase_one_free_tempbuffer();
+  virtual int is_phaseone_compressed();
+  virtual int is_canon_600();
+  /* Hotspots */
+  virtual void copy_fuji_uncropped(unsigned short cblack[4],
+                                   unsigned short *dmaxp);
+  virtual void copy_bayer(unsigned short cblack[4], unsigned short *dmaxp);
+  virtual void fuji_rotate();
+  virtual void convert_to_rgb_loop(float out_cam[3][4]);
+  virtual void lin_interpolate_loop(int *code, int size);
+  virtual void scale_colors_loop(float scale_mul[4]);
+
+  /* Fujifilm compressed decoder public interface (to make parallel decoder) */
+  virtual void
+  fuji_decode_loop(struct fuji_compressed_params *common_info, int count,
+                   INT64 *offsets, unsigned *sizes, uchar *q_bases);
+  void fuji_decode_strip(struct fuji_compressed_params *info_common,
+                         int cur_block, INT64 raw_offset, unsigned size, uchar *q_bases);
+  /* CR3 decoder public interface to make parallel decoder */
+  virtual void crxLoadDecodeLoop(void *, int);
+  int crxDecodePlane(void *, uint32_t planeNumber);
+  virtual void crxLoadFinalizeLoopE3(void *, int);
+  void crxConvertPlaneLineDf(void *, int);
+
+  int FCF(int row, int col)
+  {
+    int rr, cc;
+    if (libraw_internal_data.unpacker_data.fuji_layout)
+    {
+      rr = libraw_internal_data.internal_output_params.fuji_width - 1 - col +
+           (row >> 1);
+      cc = col + ((row + 1) >> 1);
+    }
+    else
+    {
+      rr = libraw_internal_data.internal_output_params.fuji_width - 1 + row -
+           (col >> 1);
+      cc = row + ((col + 1) >> 1);
+    }
+    return FC(rr, cc);
+  }
+
+  void adjust_bl();
+  void *malloc(size_t t);
+  void *calloc(size_t n, size_t t);
+  void *realloc(void *p, size_t s);
+  void free(void *p);
+  void merror(void *ptr, const char *where);
+  void derror();
+
+  LibRaw_TLS *tls;
+  libraw_internal_data_t libraw_internal_data;
+  decode first_decode[2048], *second_decode, *free_decode;
+  tiff_ifd_t tiff_ifd[LIBRAW_IFD_MAXCOUNT];
+  libraw_memmgr memmgr;
+  libraw_callbacks_t callbacks;
+
+  void (LibRaw::*write_thumb)();
+  void (LibRaw::*write_fun)();
+  void (LibRaw::*load_raw)();
+  void (LibRaw::*thumb_load_raw)();
+  void (LibRaw::*pentax_component_load_raw)();
+
+  void kodak_thumb_loader();
+  void write_thumb_ppm_tiff(FILE *);
+#ifdef USE_X3FTOOLS
+  void x3f_thumb_loader();
+  INT64 x3f_thumb_size();
+#endif
+
+  int own_filtering_supported() { return 0; }
+  void identify();
+  void initdata();
+  unsigned parse_custom_cameras(unsigned limit, libraw_custom_camera_t table[],
+                                char **list);
+  void write_ppm_tiff();
+  void convert_to_rgb();
+  void remove_zeroes();
+  void crop_masked_pixels();
+#ifndef NO_LCMS
+  void apply_profile(const char *, const char *);
+#endif
+  void pre_interpolate();
+  void border_interpolate(int border);
+  void lin_interpolate();
+  void vng_interpolate();
+  void ppg_interpolate();
+  void cielab(ushort rgb[3], short lab[3]);
+  void xtrans_interpolate(int);
+  void ahd_interpolate();
+  void dht_interpolate();
+  void aahd_interpolate();
+
+  void dcb(int iterations, int dcb_enhance);
+  void fbdd(int noiserd);
+  void exp_bef(float expos, float preser);
+
+  void bad_pixels(const char *);
+  void subtract(const char *);
+  void hat_transform(float *temp, float *base, int st, int size, int sc);
+  void wavelet_denoise();
+  void scale_colors();
+  void median_filter();
+  void blend_highlights();
+  void recover_highlights();
+  void green_matching();
+
+  void stretch();
+
+  void jpeg_thumb_writer(FILE *tfp, char *thumb, int thumb_length);
+  void jpeg_thumb();
+  void ppm_thumb();
+  void ppm16_thumb();
+  void layer_thumb();
+  void rollei_thumb();
+  void kodak_thumb_load_raw();
+
+  unsigned get4();
+
+  int flip_index(int row, int col);
+  void gamma_curve(double pwr, double ts, int mode, int imax);
+  void cubic_spline(const int *x_, const int *y_, const int len);
+
+  /* RawSpeed data */
+  void *_rawspeed_camerameta;
+  void *_rawspeed_decoder;
+  void fix_after_rawspeed(int bl);
+  int try_rawspeed(); /* returns LIBRAW_SUCCESS on success */
+  /* Fast cancel flag */
+  long _exitflag;
+
+  /* DNG SDK data */
+  void *dnghost;
+  void *dngnegative;
+  void *dngimage;
+  int valid_for_dngsdk();
+  int try_dngsdk();
+  /* X3F data */
+  void *_x3f_data; /* keep it even if USE_X3FTOOLS is not defined to do not change sizeof(LibRaw)*/
+
+  int raw_was_read()
+  {
+    return imgdata.rawdata.raw_image || imgdata.rawdata.color4_image ||
+           imgdata.rawdata.color3_image || imgdata.rawdata.float_image ||
+           imgdata.rawdata.float3_image || imgdata.rawdata.float4_image;
+  }
+
+#ifdef LIBRAW_LIBRARY_BUILD
+#include "internal/libraw_internal_funcs.h"
+#endif
+};
+
+#ifdef LIBRAW_LIBRARY_BUILD
+ushort libraw_sget2_static(short _order, uchar *s);
+unsigned libraw_sget4_static(short _order, uchar *s);
+int libraw_tagtype_dataunit_bytes(int tagtype);
+double  libraw_sgetreal_static(short _order, int type, uchar *s);
+float   libraw_int_to_float (int i);
+#endif
+
+
+#ifdef LIBRAW_LIBRARY_BUILD
+#define RUN_CALLBACK(stage, iter, expect)                                      \
+  if (callbacks.progress_cb)                                                   \
+  {                                                                            \
+    int rr = (*callbacks.progress_cb)(callbacks.progresscb_data, stage, iter,  \
+                                      expect);                                 \
+    if (rr != 0)                                                               \
+      throw LIBRAW_EXCEPTION_CANCELLED_BY_CALLBACK;                            \
+  }
+#endif
+
+#endif /* __cplusplus */
+
+#endif /* _LIBRAW_CLASS_H */

部分文件因为文件数量过多而无法显示