I am trying to open a tga file on Mac OS X, I have spent past hour fiddeling with this issue, with no luck. I simply want to open a tga file. Here is what I have tried so far,
int filedesc = open("/Users/x2am/Desktop/1177.tga", O_RDONLY);
if(filedesc < 0)
printf("%s ",strerror(errno));
output> Operation not permitted
FILE* fp = fopen("/Users/x2am/Desktop/1177.tga", "rb");
if(fp == NULL) printf("file not loaded");
output> file not loaded
filename = L"/Users/x2am/Desktop/1177.tga";
std::string narrow(filename.begin(), filename.end());
fstream file(narrow.c_str(), ios::in | ios::binary);
if (!file.good()) printf("file not loaded");
output> file not loaded
Considering the output from open(), somehow the operation wasn't permitted.
Here is the get info i performed on the image.
The app is sandboxed,
Now I guess I have tried everything I could. Is there something invisible in front of me that I am missing? Any help much appreciated :)