Port of SxImage to Visual Studio 2010