title: Change dpi of an image in OpenCV
body: <p>When I open an image in OpenCv (which may be of 300 dpi, 72 dpi etc.), the dpi of the image is automatically changed to 96 dpi. I want to variate this dpi. Please help. Thanks in advance...</p>
  
  <pre><code>#include "stdafx.h"
  #include &lt;cv.h&gt;
  #include &lt;cxcore.h&gt;
  #include &lt;highgui.h&gt;
  #include &lt;iostream&gt;
  using namespace std;
  int _tmain(int argc, _TCHAR* argv[])
  {
      IplImage *img1=cvLoadImage("input.jpg");
      cvSaveImage("output.jpg",img1);
      return(0);
  }
  </code></pre>