Use native code instead of ATL::CImage

Here is the one using native/image code instead of ATL::CImage