Hello,
I've experienced some strange results when using a 64bit build of libraw.
The dll and lib has been built with:
call "D:\Programme\Visual Studio 14\VC\vcvarsall.bat" x64 nmake -f Makefile.msvc
in the libraw main directory. (latest test was with 0.18 beta 2) - There are no warnings/errors at build time.
I'm also able to run my code, but I don't get an bitmap output with 16 bits per channel.
Basically I'm just using these lines in C++ (hiding lines not belonging to the libraw problem):
LibRaw lr; lr.open_file(filename); lr.imgdata.params.output_bps = 16; lr.imgdata.params.user_qual = 3; lr.imgdata.params.use_camera_wb = 1; lr.imgdata.params.output_color = 1; lr.imgdata.params.gamm[0] = 1; lr.imgdata.params.gamm[1] = 1; lr.imgdata.params.no_auto_bright = 1; lr.unpack(); lr.raw2image(); libraw_processed_image_t * pri = lr.dcraw_make_mem_image();
And when I read out pri->bits it tells me, that it's 8 bit. Also, reading lr.imgdata.rawdata doesn't have any valid images in it. raw_image, color3_image and color4 image are all uninitialized.
BUT: lr.imgdata.image itself contains a valid image, at least it looks like that.
If I compile everything for 32bit, without any changes to my code, it works like expected; pri->bits is "16" and also the lr.imgdata.rawdata vars are filled correctly.
Am I doing something wrong? The 64bit build is more or less essential, because the application needs a lot of memory - so a 32bit build wouldn't be a solution.
PS: At the moment I could not test the latest 0.18 release, because I get access violations.
Sorry, no MSVC 2015 on hands,
Sorry, no MSVC 2015 on hands, just tried with MSVC 2013:
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x64
nmake -f Makefile.msvc
After that:
mem-image -4 -6 filename.cr2
filename.cr2.ppm (16 bit, linear) was produced, looks OK
-- Alex Tutubalin @LibRaw LLC
mem_image works
Yeah. I've also did your test (same image), it produces a 16bit ppm.
I guess I need to clean up my code and see where this behaviour comes from.
error found
Found it. Mea culpa.
I've added the path to the old libraw 0.17 include files. Removed it and it now works.
But awsome how fast you did reply! :)