Posted By

rlynch3 on 08/05/10


Tagged

images Sprites


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Tyster


taking images out of sprites


 / Published in: C#
 

using System.Drawing; using System.Drawing.Imaging;

  1. Bitmap img = new Bitmap(@"C:/imageLocation");
  2.  
  3. Rectangle cropArea = new Rectangle(0, 1100, 150, 105);
  4.  
  5.  
  6. Bitmap croppedImage = img.Clone(cropArea, img.PixelFormat);
  7.  
  8.  
  9. pictureBox2.Image = croppedImage;

Report this snippet  

You need to login to post a comment.