"sum" 2 bitmaps

  • Thread starter Thread starter MarcuEusebiu
  • Start date Start date
M

MarcuEusebiu

Hello...
I have to bmps (100X100) and 1`st has an A on the left side and the
other has a B on the right side. I want to "sum" this bitmaps to
obtain a bitmap that contains "AB".
I thought to use GDI32 SelectObject and BitBtl methods.... but I had
no luck...
Can someone help me?
Thanks
 
Hello...
I have to bmps (100X100) and 1`st has an A on the left side and the
other has a B on the right side. I want to "sum" this bitmaps to
obtain a bitmap that contains "AB".
I thought to use GDI32 SelectObject and BitBtl methods.... but I had
no luck...
Can someone help me?
Thanks

Hi Marcu,

Can you please explain your needs further?

Do you need one A&B concatenated BMP (200X100) ?

Moty
 
Seems that I forgot to mention that the result bitmap must be 100X100.
If I put A over B, B becomes the background of A... just like if A has
a transparent backgound, and if I put it over B, I can see the B
bitmap.
 
Thanks... on the Bob Powel website I have found the solution...

e.Graphics.DrawImage(a, new Point(0, 0));
ImageAttributes ia = new ImageAttributes();
ColorMatrix cm = new ColorMatrix();
cm.Matrix33 = 0.5f;
ia.SetColorMatrix(cm);
e.Graphics.DrawImage(b, new Rectangle(0, 0, b.Width, b.Height), 0, 0,
b.Width, b.Height, GraphicsUnit.Pixel, ia);

So simple....
Thanks!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top