Here's my solution for your question :
For Drawing a shadow like Gradient Over an Image we can use LinearGradientBrush
from System.Drawing.Drawing2D
to define a new brush , by using this brush and also Drawing/Filling a Rectangle on the top of the Image we can have the Shadow Effect over our Image
here's the result of using this method :
and here's a sample function which takes a bitmap and returns the Bitmap with Shadow Effect :
private Bitmap AddShodowOnTop(Bitmap bmp)
{
Bitmap bmpGradient = new Bitmap(bmp);
Graphics graphics = Graphics.FromImage(bmpGradient);
LinearGradientBrush linearBrush = new LinearGradientBrush(
new Point(0, 0),
new Point(0, bmp.Height / 5),
Color.FromArgb(130, 0, 0, 0),
Color.FromArgb(0, 0, 0, 0));
graphics.FillRectangle(linearBrush, 0, 0, bmp.Width, bmp.Height / 5);
return bmpGradient;
}
For more Information , please take a look at :
Hope it Helps :)