I’ve been using GDI+ to do some basic image…

less than 1 minute read

I’ve been using GDI+ to do some basic image processing to add PNG output support to an application that previously only handled writing BMP files. I selected the 24bpp RGB format because I didn’t need an alpha channel but the image files weren’t being compressed. The sample code in MSDN shows that the PNG encoder doesn’t have any parameters and it seems compression is dependent upon the bit-depth. Once I selected 32bpp ARGB (the default for the Bitmap class apparently), the compression was enabled and my 150K test file went down to 1K.