title: How to convert SVG to BMP?
body: <p>This question may have been answered in multiple websites. However, I am having issues getting it to work correctly.</p>
  
  <p>My goal is to convert an SVG file to BMP using command line. Below is the content of a simple SVG file. Note the resolution must be 912x1140px. Thus the resulting BMP file must be 912x1140px as defined in the SVG. </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;svg baseProfile="full" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink" width="912px" height="1140px" preserveAspectRatio="none" viewBox="0,0,9.855,6.1614"&gt;&lt;defs /&gt;
  &lt;rect fill="#FFF" height="100%" width="100%" x="0" y="0" /&gt;
  &lt;rect x="4" y="2.5" width="1.0" height="1.0" fill="#000" /&gt;
  &lt;/svg&gt;
  </code></pre>
  
  <p>When I use GIMP using GUI, the resulting BMP file is correct as expected having a size of 912x1140px. The size of the file is ~3.96MB. However I must use the GUI to open my SVG file and manually convert it to BMP. I prefer to use command line because I have a batch of SVG files I want to convert. </p>
  
  <p>When I use ImageMagick to convert, the resulting BMP file gets resized to 855x1069px instead of staying at 912x1140px. The resulting BMP file ~3.48MB: <code>convert myfile.svg myfile.bmp</code></p>
  
  <p>When I use rsvg-convert, the resulting BMP file is correct 912x1140 but its around 7KB. I am unsure if rsvg-convert even supports BMP format because according to the <a href="https://manpages.ubuntu.com/manpages/trusty/man1/rsvg-convert.1.html" rel="nofollow noreferrer">docs</a>, BMP is not listed as the support format. Thus this leads me to question if the convert BMP file is even correct. <code>rsvg-convert -o myfile.bmp myfile.svg</code></p>
  
  <p>When I use command line Inkscape, the resulting BMP file is correct resolution of 912x1140, but size is around 6.51KB. I am unsure if this is correct since the BMP file generated using GIMP results in a file size of 3.96MB. Secondly, Inkscape GUI doens't have any options to export to BMP. In addition, it defaults to 32 bits. I want it to be 24 bit depth. <code>inkscape -z myfile.svg -e myfile.bmp</code></p>