GithubHelp home page GithubHelp logo

cjpetrus / url2img Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 5.0 16 KB

A spiffy Node/PhantomJS website screenshot capture tool, built for docker alpine container

License: MIT License

JavaScript 100.00%

url2img's People

Contributors

bchavet avatar cjpetrus avatar devasur avatar theted avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

url2img's Issues

Sometimes it works, sometimes it doesn't.

This module very often creates errors on some urls. My domain "http://stefanschwartze.com" I get almost never to work, maybe in 1 of 10 cases or less. This also occurs on other websites. I've also seen that sometimes it resolves the promise without saving the image.
I used the default settings from your Readme..

Let's join our forces

Hi,

Cool that you have improved my url-to-image module, looks awesome.

Anyways, I think we should join our efforts and maintain a one good tool instead of two separate ones. What do you think?

Cmdline cropping options don't cut it

The README says that --crop-height takes a string argument, which is odd. I would expect it to take no argument (crop to viewport), or maybe a boolean or a number.

Anyway I have tried:

url2img --width 400 --height 200 --crop-height --kill-timeout 600000  http://google.com google.png

but the image isn't being cropped. In fact the output image size is 604x450. And the same if I use --crop-height true

If I use --crop-height 200 then no screenshot gets saved at all, but the process still takes time before it exits with return code 0 and no error message.

Am I doing something wrong? Cheers.

Details: npm v3.9.5 node v6.2.2 phantom 1.0.3 (I installed url-to-image before finding this fork)

Incorrectly named fileQuality parameter

The fileQuality parameter (used in oldOpts when calling page.render() in this line) is incorrectly named. I noticed that any value provided for the fileQuality parameter does not affect the quality or filesize of the output image. Renaming the parameter to quality instead of fileQuality (following the PhantomJS documentation) solves this issue.

PhantomJS version bump

I have tested it with phantomjs-prebuilt 2.1.4. Works fine. IMO it will be a good idea to bump the version. Unless there is something that I am missing.

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.