how to superimpose image over image RRS feed

  • Question

  • User735199033 posted


    <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>

     Could please you please tell me how to solve this problem, 

      I have Category and products, after selecting category and products,


      I am display product Image and also I am giving aspx file upload control to upload logo and display logo on middle of the product image

    <o:p> </o:p>

      User will select image and click on submit button. Then uploaded logo should be in    Middle of the product image

    <o:p> </o:p>

      Example (if product image width 200 and height 200) and then uploaded image should be placed center of product image.

    <o:p> </o:p> Please help me how to solve this problem<o:p></o:p>


     Thanks & Regards

     Ramesh <o:p></o:p>


    Tuesday, September 23, 2008 8:10 AM

All replies

  • User1155728566 posted

    This is windows code but I'm sure you can solve it, I used it in the mouse clicked event to obtain the x an y coordinates - since you have the coordinate already just hard code it or calculate it, instead of using the mouse xy.


    int x = e.X - 20;

    int y = e.Y - 20;


    // Get a graphics context

    Graphics g = Graphics.FromImage(picboxMainDiagram.Image); // will need to change this for the web

    //// Create a solid brush to write the watermark text on the image

    Brush redBrush = new SolidBrush(Color.Red);

    g.DrawIcon(global::eVehicleInspection.Properties.Resources.Pin, x, y); // I used a pin icon image here from the resource file

    Font fnt = new Font("Arial", 25f, FontStyle.Regular);

    g.DrawString("Message" fnt, redBrush, x + 25, y);


    Wednesday, October 1, 2008 8:44 AM