Skip to content

Commit

Permalink
Fixed FindLibRaw.cmake.
Browse files Browse the repository at this point in the history
  • Loading branch information
ggarra13 committed Sep 22, 2023
1 parent e1aff67 commit 2cf268b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
8 changes: 4 additions & 4 deletions cmake/Modules/FindLibRaw.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ set(LibRaw_INCLUDE_DIRS

if(CMAKE_BUILD_TYPE MATCHES "^Debug$")
find_library(LibRaw_LIBRARY
NAMES raw)
NAMES rawd raw)
find_library(LibRaw_r_LIBRARY
NAMES raw_r)
NAMES raw_rd raw_r)
else()
find_library(LibRaw_LIBRARY
NAMES rawd raw)
NAMES raw)
find_library(LibRaw_r_LIBRARY
NAMES raw_rd raw_r)
NAMES raw_r)
endif()
set(LibRaw_LIBRARIES
${LibRaw_LIBRARY}
Expand Down
36 changes: 18 additions & 18 deletions lib/tlIO/RAWRead.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,6 @@ namespace tl
_info.video.resize(1);
auto& info = _info.video[0];

// Output 16-bit images
iProcessor->imgdata.params.output_bps = 16;

// Some default parameters
iProcessor->imgdata.params.no_auto_bright = 1;
iProcessor->imgdata.params.adjust_maximum_thr = 0.0f;
iProcessor->imgdata.params.user_sat = 0;
iProcessor->imgdata.params.use_camera_wb = 0;
iProcessor->imgdata.params.use_camera_matrix = 1;

// Handle camera matrix
iProcessor->imgdata.params.use_camera_matrix = 3;

// Handle LCMS color correction with sRGB as output
iProcessor->imgdata.params.output_color = 1;
iProcessor->imgdata.params.gamm[0] = 1.0 / 2.4;
iProcessor->imgdata.params.gamm[1] = 12.92;

const libraw_iparams_t& idata(iProcessor->imgdata.idata);
const libraw_colordata_t& color(iProcessor->imgdata.color);
const libraw_image_sizes_t& sizes(iProcessor->imgdata.sizes);
Expand Down Expand Up @@ -171,6 +153,24 @@ namespace tl
const auto& info = _info.video[0];
out.image = image::Image::create(info);

// Output 16-bit images
iProcessor->imgdata.params.output_bps = 16;

// Some default parameters
iProcessor->imgdata.params.no_auto_bright = 1;
iProcessor->imgdata.params.adjust_maximum_thr = 0.0f;
iProcessor->imgdata.params.user_sat = 0;
iProcessor->imgdata.params.use_camera_wb = 0;
iProcessor->imgdata.params.use_camera_matrix = 1;

// Handle camera matrix
iProcessor->imgdata.params.use_camera_matrix = 1;

// Handle LCMS color correction with sRGB as output
iProcessor->imgdata.params.output_color = 1;
iProcessor->imgdata.params.gamm[0] = 1.0 / 2.4;
iProcessor->imgdata.params.gamm[1] = 12.92;

if (_memory)
{
ret = iProcessor->open_buffer(_memory->p, _memory->size);
Expand Down

0 comments on commit 2cf268b

Please sign in to comment.