0.18 will receive only security fixes, no new cameras, sorry.
LibRaw is surely compatible with gcc 4+, clang 3+ (may be 2+ too), Visual Studio 2010+ (not sure about 2008). Most of these tools are available for free (including Visual Studio community edition), so I advise you to switch to current public snapshot (from github), it is stable enough for production use (and we use it for RawDigger and FastRawViewer).
Thanks for your reply and for taking time to find a solution so quickly.
I have not yet tried to build libRaw from sources, this is not easy for me because I have to use an old version of Visual Studio (2005) for my application. Do you plan to release a 0.18.x version including this fix or will it be in 0.19 ?
Thanks for yout fast reply. I am going to send you one samle file right now.
I just want to correct something that I said in my first post. Suspecting an authorization problem, I changed the location of the input file : now, I get an error code -2 (Unsupported file format or not RAW file) when using open_file.
Oh, so this won't work for a photo of the sea and sky, or a forest canopy with little sky, etc.
I will take a look at that code after I finish some other things, thanks!
This code cycle through image[] 8x8 blocks, skip blocks with data near sensor saturation and calculates pixel sum/count for other (non-saturated) blocks to get mean per-channel values.
This code assumes entire image is (average) gray. If not, auto-WB will not work well.[/geshifilter-c]
Sorry, I meant if there was a way to get the auto WB. I know I can get the "as shot" WB.
Right now, I do things like this:
Init, open, unpack, raw2image, black subtraction, apply WB, debayer, sRGB, gamma curve then I do things like contrast and saturation.
Is there a function I can call after black subtraction to make LibRaw return an auto calculated WB, preferably accessible from C, without doing further data processing?
Thank you for you help.
I finally found that it was a common issue but it seems I was typing bad keywords (or Google had problems with "_imp___"
Cheers
It's ok. I have just tried the patch, no crash happens now.
Thanks !
Here is the patch: https://www.dropbox.com/s/rq6x147fhbpruzr/libraw-tiled-dng-patch.patch?dl=0
(in short: for tiled DNGs last tile/tiles row may be larger than row/col count, so buffer overrun may occur).
OK, got it (reproduced) with MSVC 2010/32 bit.
It's ok with development snapshot, files are handled perfectly.
Thanks again for your help.
Also, no problems with
MSVC 2013/x64, nmake -f Makefile.msvc
dcraw_emu -T yourfile.dng produces TIFF file as expected
Could you please provide more details about the crash? May be binary + .pdb file + crash dump?
Thank you (again) for the file.
I'm unable to reproduce the crash using LibRaw compiled with gcc5/freebsd. Will check more with Windows/Visual studio
OK, thanks for your fast reply. I will try with development snapshot.
Thank you for the files.
There is bug in 0.18 in handling some NRW files.
Development snapshot handles these files OK, use it: https://github.com/LibRaw/LibRaw/
(this snapshot is stable for release use, it tested with our RawDigger/FastRawViewer sw).
LibRaw 0.18 will receive security fixes only. Use public development snapshot, it is stable enough to use in production
Ok, I will give it a try. Thanks a lot for your great work.
0.18 will receive only security fixes, no new cameras, sorry.
LibRaw is surely compatible with gcc 4+, clang 3+ (may be 2+ too), Visual Studio 2010+ (not sure about 2008). Most of these tools are available for free (including Visual Studio community edition), so I advise you to switch to current public snapshot (from github), it is stable enough for production use (and we use it for RawDigger and FastRawViewer).
Thanks for your reply and for taking time to find a solution so quickly.
I have not yet tried to build libRaw from sources, this is not easy for me because I have to use an old version of Visual Studio (2005) for my application. Do you plan to release a 0.18.x version including this fix or will it be in 0.19 ?
Thanks.
Eric
Thank you for sample.
This is due to additional raw metadata integrity check added somewhere before 0.18 version.
It is already fixed in development snapshot, please apply this patch to 0.18: https://github.com/LibRaw/LibRaw/commit/ade8d9a0be16079b177bdb5ec33dd880...
Thanks for yout fast reply. I am going to send you one samle file right now.
I just want to correct something that I said in my first post. Suspecting an authorization problem, I changed the location of the input file : now, I get an error code -2 (Unsupported file format or not RAW file) when using open_file.
You may upload sample to some file sharing service (Dropbox, Google drive, WeTransfer/free version, etc) and send link to info@libraw.org
Please do not use 'share for' Google/Dropbox service, because it requires account linked to specific email, just 'share for anyone who knows the URL'
Could you please provide sample file that do not open?
Do not use mingw, according to quick googling you need to add ws2_32 library to link options to get htons and other these functions for mingw: http://mingw.5.n7.nabble.com/Link-error-undefined-reference-to-htonl-4-w...
Well, if the "as shot" multipliers worked, I wouldn't have asked about the auto WB thing :)
Yes, auto balance does not work well for colored shots. Use as-shot (camera wb) instead.
Oh, so this won't work for a photo of the sea and sky, or a forest canopy with little sky, etc.
I will take a look at that code after I finish some other things, thanks!
sorry for geshifilter-c in previous message, sometimes code formatter on our site works strange :)
this is just [ c ]
There is no exposed function.
You may steal code from internal\dcraw_common.cpp:scale_colors() function;
Starting with
And up to final calculation of pre_mul:
This code cycle through image[] 8x8 blocks, skip blocks with data near sensor saturation and calculates pixel sum/count for other (non-saturated) blocks to get mean per-channel values. This code assumes entire image is (average) gray. If not, auto-WB will not work well.[/geshifilter-c]
Sorry, I meant if there was a way to get the auto WB. I know I can get the "as shot" WB.
Right now, I do things like this:
Init, open, unpack, raw2image, black subtraction, apply WB, debayer, sRGB, gamma curve then I do things like contrast and saturation.
Is there a function I can call after black subtraction to make LibRaw return an auto calculated WB, preferably accessible from C, without doing further data processing?
as-shot balance (cam_mul) is avaliable just after LibRaw::open_file()
To calculate auto-wb you may use raw data with black subtracted (Libraw does this at LibRaw::scale_colors() call, before interpolation step)
Pages