Git Product home page Git Product logo

Comments (2)

palxiao avatar palxiao commented on June 9, 2024

html2canvas的原理是通过JS解析目标DOM树然后”翻译“成Canvas语法绘制,借由Canvas API出图,有几个明显缺点,比如绘制成Canvas后图片可能会失真(锯齿、模糊等情况),比如有很多CSS特性不支持(如渐变色、文字特效等),还有画布中使用了SVG等元素更不支持解析,所以前端出图在应对复杂场景时工作量难以预估,只有在特别简单的场景下:例如只有图片和最简单的文字构成的海报可以考虑从前端直接出图。服务端Chrome截图方式没有这种”翻译“的过程,能在最少开发成本下保证出图准确度和质量。

from poster-design.

jujusharp avatar jujusharp commented on June 9, 2024

好的,感谢回复

from poster-design.

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.