title: OpenCV - cvLoadImage() can NOT load JPG image
body: <p>I'm a newbie in OpenCV and want to ask a basic question about loading image.</p>
  
  <p>I using OpenCV2.0 and Visual Studio 2008 on windows7.</p>
  
  <p>From what I read and understand there are "cvLoadImage()" function to load image in OpenCV.</p>
  
  <p>I currently try very basic program to load and showed picture in windows.</p>
  
  <p>This is my code:</p>
  
  <pre><code>#include "stdafx.h"
  #include &lt;cv.h&gt;
  #include &lt;highgui.h&gt;
  
  int _tmain(int argc, _TCHAR* argv[])
  {
    IplImage* img = cvLoadImage("C:/hello.jpg");
  
    if (!img)
      printf("Image can NOT Load!!!\n");
  
    cvNamedWindow("myfirstwindow");
    cvShowImage("myfirstwindow", img);
  
    cvWaitKey(0);
    cvReleaseImage(&amp;img);
  
  return 0;
  }
  </code></pre>
  
  <p>The result is I can get the window  with gray color but the image wasn't show.
  I had tried other solution such as put the image inside the project folder and then called it, but still have the same result.</p>
  
  <p>However, when I tried to using other type of image such as .png it successfully loaded.</p>
  
  <p>Is there anyone that have the same problem previously or know any solution to solve this problem?</p>
  
  <p>Thanks,</p>
  
  <p>-jwiil-</p>