Click here to Skip to main content
11,797,355 members (77,437 online)
Rate this: bad
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 5:38am
SAKryukov at 12-Jun-11 14:36pm
Tag platform and language, to get a real answer.

1 solution

Rate this: bad
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));
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.
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.
SAKryukov at 12-Jun-11 14:37pm
Correct, a 5.

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

  Print Answers RSS
0 CPallini 475
1 OriginalGriff 375
2 Maciej Los 370
3 Abhinav S 359
4 KrunalRohit 291
0 OriginalGriff 2,092
1 Maciej Los 1,760
2 KrunalRohit 1,436
3 CPallini 1,245
4 ppolymorphe 893

Advertise | Privacy | Mobile
Web01 | 2.8.151002.1 | Last Updated 12 Jun 2011
Copyright © CodeProject, 1999-2015
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