Closed mschaudhari closed 6 years ago
You can't just cast raw bytes into an Image object.
Replace:
fileData= (Image*)malloc((length+1)*sizeof(char));
fread(fileData, length, 1, fp);
With (completely untested):
Aws::Utils::ByteBuffer rawFileData(length);
fread(rawFileData.GetUnderlyingData(), 1, length, fp);
fileData = new Image;
fileData->SetBytes(rawFileData);
Thanks for your response. It's working fine.
I'm having a problem with Index_Faces using Amazon aws-cpp-sdk. I'm getting segmentation fault in following program.
So, how to provide image file from my local system to amazon aws-cpp-sdk?