Moved Direct2D image code to its own class