Sir/Madam,
how to cut a particular part from image and how can get that part in image box.
How to cut one part from image
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Suthish NairRank #92 · 22.8K reputationPosted Oct 1, 2010, 2:09 AM EDT
string path = "C:\\test.jpg"; using (Bitmap orignal = new Bitmap(path)) { using (Bitmap newimage = new Bitmap((int)(orignal.Width * 0.5), (int)(orignal.Height * 0.5))) { using (Graphics newgraphics = Graphics.FromImage(newimage)) { newgraphics.DrawImage(orignal, 0, 0, new Rectangle(newimage.Width, newimage.Height, orignal.Width - newimage.Width, orignal.Height - newimage.Height), GraphicsUnit.Pixel); newgraphics.Flush(); } newimage.Save(new System.IO.FileInfo(path).DirectoryName + "out.jpg", System.Drawing.Imaging.ImageFormat.Jpeg); } }Manikavelu VelayuthamRank #413 · 6K reputationPosted Oct 1, 2010, 1:30 AM EDT
Does the requirement is in Windows or Web Application ?
Gomathi PalaniswamyRank #714 · 3.3K reputationPosted Oct 1, 2010, 1:49 AM EDT