try
{
Bitmap bmp = new Bitmap(250, 50);
Bitmap bmp2 = new Bitmap(@"C:\Users\vinayakk\Desktop\tenant_notselected.jpg");
BitmapData data = bmp2.LockBits(new Rectangle(0, 0, 250, 50), ImageLockMode.ReadWrite, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
BitmapData dta1 = bmp.LockBits(new Rectangle(0, 0, 250, 50), ImageLockMode.ReadWrite, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
unsafe
{
}
dta1.Scan0 = data.Scan0;
bmp2.UnlockBits(data);
bmp.UnlockBits(dta1);
bmp.Save("--Your path.jpg--");
bmp2.Dispose();
}
catch (Exception)
{
throw;
}
Change the paths. Your selection is saved. Uncomment the code in the loop the pixel colors are changed.