Hi,
I am loading a Bitmap file and then changing the EXIF data in it and trying to save it back to the same filename, however this doesnt work.
The Bitmap.save documentation says "Do not save an image to the same stream that was used to construct the image. Doing so might damage the stream.", does this have something to do with my issue?
My code for loading is:
<std::string fullPath = imgFolderPath + "\\" + imageFileNames[i];
std::wstring wstr(fullPath.begin(), fullPath.end());
Bitmap* bitmap = new Bitmap(wstr.c_str());>
and my code for saving is:
<bitmap->Save(wstr.c_str(), &clsid, NULL);>
I am working with.jpgs, if the file path in the saving is different from that of the loading it works just fine, it just refuses to save to the same file.
Is there a way to do this or a work around to do this?
are you including the following code: GetEncoderClsid(L"image/jpg", &clsid);?
If so than the next step is to step though the code just to see if you are doing what you think you are doing.
You might be doing something like assigning a nullptr somewhere