[Edit] Looks like the exception is actually from me being stupid and not realizing the full scheme for starting GDI+. Turns out you have to call GdiplusStartup and GdiplusShutdown, something that System.Drawing does for you automatically. Throwing this...