IT Community - Software Programming, Web Development and Technical Support

How to Merge Images nearby aside.

This is a discussion on How to Merge Images nearby aside. within the C# Programming forums, part of the Software Development category; Hi, I want to merge images nearby. I have one panel and two pictureboxes in the panel. Two picturesboxes have ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > C# Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 10-25-2007, 08:04 AM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Default How to Merge Images nearby aside.

Hi,

I want to merge images nearby. I have one panel and two pictureboxes in the panel. Two picturesboxes have the image and panel also have the background image. I want to save the three images as one image. Can anyone give me an idea to perform it.
__________________
The OXYGEN
Delivers edgy, intelligent Technology to all...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-25-2007, 08:07 AM
Balasubramanian.S Balasubramanian.S is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 182
Balasubramanian.S is on a distinguished road
Default Re: How to Merge Images nearby aside.

Hi,

This is the sample code to do it.


Bitmap bmp = new Bitmap(panel1.width, panel1.height);
Rectangle rect = new Rectangle(0, 0, panel1.width, panel1.height);
panel1.DrawToBitmap(bmp, rect);
bmp.Save("D:\\test.jpg");

Thanks..

S.Balasubramanian..
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-25-2007, 08:11 AM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Default Re: How to Merge Images nearby aside.

Hi,
I executed your code. It works fine. But, If I set the backcolor property of the picturesBoxes into Transparent, I can't get the clear Image. If I set the backcolor property of pictureboxes to any color, I get the clear image what I want. So, Please give me any idea to solve the problem..
__________________
The OXYGEN
Delivers edgy, intelligent Technology to all...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-26-2007, 09:06 AM
Balasubramanian.S Balasubramanian.S is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 182
Balasubramanian.S is on a distinguished road
Default Re: How to Merge Images nearby aside.

Hi,

You have to set the backcolor property of pictureboxes into any color. Otherwise you got the image with black shades. You have to draw the image in the picturebox with the same height and width of picturebox. So, the backcolor of picturebox is not visible.

Thanks...

S.Balasubramanian..
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I save images to SQL DB? H2o ASP and ASP.NET Programming 2 09-19-2007 12:00 AM
update using merge H2o Database Support 3 08-20-2007 07:16 AM
Rotating Images with PHP Jeyaseelansarc PHP Programming 0 07-17-2007 08:36 AM
Watermarking Images ewriter Java Programming 2 05-08-2007 03:13 AM
Google Images Floppix Google 3 03-08-2007 09:26 PM


All times are GMT -7. The time now is 11:52 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0