jsignature c# convert to png

i use below code to download jsignature to svg 64 and it works to me. but how can convert to string to png in c#?



<script src="../Scripts/jquery-3.1.1.min.js"></script>
    <script src="../libs/flashcanvas.js"></script>
    <script src="../libs/jSignature.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#signature").jSignature({ width: 650, height: 250 });
        });
         function GetData() {
            var $sigdiv = $("#signature");
            var datapair = $sigdiv.jSignature("getData", "svgbase64")
            var image = document.getElementById("Image1");
            image.src = "data:" + datapair[0] + "," + datapair[1]
               }
    </script>

   <div id="signature"></div>
          <input id="Button2" type="button" value="GetData" onclick="GetData()" />
        <hr />

        <asp:Image ID="Image1" runat="server" />

Open in new window

LVL 1
ITsolutionWizardAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ITsolutionWizardAuthor Commented:
Any helps!?
0
MishaProgrammerCommented:
Please, specify what do you want to convert? what type and what value?
0
ITsolutionWizardAuthor Commented:
Convert from svg 64 to png
0
MishaProgrammerCommented:
Try this code:
public void ProcessRequest(HttpContext context)
{
 context.Response.ContentType = "image/png";
 
 String svgXml = GetSvgImageXml(context);
 string svgFileName = GetSvgFileName(context);
 using (StreamWriter writer = new StreamWriter(svgFileName, false))
 {
  writer.Write(svgXml);
 }

 string pngFileName = GetPngFileName(context);

 string inkscapeArgs = 
  "-f " + svgFileName + " -e \"" +
  context.Server.MapPath(PngRelativeDirectory) + "\\" +
  pngFileName + "\"";

 Process inkscape = Process.Start(
   new ProcessStartInfo(
    "C:\\program files\\inkscape\\inkscape.exe",
    inkscapeArgs));
 inkscape.WaitForExit(3000);
 context.Server.Transfer(PngRelativeDirectory + pngFileName);
}

Open in new window


And you can lock on these links:
SVG
SVG2
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MishaProgrammerCommented:
There is no activity from author
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Images and Photos

From novice to tech pro — start learning today.