Lawrence Lee 4c61b7d3c3 Squashed 'rtengine/libraw/' changes from 1ef70158d..12b0e5d60
12b0e5d60 Snapshot 202403
a4c9b1981 loop parameters in remove_trailing_spaces
e231b01a4 CR3-Qstep table: avoid wrong 64-bit code generation
21368133a 0.21.2 release
a6f212a4a tag type => tag size mapping fixed
41506ef73 cubic_spline: better handling of non-integer data
17294b5fd extra metadata check in arq_load_raw
47d9dd8e2 Better incorrect data handling in cubic_spline
3baa51068 skip invalid pattern in xtrans_interpolate
eaf63bf5f Check HL recovery coeffs before processing
a14574080 limit wavelet denoise minimum size
4e597e4e9 Merge pull request #594 from pinotree/path_max
086dcb9a6 raw-identify: use fallback if PATH_MAX not available
0e105f9f8 additional check against corrupted ljpeg layout
0c8b68e9f Disable color conversion for Canon 16-bit thumbnails
cd1abd695 docs/changelog: explained the case when no thumbnail is found in specific file
6fffd414b rename swapXX to libraw_swapXX to avoid name conflict
af78ae48a Check against corrupted LJPEG header in Canon sRAW decoder
ba780e600 Limit embedded color profile allocation/read size
122bf7c5b Wrong alloc result check for 16-bit bitmap thumbnail
e6dd2709e check pana_data/buffer offset before use
ae2dc5884 Check P1 quadrant linearization coeff[15] against zero
f2998bacc avoid integer overflow in buffer space check
443b7fb51 prevent buffer overrun in buffer_datastream::scanf_one
35a6d3615 ensure correct T.tlength for 16b bitmap thumbnails(2)
b69ea8be5 ensure correct T.tlength for 16b bitmap thumbnails
2b6eca897 Do not run sraw decoder on (crafted) bayer files
68808b57f better striped thumbnails handling
9ab70f6dc do not set shrink flag for 3/4 component images
32425dd96 allow more decoders for fuji-rotated RAWs
REVERT: 1ef70158d 0.21.2 release
REVERT: 62f042366 tag type => tag size mapping fixed
REVERT: ee087e3fe cubic_spline: better handling of non-integer data
REVERT: af755b991 extra metadata check in arq_load_raw
REVERT: 0fadd8819 Better incorrect data handling in cubic_spline
REVERT: d7fb66053 skip invalid pattern in xtrans_interpolate
REVERT: d059ed280 Check HL recovery coeffs before processing
REVERT: 104730519 limit wavelet denoise minimum size
REVERT: cae09838e raw-identify: use fallback if PATH_MAX not available
REVERT: d6c677608 additional check against corrupted ljpeg layout
REVERT: 1001a6ac1 Disable color conversion for Canon 16-bit thumbnails
REVERT: a5130b01b docs/changelog: explained the case when no thumbnail is found in specific file
REVERT: 600c0c63d rename swapXX to libraw_swapXX to avoid name conflict
REVERT: 299c8a11b Check against corrupted LJPEG header in Canon sRAW decoder
REVERT: ec8671ad9 Limit embedded color profile allocation/read size
REVERT: 5229d5942 Wrong alloc result check for 16-bit bitmap thumbnail
REVERT: b278b775f check pana_data/buffer offset before use
REVERT: 7f4b8d3af Check P1 quadrant linearization coeff[15] against zero
REVERT: e942a7db6 avoid integer overflow in buffer space check
REVERT: f6a57cfb8 prevent buffer overrun in buffer_datastream::scanf_one
REVERT: 3e62ed304 ensure correct T.tlength for 16b bitmap thumbnails(2)
REVERT: 8e52d81cd ensure correct T.tlength for 16b bitmap thumbnails
REVERT: 8e1af15e2 Do not run sraw decoder on (crafted) bayer files
REVERT: 0ace959c2 better striped thumbnails handling
REVERT: 477e0719f do not set shrink flag for 3/4 component images
REVERT: c8efae6c5 allow more decoders for fuji-rotated RAWs

git-subtree-dir: rtengine/libraw
git-subtree-split: 12b0e5d60c57bb795382fda8494fc45f683550b8
2024-04-13 22:44:59 -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<72>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<69>s dcraw.c utility (see below the <20>Project history<72> section); their further development is not currently planned, because we do not consider production-quality rendering to be in the scope of LibRaw<61>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<72>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<EFBFBD>) 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 7-9 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<72> 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-<2D>., 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<69>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<6F>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%