title: Convert bitmap to PNG in-memory in C++ (win32)
body: <p>Can I convert a bitmap to PNG in memory (i.e. without writing to a file) using only the Platform SDK? (i.e. no libpng, etc.).</p>
  
  <p>I also want to be able to define a transparent color (not alpha channel) for this image.</p>
  
  <p><strong>The GdiPlus solution seems to be limited to images of width divisible by 4</strong>. Anything else fails during the call to Save(). Does anyone know the reason for this limitation and how/whether I can work around it?</p>
  
  <p><strong>Update: Bounty</strong></p>
  
  <p>I'm starting a bounty (I really want this to work). I implemented the GDI+ solution, but as I said, it's limited to images with quad width. The bounty will go to anyone who can solve this width issue (without changing the image dimensions), or can offer an alternative non-GDI+ solution that works.</p>