title: Extending the list of supported image formats in GDI+
body: <p>To quote the <a href="http://msdn.microsoft.com/en-us/library/system.drawing.imaging(VS.80).aspx" rel="noreferrer">documentation for the System.Drawing.Imaging namespace</a></p>
  
  <blockquote>
    <p>The Encoder class enables users to extend GDI+ to support any image format. </p>
  </blockquote>
  
  <p>Yet I can find no documentation, examples or anything else that explains how I'd go about implementing my own custom file format -- most searches return lots of information on passing EncoderParameters, but nothing on implementing our own Encoders?</p>
  
  <p>Ideally, I'd love to be able to implement this in C#, but I am prepared to dust off my ATL if needs be :)</p>
  
  <p>Has anyone come across any documentation or are able to provide any pointers on how to approach this?</p>
  
  <p><b>Update:</b><br>
  I should probably mention the things I've tried so far, to no avail:</p>
  
  <ul>
  <li>Looking for the GUIDs returned in the <a href="http://msdn.microsoft.com/en-us/library/system.drawing.imaging.imagecodecinfo(VS.80).aspx" rel="noreferrer">ImageCodecInfo</a> class to see if it was a normal COM interface (but it doesn't appear to be), the intention being to look at the implemented interfaces, or see if it's just a registry entry.</li>
  <li>Stepped into <a href="http://msdn.microsoft.com/en-us/library/system.drawing.image.fromfile.aspx" rel="noreferrer">Image.FromFile</a> method to find it's just a wrapper for gdiplus.dll</li>
  <li>Lots of Google searches, which seem to provide lots of cases of using the existing ones with specifying your own ImageEncoderParamerters; and a few cases of people implementing <a href="http://www.codeproject.com/KB/graphics/TargaImage.aspx" rel="noreferrer">their own</a> <a href="http://www.codeproject.com/KB/graphics/readandrenderpgmpbm.aspx" rel="noreferrer">codecs</a> by other means.</li>
  <li>Even asked in <a href="http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.win32.programmer.gdi&amp;tid=a302c363-3891-4e2d-bbbf-c02b2de12fd2&amp;cat=en_US_da48b8fe-0981-4869-b053-0c3a6b27a0a5&amp;lang=en&amp;cr=US&amp;sloc=&amp;p=1" rel="noreferrer">news://microsoft.public.win32.programmer.gdi</a></li>
  </ul>