title: Image saved with imwrite() with lossless mode is not visible
body: <p>I want to save my image as JPEG so I used <code>imwrite</code> function in MATLAB. But because JPEG follows lossy format, I am not getting exact intensity values when the file is saved as .jpg</p>
  
  <p>I tried </p>
  
  <pre><code>imwrite(a, 'a.jpg', 'Mode', 'lossless');
  </code></pre>
  
  <p>So I got the exact intensity values but the image is not visible in respective folder. It is visible only in the MATLAB environment.</p>
  
  <p>I must save my image in JPEG format only. So please suggest me any other alternative to save image as JPEG which can save image with same intensity values.</p>