Fixed memory leak by adding a using statement for the image instantiation