using System.Drawing; Bitmap myImage = new Bitmap("image.bmp"); Color pixelColor = myImage.GetPixel(50, 100);
using System.Drawing; Bitmap myImage = new Bitmap("image.bmp"); for (int x = 0; x < myImage.Width; x++) { for (int y = 0; yIn this example, we loop through every pixel in the image and retrieve its color using GetPixel. This can be useful for analyzing or modifying the colors of an image. The package library for the System.Drawing namespace is usually included in the .NET Framework.