View Single Post
  #1 (permalink)  
Old November 23rd, 2011, 05:07 AM
Gary108 Gary108 is offline
Authorized User
Points: 193, Level: 3
Points: 193, Level: 3 Points: 193, Level: 3 Points: 193, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Nov 2011
Posts: 31
Thanks: 6
Thanked 0 Times in 0 Posts
Smile Cloning section of a bitmap image


I am really new to programming in Visual Basic 2010. I would like to know how to write the code so I can automatically clone a specified rectangular section of a given bitmap image and place the new image in a specified picture box.

For example, I have an image called kite.bmp and I want to clone a section consisting of the pixels 0 to 100 on the X axis and 0 to 100 on the Y axis and I want to place the new image in pictureBox1.

In my particular application this process would be done thousands of times per image, cloning a different specified section each time. Although I could use an imaging editing program like PhotoShop to do this on an individual basis, it would clearly be impractical to manually run this process so many times. That is why I need to write the code to run the process automatically. In affect would be breaking down the entire Bitmap image, one section at a time, into individual pictures.

If I can understand how to do one, I think I can write the code for them all. I have been stumped by this for days and it seems that it should be fairly straight forward. I anyone can help me I would greatly appreciate it.

Last edited by Gary108; November 23rd, 2011 at 11:10 AM.. Reason: Mispelled words and to make it easier to understand.
Reply With Quote