We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Saving Image from SfSignature increase resolution

Hi All,

Is it possible to increase resolution of an image after of before creating the signature image from the SfSignature pad.


Basically to increase to high resolution for example from 300px by 300px to a 840px by 600px. These are random numbers.


Thanks for everyti


3 Replies

YA YuvanShankar Arunagiri Syncfusion Team December 20, 2022 10:43 AM UTC

Hi Luis,


We have prepared the sample based on your requirement. Please refer to the below code snippet. Using the LoadAsync method, we can customize the height and width of the image.


API link: https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSignature.html#Syncfusion_Blazor_Inputs_SfSignature_LoadAsync_System_String_System_Nullable_System_Int32__System_Nullable_System_Int32__


private async void OnOpen()

    {

        await signature2.LoadAsync(sign, 840, 600);

    }


Get back to us if you need any further assistance on this. 


Regards,

YuvanShankar A



LC Luis Campuzano replied to YuvanShankar Arunagiri December 20, 2022 01:06 PM UTC

Hi  YuvanShankar,


Thanks for you quick response.


It is possible to do it at the time of saving the image instead of using it when loading the image.


Thanks.


Luis



YA YuvanShankar Arunagiri Syncfusion Team December 21, 2022 09:07 AM UTC

Luis, we have prepared a sample code snippet for you based on your requirement. Please find it below.


@using Syncfusion.Blazor.Inputs

@using Syncfusion.Blazor.Buttons

 

<h4>Sign Here</h4>

<SfSignature @ref="signature"></SfSignature>

 

<SfButton @onclick="OnSave">Save</SfButton>

 

@code {

    private SfSignature signature;

    private async void OnSave()

    {

        var sign = await signature.GetSignatureAsync();

        await signature.LoadAsync(sign, 840, 600);

        await signature.SaveAsync();

    }

}



Loader.
Live Chat Icon For mobile
Up arrow icon