Sample I can't find a way to attach a file, but here is a sample code that fails. I an extracting a lot of information so I am putting everything into a stream. #include "libraw/libraw.h" #include < iostream > #include < sstream > void getGPSinfo(string fileName) { LibRaw proc; FILE *pf; ostringstream stream; proc.open_file(fileName); libraw_gps_info_t GPSInfo = proc.imgdata.other.parsed_gps; stream << "\"GPSAltitudeRef\"" << "->" << to_string(GPSInfo.altref); pf = fopen("somePath\\debug.txt", "w"); fprintf(pf, stream.str().c_str()); fclose(pf); proc.recycle(); } reply
I can't find a way to attach a file, but here is a sample code that fails. I an extracting a lot of information so I am putting everything into a stream.
#include "libraw/libraw.h"
#include < iostream >
#include < sstream >
void getGPSinfo(string fileName)
{
LibRaw proc;
FILE *pf;
ostringstream stream;
proc.open_file(fileName);
libraw_gps_info_t GPSInfo = proc.imgdata.other.parsed_gps;
stream << "\"GPSAltitudeRef\"" << "->" << to_string(GPSInfo.altref);
pf = fopen("somePath\\debug.txt", "w");
fprintf(pf, stream.str().c_str());
fclose(pf);
proc.recycle();
}