tags:

views:

8

answers:

0

Hi there,

I've been trying to do the following:

  • Saving an outline drown using inkcanvas to bmp which is easy and already did using RenderTargetBitmap.

  • Now what I want to achieve is to save a bmp image that has defined colors from a file for example for the background and the strokes. So what happenes is I have my transperent inkcanvas on top of an image and the strokes color is yellow for example. Now when it comes to saving that to bmp I want to have the same image size but with only the background and the strokes colors that are defined in the file which could be white and black or whatever.

using RenderTargetBitmap gives me always a black background since my inkcanvas is transperent and yellow strokes, but I need that to be changed when saving.

I tried also building a byte array of the size of the image and fill it with a backgound color like 255 and then use the x,y of the strokpoints to fill their corresponding position in the array with 0 for examlpe and then use BitmapSource.Create which did what I wanted in terms of the colors but I have the stroke shown as dots rather than a connected line.

Any suggessions, please?