Coder Social home page Coder Social logo

eyoonet / javascript-screenshot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from usecodelee/javascript-screenshot

0.0 1.0 0.0 4.56 MB

JavaScript implementation of a screenshot with html2canvas.js and canvas2image.js(js实现屏幕截图)

License: MIT License

JavaScript 81.35% HTML 7.74% Vue 10.91%

javascript-screenshot's Introduction

JavaScript-screenshot

star this repofork this repo npm languages node MIT Licence

中文

Introduction

JavaScript implementation screenshot,There are two libraries used:

Html2Canvas.js
Canvas2Image.js

I mainly made two demos and one NPM package:

  1. Simple Version
  2. Webpack+Vue+Element Version
  3. js-screenshot-for-npm

Simple Version Of Use

Open index.html directly in your browser.

Webpack+Vue+Element Version Of Use

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

Example

The original html is like this:

This is the element node:

This is after converting to canvas:

This is the element node:

This is after converting to img:

This is the element node:

This is the final result:

js-screenshot-for-npm

npm install --save js_screen_shots

For details, see the document README.md.

javascript-screenshot's People

Contributors

usecodelee avatar

Watchers

 avatar

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.