473,396 Members | 1,760 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,396 software developers and data experts.

Using Images in vb.net

H

I'm writing a control which has a property called Picture of type Image. Once an image has been assigned to the property (no problems there) I need to split it up into a number of sub images e.g. cut it into 4 equal pieces, which is what I'm having problems with

I've been looking at the various System.Drawing... namespaces but haven't found anything that'll do this or, at least, if it's there I've missed it

Have I missed comething really obvious? How do I do this

Many thank

Ala
Nov 20 '05 #1
2 1655
In article <09**********************************@microsoft.co m>,
an*******@discussions.microsoft.com says...
Hi

I'm writing a control which has a property called Picture of type Image.
Once an image has been assigned to the property (no problems there)
I need to split it up into a number of sub images e.g. cut it into
4 equal pieces, which is what I'm having problems with.

I've been looking at the various System.Drawing... namespaces but
haven't found anything that'll do this or, at least, if it's
there I've missed it.

Have I missed comething really obvious? How do I do this?


Check out the overloads on Graphics.DrawImage. One of them allows only
a portion of the image to be drawn -- and you can "draw" on another
image object.

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
Nov 20 '05 #2
* =?Utf-8?B?QWxhbiBMYW1iZXJ0?= <an*******@discussions.microsoft.com> scripsit:
I'm writing a control which has a property called Picture of type
Image. Once an image has been assigned to the property (no problems
there) I need to split it up into a number of sub images e.g. cut it
into 4 equal pieces, which is what I'm having problems with.


Have a look at the 'Bitmap' and 'Graphics' classes. You will have to
instantiate bitmaps of appropriate size and then draw the part of the
big image into them ('Graphics.FromImage' -> 'Graphics' object's
'DrawImage' method).

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

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

Similar topics

4
by: NohaKhalifa | last post by:
Dear All; I'm developing a web site and i need to make adminisration for this site it's a site for Real Estates . But I don't need the administration to be online .. I want them to fill data...
4
by: Applebrown | last post by:
Greetings, I'm attempting to make a simple horizontal navbar with three image links, and with those images replaced on hover and active... and I'm not sure of the proper CSS to do this, though...
6
by: wattanabi | last post by:
Greetings, I'm attempting to layout a bunch of images in a grid using DIV's instead of a table. I currently have a 3x6 table that I need to convert to css. I've seen various example of a 3 to 4...
0
by: Frenchie | last post by:
Hi, I have created a very neet menu from an example found on the MSDN library at: http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.menuitembinding.imageurlfield.aspx My...
9
by: Nathan Sokalski | last post by:
I am using ASP.NET 2.0's ImageMap Control to create 2 imagemaps, one directly below the other. When I do this a thin blank space appears between them. After several days of frustration I realized...
1
by: snitu | last post by:
hello i am new to using javascript. i have a problem in creating texonomy using xml file in javascript. my xml file is this ________________________________________ <?xml version="1.0"?>...
7
by: snitu | last post by:
hello i am new user of this forum. i have a problem in javascript code. plz. give me idea about how to create tree using xml file (not using xsl file) in javascript. i am also sending my...
1
by: soms2m | last post by:
HELLO ALL, I want to fill the parent window height with respect to the sub window height which is loading using ajax (mootools). For example if the parent window height is normal and the loading...
1
by: Manil | last post by:
I usually have no problem with Firefox, but here is a rare instance of IE displaying a table with image slices correctly and Firefox adding space where I seemingly have none. Is there anything I can...
5
by: remon87 | last post by:
I need some help. I have javasript that creates the submenu but it works if I have a text with css. I need it to do the same with a roll over images. so when I click on the image the submenu...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.