In this asp.net web programming tutorial we will learn how to crop an image in asp.net using c# see the below code it will help us how to do cropping.
Give the Image and location x,y with width and height....
Give the Image and location x,y with width and height....
Rectangle srcRect = new Rectangle(LocX, Locy, width, heigth); private static Image cropImage(Image img, Rectangle cropArea) { Bitmap bmpImage = new Bitmap(img); Bitmap bmpCrop = bmpImage.Clone(cropArea, bmpImage.PixelFormat); return (Image)(bmpCrop); }
Tags:
asp.net