title: Getting cover image from a mobi file
body: <p>I have a .mobi ebook file and I'm trying to extract the book cover image from it with C#.</p>
  
  <p><a href="http://wiki.mobileread.com/wiki/MOBI#MOBI_Header" rel="nofollow">http://wiki.mobileread.com/wiki/MOBI#MOBI_Header</a></p>
  
  <p>I assumed the coveroffset contains the number of bytes from the beginning of the file, at which the cover image starts, but when I read it, I get only some random code, not image code. Not to mention there is no imagelength so I wouldn't even know, how much am I supposed read. So how can I find the image and get it out, if the header information is seemingly no help? I know it can be done, because when I put that mobi file into Calibre, it extracts and shows that cover image.</p>