I am trying to get the size of an image file by doing the following
fp = fopen(path,"rb");
fseek(fp,0,SEEK_END);
size = ftell(fp);
fseek(fp,0,SEEK_SET);
The problem is that when I get to the first fseek my program terminates. I have tested with a text files and it works and have seen some other examples online where the same method applies to images.