inkcanvas

How to fix this 'Missing assembly reference' error?

此生再无相见时 提交于 2020-04-18 05:41:14
问题 I am working on an application that captures real time pen strokes on a canvas using Wacom Bamboo Slate . The application is being developed for UWP platform using C#. After drawing on the canvas, save feature is to be implemented. I am using this for my reference. Below is the code and error message: private async void BtnSave_Click(object sender, RoutedEventArgs e) { StorageFolder storageFolder = KnownFolders.SavedPictures; var file = await storageFolder.CreateFileAsync("sample.jpg",

How to fix this 'Missing assembly reference' error?

倖福魔咒の 提交于 2020-04-18 05:41:08
问题 I am working on an application that captures real time pen strokes on a canvas using Wacom Bamboo Slate . The application is being developed for UWP platform using C#. After drawing on the canvas, save feature is to be implemented. I am using this for my reference. Below is the code and error message: private async void BtnSave_Click(object sender, RoutedEventArgs e) { StorageFolder storageFolder = KnownFolders.SavedPictures; var file = await storageFolder.CreateFileAsync("sample.jpg",

InkCanvas Eraser

回眸只為那壹抹淺笑 提交于 2020-02-03 02:24:26
问题 I have sketchpad as InkCanvas ; I want to change size of eraser so I've written: Private Sub Sketchpad_KeyDown(sender As System.Object, e As System.Windows.Input.KeyEventArgs) Handles Sketchpad.KeyDown If e.Key = Key.OemMinus Then ' Decrease size of Eraser to 5*5 Sketchpad.EraserShape = New RectangleStylusShape(5, 5) End If If e.Key = Key.OemPlus Then ' Increase size of Eraser to 50*50 Sketchpad.EraserShape = New RectangleStylusShape(50, 50) End If If e.Key = Key.I Then ' Change editing mode

Image gets mangled when saving InkCanvas to byte array to file

二次信任 提交于 2020-01-06 06:07:17
问题 I have a WPF application using InkCanvas. When I render the bitmap, save to a memory stream, write the resulting bytes to a file, and then open that file in paint, the image is mangled. Any idea what I may be doing wrong here? Tried several solutions found here on SO and also on codeproject. It's pretty clear that it's capturing part of the InkCanvas but the majority of it is black (I assume null bytes). EDIT: also tried with/without margin. Here are the other links I've tried: https://social

InkCanvas Load/Save operations

不羁岁月 提交于 2019-12-21 20:44:21
问题 I've never used InkCanvas control before. What I need is to load up a file into InkCanvas , draw some scribbles and get ther resulting image. And I want to make some additional operations with gotten image. As for saving Correct me if I'm wrong. I've found a link: http://www.centrolutions.com/Blog/post/2008/12/09/Convert-WPF-InkCanvas-to-Bitmap.aspx According to the post will be loaded image considered in addition to user scribbles. Or it only converts scribbles to bitmap? As for loading How

UWP: How can I attach an image to an InkCanvas?

社会主义新天地 提交于 2019-12-20 06:00:12
问题 I have to capture a photo with camera or loading it from file into a canvas which should be edited for highlighting some stuff on it after that saved into a folder. As for now I use this: <Grid x:Name="grid"> <Image Source="/Assets/stainless-images-110606.jpg" x:Name="ImageToEdit" Stretch="Uniform" /> <StackPanel Background="LightGreen" Width="700" Height="700" x:Name="StackPanel"> <InkCanvas x:Name="MyInkCanvas" Width="{Binding Width, ElementName=StackPanel}" Height="{Binding Height,

How to render InkCanvas to an image in UWP Windows 10 application?

北城以北 提交于 2019-12-17 12:17:47
问题 The RenderTargetBitmap class worked with simple Canvas + InkManager (in Windows 8.1) to render ink strokes to an image. UWP introduced InkCanvas and a new Inking API. However, it seems like the RenderTargetBitmap does not work with that. When I try to capture ink strokes with RenderAsync method, no ink strokes get rendered only other objects like Rectangle and so on. Is it a bug or this new API is not meant to be used this way? If not, then how can I render an image out of InkCanvas ? Thanks!

How to render InkCanvas to an image in UWP Windows 10 application?

岁酱吖の 提交于 2019-12-17 12:17:09
问题 The RenderTargetBitmap class worked with simple Canvas + InkManager (in Windows 8.1) to render ink strokes to an image. UWP introduced InkCanvas and a new Inking API. However, it seems like the RenderTargetBitmap does not work with that. When I try to capture ink strokes with RenderAsync method, no ink strokes get rendered only other objects like Rectangle and so on. Is it a bug or this new API is not meant to be used this way? If not, then how can I render an image out of InkCanvas ? Thanks!