469,904 Members | 2,284 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,904 developers. It's quick & easy.

Combining Ink Strokes with Background Image into a Bit map Image

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

Thank
A

Nov 20 '05 #1
6 4559
* "=?Utf-8?B?QWwgQmFocg==?=" <an*******@discussions.microsoft.com> scripsit:
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()
///

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
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.B itmap, 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

Nov 20 '05 #3
* "=?Utf-8?B?QWwgQmFocg==?=" <an*******@discussions.microsoft.com> scripsit:
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.B itmap, InkClipboardModes.Copy)


I feel sorry, but I never worked with the InkPicture. Is the bitmap a
copied by 'ClipboardCopy' transparent bitmap?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #4
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

Nov 20 '05 #5
* "=?Utf-8?B?QWwgQmFocg==?=" <an*******@discussions.microsoft.com> scripsit:
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.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #6
Hi
I found this article
http://msdn.microsoft.com/library/de...printingink.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

Nov 20 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Mark McKay | last post: by
4 posts views Thread by David. E. Goble | last post: by
13 posts views Thread by Giggle Girl | last post: by
3 posts views Thread by Viken Karaguesian | last post: by
4 posts views Thread by JJ | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.