Lawrence Lee 16e502f1c5 Squashed 'rtengine/libraw/' changes from 12b0e5d60..8afe44cd0
8afe44cd0 Snapshot 202502
29d9785c2 Do not apply canon metadata crop to DNG files
015b27fff Changelog updated
d1a27c26e Merge branch 'master' of git.lexa.ru:LibRaw
ca1368d8e check split_col/split_row values in phase_one_correct
fb23332a9 UINT32=>unsigned as defined in structure declaration
354bc2907 Revert "build: add handling of openmp library"
797ac1934 Merge pull request #680 from ssssota/remove-duplicated-camera
52421b19e fix: remove duplicated supported camera
ca57a1103 Merge pull request #679 from dlemstra/fix-profile-length
25bb86fe7 Merge pull request #678 from clan/openmp
591239482 Changelog updated
42fce9f8e Make sure the profile_length is the same size as the allocated memory.
f767a2fbe prevent OOB reads in phase_one_correct
638154a5b build: add handling of openmp library
bdd9e3436 Prevent out-of-bounds read in fuji 0xf00c tag parser
59cfa8b8a Prevent out-of-bounds read in fuji 0xf00c tag parser
3240fb21f Merge pull request #677 from ssssota/windows-makefile-invalid-indent
416912f43 build: fix indentation (8 spaces -> tab)
bf7a0346d Merge pull request #676 from lance5/master
6a0ef2483 [fix] use LIBRAW_OWN_SWAB control swab
816ab359b [feature] support android NDK 21
cc118c1c1 H265 and JPEG-XL thumbnails support for dcraw_make_mem_thumb
9bcb8a1d9 LIBRAW_CALLOC_RAWSTORE; replace for w/ memmove in dng_sdk glue
bf1a9140e panasonic decoder: limit load_flags to 0x4000
77a46b319 panasonic loader: zero buf to avoid uninitalized data leak
4f5a4cfb3 null-terminate xmp block
f9bb7d126 small allocations: replace malloc with calloc
70f511871 define NOMINMAX before including winsock2 in public header file => do not provide min/max maco
3772d1be2 Merge pull request #661 from nekopsykose/end
f2d1070f7 fix endian detection for ppc64le
47c7a2394 Ignore vendor crops for Fuji S6000/6500
17f16837e Prevent Sony-LJPEG decoder buffer overrun
9c9c04b44 Ensure SR2 block is fully read from file
d3cbbd0e9 4-component DNG-JPEG support
891630152 additional check for imgdata.color.WB_Coeffs index range
54c6af90b prevent possible imgdata.color.WBCT_Coeffs overrun
158e635e5 X100V color updated w/ actual data; X-T4 and X-Pro3 typo fixed
393dc925d Fuji X-T3x colormatrix: fixed typo
66a81c333 removed extra Pentax KP colordata
6475fd04b pass all images with wrong bayer filter data to vng_interpolate
fe2a7e2b7 Refuse images with colors==2
c2e8a908d additional offset checks in Sony metadata parser
c9facb4b7 Clean wrong aber values; allocate extra data to image to avoid overrun on specially crafted test images
83bf3ad5e Merge pull request #640 from Calandracas606/fix-clback-docs
c294e7075 fix the docs to properly reflect the size of cblack[LIBRAW_CBLACK_SIZE]
072eeaeb4 fixed integer overflow in largest frame selection code
e58e8e43a additional checked_buffer_t offset checks
73d6daa05 Check for negatife offset checked_buffer_t
0d011198b Oops. Forgot to increase version
a625a7d53 Merge pull request #633 from thesamesam/openmp
b396d92d8 README.md: removed unprintable symbols
9893eb825 README.md: update policy actualized to match libraw.org site
54fbe8f47 libraw_adjust_to_raw_inset_crop
2f75ef793 m4: update ax_openmp.m4 from autoconf-archive (8->14)

git-subtree-dir: rtengine/libraw
git-subtree-split: 8afe44cd0e96611ba3cb73779b83ad05e945634c
2025-03-23 15:05:07 -07:00

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 three 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.
  • 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 9-18 months in the public GitHub repository.
  • 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:
  • 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 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 (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-..., 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-2024 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:cuniek@kft.umcs.lublin.pl)

LibRaw uses Roland Karlsson's X3F tools source code, licensed under BSD license:

Copyright (c) 2010, Roland Karlsson (roland@proxel.se)

Description
RawTherapee fork, WIP, adding keyboard shortcuts
Readme SSPL-1.0 194 MiB
Languages
C++ 91.6%
C 5.1%
CSS 1.1%
HTML 1.1%
CMake 0.4%
Other 0.5%