title: Getting the size of jpeg image
body: <p>I am trying to get the size of an image file by doing the following</p>
  
  <pre><code>fp = fopen(path,"rb");
  fseek(fp,0,SEEK_END);
  size = ftell(fp);
  fseek(fp,0,SEEK_SET);
  </code></pre>
  
  <p>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. </p>