473,382 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Extract From Bitmap Band/Strip

Below I can Draw a portion of a Bitmap to a control

what i would like to do is Save the Portion of a Bitmap
strip to a new bitmap 32x32
Can anybody help with this
Thanks

private void pictureBox2_Paint(object sender, PaintEventArgs e)

{

Console.WriteLine(this.pictureBox1.Image.Height);

Bitmap sourceImage = (Bitmap)this.pictureBox1.Image; //.Image;
// Define The Part of Original bit map ive show to the form in a Picturebox

//256 below points to the 7th picture in the source bitmap

Rectangle sourceRectangle = new Rectangle(256,0,32,32);

//define the rectangle where to draw on the control this picture box

Rectangle destinationRectangle = new Rectangle(0, 0, 32, 32);

// And this procedure draws it for us. Easy. OR IS IT?
e.Graphics.DrawImage(sourceImage, destinationRectangle, sourceRectangle,
GraphicsUnit.Pixel);
//DrawFromStripBitmap(sourceImage, pictureBox3,3);

}

Mar 15 '08 #1
0 1153

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: deko | last post by:
I have a table that contains a bunch of pictures. When the user selects a particular image in a form, I need a way to extract the selected bitmap image (stored in an OLE Object table field) to the...
4
by: Guogang | last post by:
Hi, I need to extract plain text from HTML page (i.e. do not show images, html formatting, ...) Is there some C# class/function that can help me on this? Thanks, Guogang
2
by: Alex Gray | last post by:
Hi, I have an app with a whole bunch of buttons, and each of these buttons have their own bitmap file. I would like to just have one giant bitmap, which contains all the images i'll ever want...
3
by: deko | last post by:
I have a Windows Forms app that connects to an Access database. One of the tables in the database contains a bunch of pictures stored in OLE Object fields. What I need to do is extract those...
2
by: DG78 | last post by:
Hi, In VB 2005, How to extract icons (or images or other resources) from a file ..resx, .resource, .dll or .exe and then to create a new file with this resource (.ico, .jpg ..) ? Thanks ...
4
by: samuelberthelot | last post by:
Hi, I would like to extract 'some string' from the following string: <A href=\"#\">some string</A> Attention! This is not an HTML element, it is a STRING, so I can't do ..innerHTML. 'some...
1
by: thepbac | last post by:
Hi . I have a rich text file which contain a bitmap I want extract my bitmap out of the RTF but I can't. Please help me
45
by: Dennis | last post by:
Hi, I have a text file that contents a list of email addresses like this: "foo@yahoo.com" "tom@hotmail.com" "jerry@gmail.com" "tommy@apple.com" I like to
9
Thekid
by: Thekid | last post by:
I want to take a simple bitmap which has 6 horizontal lines of color in it like this: red blue green red blue green I want to move the lines of colors around like this: red red
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.