title: How to convert from jpg to bmp by using CImg library?
body: <p>I want to convert JPG to BMP file. I am using a library called <code>CImg</code>.<br>
  I am using the following code to do the conversion operation:</p>
  
  <pre><code>#include "CImg.h"  
  using namespace cimg_library;
  
  int main(int argc, char *argv[]) {
  
      CImg&lt;unsigned char&gt; image("picture.jpg");
      image.save_bmp("imgB.bmp");
  
      return 0;
  }
  </code></pre>
  
  <p>But the following error occurs:</p>
  
  <p><a href="https://i.stack.imgur.com/c04qG.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/c04qG.jpg" alt=""></a></p>
  
  <p>What might be the problem. Is there something I missed?</p>