title: imwrite does not create image
body: <pre><code>#include &lt;opencv/cv.h&gt;
  #include &lt;opencv/highgui.h&gt;
  
  using namespace cv;
  
  int main( int argc, char** argv )
  {
  const char* imageName = "samp.png";
  
  Mat image;
  image = imread( imageName, 1 );
  
  
  Mat gray_image;
  cvtColor( image, gray_image, CV_BGR2GRAY );
  
  imwrite( "/home/Downloads/Pictures/Gray_Image.jpg",gray_image );
  
  
  
  namedWindow( imageName, CV_WINDOW_AUTOSIZE );
  namedWindow( "Gray image", CV_WINDOW_AUTOSIZE );
  
  
  
  imshow( imageName, image );
  imshow( "Gray image", gray_image );
  
  waitKey(0);
  
  return 0;
  }
  </code></pre>
  
  <p>'imwrite" in the above code does not create image.Everything else works fine,and I can see the image using imshow.But I dont know why it is not creating a image.I tried 'convertTo' and replacing '/' to '\' in the path, but it does not work.I will be pleased if I get any lead.Thanks!  </p>