Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: image ImageProcessing , +
i am having an image1 in a picturebox1 and another image2 on another picturebox2, i want to put image2 from picturebox2 on image1 in picturebox1.
i am using c# language.
 
plz any one help me in this regard.if code provided i will be greatly thankful
Posted 12-Jun-11 6:38am
asma89396
Comments
SAKryukov at 12-Jun-11 14:36pm
   
Tag platform and language, to get a real answer.
--SA

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

That's going to depend on what you mean by "put an image on an image".
If you mean "draw an image on part of another image, destroying what is underneath" then all you need to do is:
using (Graphic g = Graphics.FromImage(myTargetPictureBox.Image))
   {
   g.DrawImage(mySourcePictureBox.Image, new Point(100,100));
   }
  Permalink  
Comments
asma89 at 12-Jun-11 12:26pm
   
Thanks for your kind concern but its not working its not giving any error but when i click the picturebox the image is not drawn on another image in another picturebox.

what should i do ?
SAKryukov at 12-Jun-11 14:36pm
   
It does work. If it does not work for you, show a bigger part of code.
--SA
SAKryukov at 12-Jun-11 14:38pm
   
For example, your original point of second image can be outside of the clip area of the first one; could be different reasons. Check up the geometry and show your code.
--Sa
SAKryukov at 12-Jun-11 14:37pm
   
Correct, a 5.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 245
1 Kamal Rocks 184
2 Sergey Alexandrovich Kryukov 175
3 BillWoodruff 173
4 PIEBALDconsult 160
0 OriginalGriff 5,655
1 DamithSL 4,506
2 Maciej Los 3,997
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,180


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 12 Jun 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100