title: why cvCopy wouldn't copy whole of my imageData?
body: <p>I contact a problem in my opencv poroject that the cvCopy function don't have normal behavior ! so I write this code to test it.</p>
  
  <pre><code>int n = 6;
  IplImage* img = cvCreateImage( cvSize(n,n) ,1 ,1 );
  uchar* ptr = (uchar*)(img-&gt;imageData);
  
  for(int i = 0 ; i&lt; n*n ; i++)
  {
      ptr[i] = i+1;
  }
  
  std::cout &lt;&lt; "befor copy" &lt;&lt; std::endl;
  for( int i =0 ; i &lt; n*n ;i++)   //print the imageData of img
  {
      if ( i % n == 0 )
          std::cout&lt;&lt;std::endl;
      std::cout &lt;&lt; std::setw(4) &lt;&lt;(int) ptr[i];
  }
  
  IplImage* img2 = cvCreateImage(cvGetSize(img),img-&gt;depth,img-&gt;nChannels);
  cvCopy(img,img2);
  
  ptr = (uchar*)(img2-&gt;imageData);
  std::cout &lt;&lt; "\nafter copy" &lt;&lt; std::endl;
  for( int i =0 ; i &lt; n*n ;i++)    //print the imageData of img2
  {
      if ( i % n == 0 )
          std::cout&lt;&lt;std::endl;
      std::cout &lt;&lt; std::setw(4) &lt;&lt;(int) ptr[i];
  }
  std::cout&lt;&lt;std::endl;
  </code></pre>
  
  <p>but the <strong>output</strong> is :    </p>
  
  <pre><code>befor copy
  
   1   2   3   4   5   6    
   7   8   9  10  11  12
  13  14  15  16  17  18
  19  20  21  22  23  24
  25  26  27  28  29  30
  31  32  33  34  35  36
  after copy
  
   1   2   3   4   5   6
   7   8   9  10  11  12
  13  14  15  16  17  18
  19  20  21  22  23  24
  25  26   0   0   0   0
   0   0   0   0   0   0
  </code></pre>
  
  <p><strong>So, it just copied until the number 26; not all the imageData !</strong><br>
  <strong>why cvCopy behaves like this ?</strong></p>