Blackninja2007
asked on
Help DrawImage in System.Drawing Namespace
In the past when coding using VB6 I frequently use to use BitBlt to transfer images to the visible screen. One function this offered was the ability to "AND" the source image, with the destination image. I cannot find a way to do this in VB.Net. Does anyone know if it is possible using the System.Drawing namespace ? or is there a different way to product this function ? or should I stay with BitBlt (and is API Bitblt still supported in Vista?)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for you assist, I guess confirmation for me to use bitblt, as .NET does not provide this functionality. Thanks again.
If I understand correctly you can do this in .Net...I ~think~ you want something like this:
Dim bmp As New Bitmap(someWidth, someHeight)
Dim G As Graphics = Graphics.FromImage(bmp)
G.Clear(Color.Green) ' fill it with green
' ...draw on it somehow...
' Manually:
G.DrawLine(Pens.Black, 0, 0, 100, 100)
' Draw another Image on top:
G.DrawImage(someMemoryImag eHere, New Point(0, 0))
G.Dispose()
' ...do something with "bmp"...
Dim bmp As New Bitmap(someWidth, someHeight)
Dim G As Graphics = Graphics.FromImage(bmp)
G.Clear(Color.Green) ' fill it with green
' ...draw on it somehow...
' Manually:
G.DrawLine(Pens.Black, 0, 0, 100, 100)
' Draw another Image on top:
G.DrawImage(someMemoryImag
G.Dispose()
' ...do something with "bmp"...
ASKER
Hi Idle I have attached an image showig a sample of what I mean.
Image1.jpg
Image1.jpg
Ok...so more of an alpha blend image then?
That is also possible to do in .Net:
https://www.experts-exchange.com/questions/21302112/multiple-images-color-blending.html#13228503
That is also possible to do in .Net:
https://www.experts-exchange.com/questions/21302112/multiple-images-color-blending.html#13228503
ASKER
Is BitBlt still accepted as good/acceptable programming structure then for this kind of function ?