locked
Need to get signature and create image for LOB field survey app

    Question

  • Creating an LOB app that needs to capture signature image.

    The following example shows how to draw and create paths that are attached to a canvas, and I believe there is no easy for a Win 8.1 App to create an image from canvas or any other control.

    The sample is called "Input simplified ink sample"

    Signature will be stored on Salesforce.

    Perhaps I'll find something in the printing API.

    Please help!


    Thursday, April 17, 2014 12:23 AM

Answers

  • You can use RenderTargetBitmap to render a UIElement (such as your Canvas) into a bitmap. You can also use  the InkManager.SaveAsync | saveAsync method to save directly to Ink Serialized Format embedded in a GIF file. Lastly, you can render the paths to a WriteableBitmap's PixelBuffer rather than directly to a Canvas either by modifying the PixelBuffer directly, using a 3rd party library such as WriteableBitmapEx, or interop to Direct2D.

    --Rob

    • Marked as answer by Ki6FHX Thursday, April 17, 2014 4:25 PM
    Thursday, April 17, 2014 5:55 AM
    Owner

All replies

  • You can use RenderTargetBitmap to render a UIElement (such as your Canvas) into a bitmap. You can also use  the InkManager.SaveAsync | saveAsync method to save directly to Ink Serialized Format embedded in a GIF file. Lastly, you can render the paths to a WriteableBitmap's PixelBuffer rather than directly to a Canvas either by modifying the PixelBuffer directly, using a 3rd party library such as WriteableBitmapEx, or interop to Direct2D.

    --Rob

    • Marked as answer by Ki6FHX Thursday, April 17, 2014 4:25 PM
    Thursday, April 17, 2014 5:55 AM
    Owner
  • Many thanks Rob! I found both, but I wasn't able to really put them together, and I'd love to create an interop with Direct2D but haven't done so yet.

    Thursday, April 17, 2014 4:53 PM