Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It was for joining </p> <pre><code>Bitmap first = new Bitmap (picturebox1.Image); Bitmap second = new Bitmap (picturebox2.Image); Bitmap result = new Bitmap (first.Width+first.Width, first.Height); Graphics g = Graphics.FromImage(result); g.DrawImageUnscaled(first, 0, 0); g.DrawImageUnscaled(second,first.Width, 0); </code></pre> <p>Try this for merging one on top another . set alpha by yourself ( red: U can use BitMap.MakeTransParent if u not want alpha)</p> <pre><code> public Bitmap SetImageOpacity(Image image, float opacity) { try { //create a Bitmap the size of the image provided Bitmap bmp = new Bitmap(image.Width, image.Height); //create a graphics object from the image using (Graphics gfx = Graphics.FromImage(bmp)) { //create a color matrix object ColorMatrix matrix = new ColorMatrix(); //set the opacity matrix.Matrix33 = opacity; //create image attributes ImageAttributes attributes = new ImageAttributes(); //set the color(opacity) of the image attributes.SetColorMatrix(matrix, ColorMatrixFlag.Default, ColorAdjustType.Bitmap); //now draw the image gfx.DrawImage(image, new Rectangle(0, 0, bmp.Width, bmp.Height), 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, attributes); } return bmp; } catch (Exception ex) { return null; } } private void button1_Click(object sender, EventArgs e) { Bitmap first = new Bitmap(pictureBox1.Image); Bitmap second = SetImageOpacity(pictureBox2.Image, 0.5f); //Bitmap result = new Bitmap(first.Width, first.Height); //fix : Bitmap result = new Bitmap(Math.Max(first.Width,second.Width), Math.Max(first.Height,second.Height)); Console.WriteLine(first.Width); Graphics g = Graphics.FromImage(result); g.DrawImageUnscaled(first, 0, 0); g.DrawImageUnscaled(second, 0, 0); pictureBox3.Image = result; result.Save("result.jpg" ); } } } </code></pre> <p><strong>And Coming For watermark why not you want to use Drawstring with alpha here is article for all these <a href="http://www.codeproject.com/Articles/5034/How-to-implement-Alpha-blending" rel="nofollow">http://www.codeproject.com/Articles/5034/How-to-implement-Alpha-blending</a></strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload