--- readpng.org.c	2011-06-11 15:08:00.000000000 -0500
+++ readpng.c	2011-06-16 11:38:32.000000000 -0500
@@ -186,6 +186,10 @@
 		biSrc.bmiHeader.biBitCount = 24;
 		biSrc.bmiHeader.biSizeImage = width*height*3;
 	}
+  if (!pMask && (color_type == PNG_COLOR_TYPE_RGB_ALPHA)) {
+	  bi.bmiHeader.biBitCount = 32;
+	  bi.bmiHeader.biSizeImage = width*height*4;
+  }
 		
 	hDC = GetDC(hWnd);
 	
@@ -313,4 +317,3 @@
 	}
 	return (TRUE);
 }
-
