All Projects → cyan33 → Image Screenshot

cyan33 / Image Screenshot

download an image node along with its css properties

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Image Screenshot

Capture Frame
Capture video screenshot from a `<video>` tag (at the current time)
Stars: ✭ 109 (+172.5%)
Mutual labels:  screenshot, canvas
Waifu2x-Image-Saver
A Firefox extension to download any image and process them with Waifu2x with one click.
Stars: ✭ 13 (-67.5%)
Mutual labels:  download, images
Canvas grab
🌐 One-click script to synchronize files from Canvas LMS.
Stars: ✭ 118 (+195%)
Mutual labels:  download, canvas
Backdoor
A backdoor that runs on Linux and Windows
Stars: ✭ 36 (-10%)
Mutual labels:  screenshot, download
Fileshare
Debian/Ubuntu applet for screenshots and images sharing using popular online services
Stars: ✭ 35 (-12.5%)
Mutual labels:  images, screenshot
1click Webpage Screenshot
Entire page Screenshot extension for Google Chrome. I'm developing open source extension for Google Chrome. All extension are free for use. Let's make Chrome great again!
Stars: ✭ 406 (+915%)
Mutual labels:  screenshot, download
Paintview
An Android View with Gesture Supported for Painting
Stars: ✭ 136 (+240%)
Mutual labels:  screenshot, canvas
1click-webpage-screenshot
Entire page Screenshot extension for Google Chrome. I'm developing open source extension for Google Chrome. All extension are free for use. Let's make Chrome great again!
Stars: ✭ 432 (+980%)
Mutual labels:  screenshot, download
TakingImageOfAView
An example on how to take screenshot of a particular view
Stars: ✭ 15 (-62.5%)
Mutual labels:  screenshot, canvas
Bulk Bing Image Downloader
Download full sized images returned from bing image search
Stars: ✭ 271 (+577.5%)
Mutual labels:  images, download
Html To Image
✂️ Generates an image from a DOM node using HTML5 canvas and SVG.
Stars: ✭ 595 (+1387.5%)
Mutual labels:  screenshot, canvas
Cosha
Colorful shadows for your images. 🎨
Stars: ✭ 988 (+2370%)
Mutual labels:  images
Sms Responsive Images
This TYPO3 extension provides ViewHelpers and configuration to render valid responsive images based on TYPO3's image cropping tool.
Stars: ✭ 35 (-12.5%)
Mutual labels:  images
Canvas
Canvas Drawing Android Library
Stars: ✭ 35 (-12.5%)
Mutual labels:  canvas
Firedm
python open source (Internet Download Manager) with multi-connections, high speed engine, based on python, LibCurl, and youtube_dl https://github.com/firedm/FireDM
Stars: ✭ 977 (+2342.5%)
Mutual labels:  download
Jsdom Screenshot
📸 Take screenshots of jsdom with puppeteer
Stars: ✭ 39 (-2.5%)
Mutual labels:  screenshot
Twitter Downloader Telegram Bot
🤖 Telegram bot for download video from twitter.
Stars: ✭ 37 (-7.5%)
Mutual labels:  download
Blog
在这里写一些工作中遇到的前端,后端以及运维的问题
Stars: ✭ 974 (+2335%)
Mutual labels:  canvas
Ec Devtools
ec-devtools是支持canvas库 ( easycanvas , https://github.com/chenzhuo1992/easycanvas ) 的chrome调试工具,能对canvas的元素的样式、物理属性等进行修改,达到所见即所得的效果,提高调试效率
Stars: ✭ 35 (-12.5%)
Mutual labels:  canvas
Luckysheet
Luckysheet is an online spreadsheet like excel that is powerful, simple to configure, and completely open source.
Stars: ✭ 9,772 (+24330%)
Mutual labels:  canvas

image-screenshot

📷 targets at browser only

Why Not Right Click and Save

Because in that way the CSS properties added to the image will be lost

There is a more famous library, html2canvas, that provides the utility of converting the DOM nodes into a picture, but it does NOT add along with the CSS properties to the pictures.

Usage

npm install --save image-screenshot
import screenshot from 'image-screenshot'

const img = document.getElementById('my-img')

screenshot(img).download()

You might need some flexibility during the process, in which you could do:

screenshot(img).then((url) => {
  console.log('the base64 data url of the image is:', url)
})

Other than those, there is a helper function download that you could use elsewhere, after you get the base64 url:

import { download } from 'image-screenshot'

download(url, 'image.jpeg')  // the image will be downloaded into `image.jpeg` 

APIs

  • screenshot(img: DOMNode [, format: string, quality: float]): get the base64 url in a specific format, which is by default png. The image resolution quality is a float number that ranges from 0 to 1. The default is 0.97. The function returns a thenable object:
{
  url,  // get the url through screenshot().url
  then: callback,
  download: (downloadFileName: string) => void // defaults to 'image.${format}'
}
  • download(url: string, fullName: string) (Note that this is different from the download function returned from screenshot)

Who is Using image-screenshot

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].