Thank you @frinavale. This code is working for me. I did have to use the .NET Frameworks, as the BITMAP class is not found in the .NET core.