Combining Ink Strokes with Background Image into a Bit map Image

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

H
I need to combine Ink strokes with the background image into a bit map. Would appreciate any help

Thank
A
 
* "=?Utf-8?B?QWwgQmFocg==?= said:
I need to combine Ink strokes with the background image into a bit map. Would appreciate any help.

\\\
Dim b As New Bitmap(...)
Dim g As Graphics = Graphics.FromImage(b)

' Draw strokes.
g.DrawLine(...)
g.Dispose()
b.Save(...)
b.Dispose()
///
 
Hello Herfried
I am using InkPicture Control and InkPicture.Ink contains the Ink strokes and InkPicture.Image contains the Image (is the background Image.) Although I said bitmap I really would like to print both Image and the Ink i can copy the Ink to clipboard like
InkPicture.Ink.ClipboardCopy(InkClipboardFormats.Bitmap, InkClipboardModes.Copy

or I could do the Image
Clipboard.SetDataObject(InkPicture.Image, True

but what I really like to do is to combine then... one is the form (the image) and the Ink is what user has enter on the form. That is why i need to combine Image and Ink. I don't know how to do it :
Thank
A
 
* "=?Utf-8?B?QWwgQmFocg==?= said:
I am using InkPicture Control and InkPicture.Ink contains the Ink strokes and InkPicture.Image contains the Image (is the background Image.) Although I said bitmap I really would like to print both Image and the Ink i can copy the Ink to clipboard like
InkPicture.Ink.ClipboardCopy(InkClipboardFormats.Bitmap, InkClipboardModes.Copy)

I feel sorry, but I never worked with the InkPicture. Is the bitmap a
copied by 'ClipboardCopy' transparent bitmap?
 
Hi Herfried
That is what i am looking for and unfortunately it is not transparent (either image or Ink) so i am trying to find a way to go through each pixels and do OR operation with Ink strokes and background image. don't know exactly how to do that
thank
A
 
* "=?Utf-8?B?QWwgQmFocg==?= said:
That is what i am looking for and unfortunately it is not transparent
(either image or Ink) so i am trying to find a way to go through each
pixels and do OR operation with Ink strokes and background image. don't
know exactly how to do that.

You can play around with the bitmap's 'MakeTransparent' method and then
use 'DrawImage' to blend the images.
 
Hi
I found this article
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dntablet/html/tbconprintingink.as

that talks about how to do print in InkPicture. However it is written in C# which I am not that familiar. There is a class that I need to use in my VB.net App. According to document it says that “The DibGraphicsBuffer.cs file needs to be in its own class library C# project, but then you can write code that references this project to use the DibGraphicsBuffer class. Go to the project properties for this C# project and enable unsafe code.â€

I don’t know and understand what they mean by “DibGraphicsBuffer.cs file needs to be in its own class library C# project, but then you can write code that references this� How do I reference this c# class? If I could do that I think I can convert it to VB and be able to solve this problem

Thanks so much for all your hel

A
 
Back
Top