Download

Stable version: LibRaw 0.18

LibRaw-0.19.0.tar.gz
LibRaw-0.19.0.zip
Source code for Unix (Linux, Mac OS X, FreeBSD) and Windows (32 and 64 bits).
LibRaw-0.19.0-MacOSX.zip Mac OS X 10.11 binaries (and sources), both arch: 32 and 64 bit.
LibRaw-0.19.0-Win32.zip Windows binaries (and sources), compiled by MSVC 2013, 32 bit
LibRaw-0.19.0-Win64.zip Windows binaries (and sources), compiled by MSVC 2013, 64 bit

LibRaw 0.19 Release

  • changed wrong fix for Canon D30 white balance
  • fixed possible stack overrun while reading zero-sized strings
  • fixed possible integer overflow

LibRaw 0.19 Beta-6

  • 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 Beta-5

  • 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 Beta-4

  • CVE-2018-10529 fixed: out of bounds read in X3F parser
  • CVE-2018-10528 fixed: possible stack overrun in X3F parser

LibRaw 0.19 Beta-3

  • Secunia 81800 advisory
  • lot of bugs reported by ImageMagic/oss-fuzz fixed

LibRaw 0.19 Beta-2

  • 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

LibRaw 0.19 Beta-1

  • 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
  • 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
  • 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

Previous version: LibRaw 0.18

LibRaw-0.18.13.tar.gz
LibRaw-0.18.13.zip
Source code for Unix (Linux, Mac OS X, FreeBSD) and Windows (32 and 64 bits).
Note: demosaic packs are not updated for 0.18.11 because of no changes
LibRaw-demosaic-pack-GPL2-0.18.8.tar.gz
LibRaw-demosaic-pack-GPL2-0.18.8.zip
Additional demosaic methods distributed under the terms of GNU General Public License 2+.
See README.demosaic-packs in LibRaw distribution for more details.
LibRaw-demosaic-pack-GPL3-0.18.8.tar.gz
LibRaw-demosaic-pack-GPL3-0.18.8.zip
Additional demosaic methods distributed under the terms of GNU General Public License 3+
See README.demosaic-packs in LibRaw distribution for more details.

Binary distributions without demosaic packs

These binary distributions DOES NOT contains additional demosaic methods from demosaic packs.

LibRaw 0.18.13

  • changed wrong fix for Canon D30 white balance
  • fixed possible stack overrun while reading zero-sized strings
  • fixed possible integer overflow
LibRaw 0.18.12
    Secunia Advisory SA83507, credits Kasper Leigh Haabb, Secunia Research at Flexera
  • parse_qt: possible integer overflow
  • reject broken/crafted NOKIARAW files
  • Backported 0.19-patch to recover read position if TIFF/EXIF tag is too long
LibRaw 0.18.11
  • Secunia Advisory SA83050: possible infinite loop in parse_minolta()
  • Fixed stack overrun in kodak_radc_load_raw
  • restored static for utf2char() lost in previous bugfix
  • Fixed possible div by zero in EOS D30 WB data parse
  • packed_load_raw(): EOF check on each row
  • Exceptions was not caught in x3f_new_from_file resulting in x3f handle leak
LibRaw 0.18.10
  • CVE-2018-10529 fixed: out of bounds read in X3F parser
  • CVE-2018-10528 fixed: possible stack overrun in X3F parser
LibRaw 0.18.9
    Secunia #81800: Credit: Laurent Delosieres, Secunia Research at Flexera
  • samsung_load_raw: possible buffer overrun
  • rollei_load_raw: possible buffer overrun
  • nikon_coolscan_load_raw: possible buffer overrun, possible NULL pointer
  • find_green: possible stack overrun
  • parse_exif: possible stack overrun
LibRaw 0.18.8
    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
  • LibRaw 0.18.8
LibRaw 0.18.7
    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)
  • LibRaw 0.18.7
LibRaw 0.18.6
  • Fixed fuji_width handling if file is neither fuji nor DNG
  • Fixed xtrans interpolate for broken xtrans pattern
  • Fixed panasonic decoder
LibRaw 0.18.5
  • Fix for possible buffer overruns in kodak_65000 decoder
LibRaw 0.18.4
  • Fix for possible heap overrun in Canon makernotes parser
LibRaw 0.18.3
  • Fix for CVE-2017-13735
  • CVE-2017-14265: Additional checks for X-Trans CFA pattern data
LibRaw 0.18.2
  • 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 output
LibRaw 0.18.1
  • Camera Support: Sigma Quattro H
  • Fixed bug in FujiExpoMidPointShift parser
  • Fixed wrong black level in Sony A350
  • Added standard integer types for VisualStudio 2008 and earlier
LibRaw 0.18.0
Licensing changes:
  • there is no 'LibRaw Software License 27032010' licensing anymore (and all signed agreements have expired)
  • LibRaw 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
Other
  • 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_intepolate 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

Older version(s)

LibRaw-0.17.2.tar.gz
LibRaw-0.17.2.zip
Source code for Unix (Linux, Mac OS X, FreeBSD) and Windows (32 and 64 bits).
LibRaw-demosaic-pack-GPL2-0.17.2.tar.gz
LibRaw-demosaic-pack-GPL2-0.17.2.zip
Additional demosaic methods distributed under the terms of GNU General Public License 2+.
See README.demosaic-packs in LibRaw distribution for more details.
LibRaw-demosaic-pack-GPL3-0.17.2.tar.gz
LibRaw-demosaic-pack-GPL3-0.17.2.zip
Additional demosaic methods distributed under the terms of GNU General Public License 3+
See README.demosaic-packs in LibRaw distribution for more details.