Add new comment

Problems with msvc 2015 x64 build


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.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;
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.