Hi Alex,
I use the prebuilt library for win 64 and successfully embedded into visual studio. I would like to share my method as following:
1. Extract the binaries for x64.
2. Go into visual project. Open Project Properties, In Configuration Properties:
a. /Debugging/Enviornment: add the path to LibRaw-xxx\bin
b. /C/C++/General/Additional Include Directories: add the path to LibRaw-xxx\
c. /Linker/General/Additional Library Directories: add the path to LibRaw-xxx\lib
/Linker/Input/Additional Dependencies: add libraw.lib and libraw_static.lib
My testing code is following:
int main() {
// Let us create an image processor
LibRaw iProcessor;
// Open the file and read the metadata
iProcessor.open_file("D:/[01]Luan_van_thac_si/PROJECT/Non_Cuda/SLIC/SLICSuperPixel/DSC01042.ARW");
// The metadata are accessible through data fields of the class
cout << "Image width = " << static_cast(iProcessor.imgdata.sizes.width)
<< ", Image height = " << static_cast(iProcessor.imgdata.sizes.height) << endl;
waitKey();
return 0;
}
Results: Image width = 6024, Image height = 4024
I hope this answer will help other users and thanks for wonderful library!
Hi Alex,
I use the prebuilt library for win 64 and successfully embedded into visual studio. I would like to share my method as following:
1. Extract the binaries for x64.
2. Go into visual project. Open Project Properties, In Configuration Properties:
a. /Debugging/Enviornment: add the path to LibRaw-xxx\bin
b. /C/C++/General/Additional Include Directories: add the path to LibRaw-xxx\
c. /Linker/General/Additional Library Directories: add the path to LibRaw-xxx\lib
/Linker/Input/Additional Dependencies: add libraw.lib and libraw_static.lib
My testing code is following:
#include "libraw/libraw.h"
#include "opencv2/highgui/highgui.hpp"
#include "iostream"
#include "stdio.h"
using namespace std;
using namespace cv;
int main() {
// Let us create an image processor
LibRaw iProcessor;
// Open the file and read the metadata
iProcessor.open_file("D:/[01]Luan_van_thac_si/PROJECT/Non_Cuda/SLIC/SLICSuperPixel/DSC01042.ARW");
// The metadata are accessible through data fields of the class
cout << "Image width = " << static_cast(iProcessor.imgdata.sizes.width)
<< ", Image height = " << static_cast(iProcessor.imgdata.sizes.height) << endl;
waitKey();
return 0;
}
Results: Image width = 6024, Image height = 4024
I hope this answer will help other users and thanks for wonderful library!