Skip to content

Commit eb644f8

Browse files
Update extracting-point-data-from-signature-signaturepad-dotnet-maui.md
1 parent 72a6fb6 commit eb644f8

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

knowledge-base/extracting-point-data-from-signature-signaturepad-dotnet-maui.md

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
title: Extracting Point Data from Signature in SignaturePad for UI for .NET MAUI
33
description: Learn how to extract point and line data from a signature in the SignaturePad component for UI for .NET MAUI.
44
type: how-to
5-
page_title: How to Extract Point Data from SignaturePad in UI for .NET MAUI
65
meta_title: How to Extract Point Data from SignaturePad in UI for .NET MAUI
76
slug: extracting-point-data-from-signature-signaturepad-dotnet-maui
87
tags: signaturepad, ui-for-dotnet-maui, point-data, signature, vector-data
@@ -27,7 +26,7 @@ ticketid: 1600847
2726

2827
## Description
2928

30-
I want to extract point and line data from the signature created using the [SignaturePad](https://docs.telerik.com/devtools/maui/controls/signaturepad/overview) component of UI for .NET MAUI. The goal is to format the signature data as a string that represents the x, y coordinates of the strokes in the signature. Different formats for the output data are required, such as a custom format or an SVG-like format.
29+
I want to extract point and line data from the signature created using the [SignaturePad](https://docs.telerik.com/devtools/maui/controls/signaturepad/overview) control of UI for .NET MAUI. The goal is to format the signature data as a string that represents the x, y coordinates of the strokes in the signature. Different formats for the output data are required, such as a custom format or an SVG-like format.
3130

3231
This knowledge base article also answers the following questions:
3332
- How to save signature data as points and strokes from SignaturePad UI for .NET MAUI?
@@ -61,21 +60,19 @@ GetVectorFromSignatureImage(imageBytes);
6160

6261
Create a method to process the image and extract vector data. This involves three stages:
6362

64-
**Stage 1: Prepare Bitmaps**
65-
- Decode the image bytes into `SKBitmap`.
66-
- Create a grayscale bitmap for better contrast.
67-
- Convert the grayscale bitmap into a binary bitmap (black and white) using a threshold.
68-
69-
**Stage 2: Scan Bitmap and Create Point Groups**
70-
- Scan the binary bitmap for black pixels.
71-
- Group neighboring black pixels into strokes using an algorithm.
72-
- Store grouped strokes as `List<List<SKPoint>>`.
73-
74-
**Stage 3: Format the Data**
75-
- Serialize the grouped strokes into a desired format.
76-
- Supported formats:
77-
- Custom: `"1,2;3,4;5,6/7,8;9,10;11,12"`
78-
- SVG-like: `"M x y L x y L x y ..."`
63+
1. Prepare the Bitmaps.
64+
1. Decode the image bytes into `SKBitmap`.
65+
2. Create a grayscale bitmap for better contrast.
66+
3. Convert the grayscale bitmap into a binary bitmap (black and white) using a threshold.
67+
68+
2. Scan the Bitmap and create point groups.
69+
1. Scan the binary bitmap for black pixels.
70+
2. Group neighboring black pixels into strokes using an algorithm.
71+
3. Store the grouped strokes as `List<List<SKPoint>>`.
72+
73+
3. Serialize the grouped strokes into your preferred format:
74+
- Custom: `"1,2;3,4;5,6/7,8;9,10;11,12"`
75+
- SVG-like: `"M x y L x y L x y ..."`
7976

8077
Below is the complete implementation:
8178

0 commit comments

Comments
 (0)