Code Monkey home page Code Monkey logo

Comments (7)

czl0325 avatar czl0325 commented on August 16, 2024

另外js通过base30转base64可有示例代码?在demo中没有找到。应该怎么调用?能否写个示例

from jsignature.

brinley avatar brinley commented on August 16, 2024

Sorry, theres no sample code to convert between base30 to base64. You might need to look at another library to this. It sounds to me like you are trying to insert a base30 into a canvas that is 1/10 the size of the canvas 1. Have you thought of exporting to svg then instead of loading the signature into canvas 2, just display the svg?

from jsignature.

czl0325 avatar czl0325 commented on August 16, 2024

我也希望导出的是svg,但是后台返回的数据是一串base30的字符,除了用canvas显示,没有其他的办法了。img标签也无法显示base30的图案,而这个base30是在300x600的canvas上绘制生成的,我需要展示的时候缩小到30x60,并且旋转90deg成60*30显示

from jsignature.

brinley avatar brinley commented on August 16, 2024

Did you try using
jSignature("getData", "svgbase64")

from jsignature.

czl0325 avatar czl0325 commented on August 16, 2024

我无法使用jSignature("getData", "svgbase64")
后端sql保存的是一串base30的字符串,
前端请求后端是得到一串base30字符串,需要显示出该base30字符串的图案。

from jsignature.

brinley avatar brinley commented on August 16, 2024

If you cannot save svgbase64 in your sql db when exporting the signature then you will need to either convert the base30 to another format with a backend process or look at some other libraries to convert.

from jsignature.

czl0325 avatar czl0325 commented on August 16, 2024

后端不同意将base30转换为另一种格式,后端明确要求只保存base30字符串在sql中,并且要求前端展示base30字符串对应的图片。

from jsignature.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.