gdiplus errors - how to use a workaround