Updated C# image code to create a smaller image