473,516 Members | 2,771 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

concat two bitmaps?

is there anyway to connect to bitmaps together?
basically, I have a program that generates a graph as it runs, and I can
capture an image of the graph, but is there a way to take two captures, and
join them together so it looks like one big graph?
Nov 15 '05 #1
2 13388
Well, what you would do is create a new image with dimensions big enough to
fit both of the smaller ones, create a Graphics objects from the destination
image, and then use the source objects to draw the source images on the
graphics from the destination image in the desired spots. Of course, all
this accomplishes is setting the two images next to each other; anything
requiring an actual change to the source images would be infinitely more
complicated to implement. Any questions?

Chris

"Phil" <we*******@visualcoders.net> wrote in message
news:OP**************@TK2MSFTNGP12.phx.gbl...
is there anyway to connect to bitmaps together?
basically, I have a program that generates a graph as it runs, and I can
capture an image of the graph, but is there a way to take two captures, and join them together so it looks like one big graph?

Nov 15 '05 #2
I just noticed Christopher replied. But here's some code that should
do the trick:
(note, there's a lot of scaling, rotating, etc. you can do in the
gr.DrawImage).
Bitmap bmp1 = new Bitmap(@"C:\windows\Coffee Bean.bmp");
Bitmap bmp2 = new Bitmap(@"C:\windows\Soap Bubbles.bmp");
int width = bmp1.Width + bmp2.Width;
int height = Math.Max(bmp1.Height, bmp2.Height);
Bitmap fullBmp = new Bitmap(width, height);
Graphics gr = Graphics.FromImage(fullBmp);
gr.DrawImage (bmp1, 0, 0, bmp1.Width, bmp1.Height);
gr.DrawImage (bmp2, bmp1.Width, 0);
fullBmp.Save( blah );


"Phil" <we*******@visualcoders.net> wrote in message
news:OP**************@TK2MSFTNGP12.phx.gbl...
is there anyway to connect to bitmaps together?
basically, I have a program that generates a graph as it runs, and I can capture an image of the graph, but is there a way to take two captures, and join them together so it looks like one big graph?


Nov 15 '05 #3

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

Similar topics

0
2201
by: Brad Smalling | last post by:
Does anyone know if there is a reason to prefer bitmaps over icons (or vice-versa) when populating image lists? I've always favored icons because of their built-in transparency (although I've never use the invert "color"). But I've noticed that Microsoft seems to favor bitmaps in many of their sample applications. Is there a reason? For...
4
8325
by: Gerald Aichholzer | last post by:
Hello, I need to specify the following attribute in an xhtml-file containing TAL templates: <div tal:attributes="onMouseOver concat('func(',xyz,')')"> which results in <div onMouseOver=func( )>
1
2375
by: Mark Evans | last post by:
I have a dialog box and on it I want to display a bitmap, which will change at various times during the program. My problem is that the bitmaps will not be the same each time. I want the user to put their own bitmaps into a directory and the application will pick them off and display them as required. The bitmaps will always be called the...
16
7961
by: Jacky | last post by:
Hi, Concat wors as tmpStr = tmpStr.Concat(tmpStr, tmpStr2) Why it do not refer to owner object so tmpStr.Concat(tmpStr, tmpStr2) and now tmpStr has same value as upper?
1
1913
by: Trint Smith | last post by:
Ok, I have a webform that has these checkboxes: 1. something 2. something else 3. and something else When the user clicks on the checkbox, I want all of the selections to go into a textbox if all are checked. But currently, just the last selection is going in. Here's the code I have:
4
1662
by: Nathan | last post by:
Hello, I'm needing some advice: I have an app for which I've built a timer out of multiple bitmaps--a clock with a moving hands. I've saved each hand position (1 second, 2 seconds, etc.) as a separate bitmap, and I make the clock "tic" down by changing the image of a picture box. The problem, of course, is that the application uses tons...
2
2055
by: Mike | last post by:
Hello everybody. I am drawing a country map that consists of 149 municipality bitmaps, each around 25 Kb. I draw it onto the in-memory bitmap, then draw it on the picture box. I use C++, but anyways if I were using the C# the question would be the same. And here is the problem: it takes 700 ms to draw it, and anything above 300 ms is...
4
20754
by: Martin Evans | last post by:
Hi, I'm getting: DBD::DB2::db do failed: SQL0440N No authorized routine named "CONCAT" of type "FUNCTION" having compatible arguments was found. SQLSTATE=42884 for some SQL like this:
1
2707
by: nkumarin001 | last post by:
Hi, Can anyone help me in this matter:- When i was studying locally managed tablespaces i came across bitmaps that are used in locally managed tablespaces it stated that:- "Locally managed tablespaces use bitmaps stored within the header of the datafiles comprising a tablespace to track the space utilization of the tablespaces." ...
0
7276
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7182
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7408
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7581
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7142
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5714
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5110
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3259
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1624
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.