pre_mul and cam_mul are in RAW space, these WB multipliers to be applied before color conversion.
rgb_cam is from RAW to 'linear sRGB', so D65.
You can multiply rgb_cam[][] matrix to some adjustment matrix to get other output space (see LibRaw:::convert_to_rgb() source, this function also contains some of correction matrices for Adobe, ProPhoto, WideGamut and XYZ spaces).
I'm running into the same issue with this camera. I understand that 0.17 won't be updated but would it be possible to point me to a patch that fixes this? Thanks.
That was the case, but now I am baffled. If building jasper on linux there are options like
--disable-static and
--enable-shared
On windows however I can only open the .dsw file which generates the solution, and the needed preprocessor definitions for dynamic build are nowhere in the documentation.
Depending of what you do in your code, you may prefer
- do not call raw2image()
- and use imgdata.rawdata.raw_image[] array
This way will not allocate extra (4-component per pixel) image array. It is preferred if you, for example, do own processing in floating point: image[] array is not needed in this case.
For non-bayer images:
- imgdata.rawdata.raw_image array will be NULL after unpack()
- and one of color3_image or color4_image will be not NULL.
I noticed that raw2image() does this and it felt redundant. So I was confused as what is the utility of it, having no historical knowledge about the library. I just started using libraw ( expect more of me around here :) ), so I think there's no point to use old workflows, which will most likely become obsolete soon.
I only wanted to make sure I understand what I am doing. Thank you for your explanation, now it is clear.
As a suggestion: if there would have been a repository for the documentation, I would have done the change myself.
Has anything changed since this page was written?
From my observations unpack doesn't fill image, as the documentation suggests, but it does fill raw_image. Is there an issue with the documentation, or am I doing something wrong?
I want to access unscaled, uneverything, as raw as possible, bayer data. For this, I assume I should only set the use_camera_matrix = 0; use_camera_wb=0; and unpack().
Sorry to bother you again, I managed to resolve the unistd.h issue, by defining JAS_WIN_MSVC_BUILD, and even though preprocessor understands USE_JASPER and looks for all dependencies I still get
jasper.dll ignored; no imports found from jasper.dll
What might be the issue, should I specify jasper in other project than libraw in the solution?
I also have absolutely no clue.
I wrote a Microsoft Visual Basic program to select the pictures that I like and the ones that I don't like, and them send all the 'good' ones to my usb key so I take it out to print.
My friend saw my program and asked if I could include the capability to read .raw files in addition to the .jpgs, so I got here. Absolutely no clue.
I understand that this is a library, and my program should include it in the project and then call it. But that's it. Anyone can help?
(I remember the first time I opened the BASIC shell, and I had no idea... a friend sat by my side to teach me and in ten minutes I was programming like crazy... so yeah, it should be easy when someone shows you... but without it...)
It is exactly what is says: single-channel (black & white) jpeg
JPEG is not limited to 8-bit YCC lossy compressed data.
This data is copied to imgdata.color.cam_xyz
Also, if use_camera_matrix not in effect, imgdata.color.rgb_cam will contain raw to (linear) srgb matrix
pre_mul and cam_mul are in RAW space, these WB multipliers to be applied before color conversion.
rgb_cam is from RAW to 'linear sRGB', so D65.
You can multiply rgb_cam[][] matrix to some adjustment matrix to get other output space (see LibRaw:::convert_to_rgb() source, this function also contains some of correction matrices for Adobe, ProPhoto, WideGamut and XYZ spaces).
http://www.libraw.org/news/libraw-0-18-201604
awesome, thanks for the update!
We'll publish LibRaw 0.18-201604 on github soon (this is not release, but stable intermediate).
This version will support 80D
Use version from github, the 201511 version supports Sony 14-bit files.
Or use this patch: https://github.com/LibRaw/LibRaw/commit/f45e99c750f5196822909ece9c1cfd96...
I'm running into the same issue with this camera. I understand that 0.17 won't be updated but would it be possible to point me to a patch that fixes this? Thanks.
Alex, thanks for your reply. Is there any info about how to interpret FujiExpoMidPointShift and apply it to an image?
At least with BaselineExposure, Adobe published information on how to convert that into a tone curve.
Yes, this is Fuji tag 0x9650
There is no public info how Adobe uses it.
libjpeg-turbo is a 'plugin replacement' for libjpeg.
Just build it in JPEG8-compatible mode and use with libraw. It works.
Is there an optional dependency on turbojpeg?
Thanks.
That was the case, but now I am baffled. If building jasper on linux there are options like
--disable-static and
--enable-shared
On windows however I can only open the .dsw file which generates the solution, and the needed preprocessor definitions for dynamic build are nowhere in the documentation.
Depending of what you do in your code, you may prefer
- do not call raw2image()
- and use imgdata.rawdata.raw_image[] array
This way will not allocate extra (4-component per pixel) image array. It is preferred if you, for example, do own processing in floating point: image[] array is not needed in this case.
For non-bayer images:
- imgdata.rawdata.raw_image array will be NULL after unpack()
- and one of color3_image or color4_image will be not NULL.
I noticed that raw2image() does this and it felt redundant. So I was confused as what is the utility of it, having no historical knowledge about the library. I just started using libraw ( expect more of me around here :) ), so I think there's no point to use old workflows, which will most likely become obsolete soon.
I only wanted to make sure I understand what I am doing. Thank you for your explanation, now it is clear.
As a suggestion: if there would have been a repository for the documentation, I would have done the change myself.
Yes, this part of documentation is outdated. To be fixed ASAP.
If you want to process imgdata.image[] the same way you do it in LibRaw <=0.13, use
raw2image() call after unpack(): http://www.libraw.org/docs/API-CXX-eng.html#raw2image
Has anything changed since this page was written?
From my observations unpack doesn't fill image, as the documentation suggests, but it does fill raw_image. Is there an issue with the documentation, or am I doing something wrong?
I want to access unscaled, uneverything, as raw as possible, bayer data. For this, I assume I should only set the use_camera_matrix = 0; use_camera_wb=0; and unpack().
Please try to decode R3D image. If it works, it may means you've linked jasper statically
Sorry to bother you again, I managed to resolve the unistd.h issue, by defining JAS_WIN_MSVC_BUILD, and even though preprocessor understands USE_JASPER and looks for all dependencies I still get
jasper.dll ignored; no imports found from jasper.dll
What might be the issue, should I specify jasper in other project than libraw in the solution?
Sorry, no ideas on C/C++ library integration with VisualBasic.
I also have absolutely no clue.
I wrote a Microsoft Visual Basic program to select the pictures that I like and the ones that I don't like, and them send all the 'good' ones to my usb key so I take it out to print.
My friend saw my program and asked if I could include the capability to read .raw files in addition to the .jpgs, so I got here. Absolutely no clue.
I understand that this is a library, and my program should include it in the project and then call it. But that's it. Anyone can help?
(I remember the first time I opened the BASIC shell, and I had no idea... a friend sat by my side to teach me and in ten minutes I was programming like crazy... so yeah, it should be easy when someone shows you... but without it...)
Yes, USE_JASPER
But libjusper is needed only for (old) Red JPEG2000-encoded files, no other format uses it.
Thanks.
And as for JasPer I need to specify USE_JASPER? It's weird when I try to do that, because suddenly it wants unistd.h
To use JPEG library you need to add defines USE_JPEG and USE_JPEG8 when you build LibRaw
To use LCMS add USE_LCMS define.
That patch fixed it for the Fuji raw files that I have. Thanks, Alex!
Pages