ariya / phantomjs

Scriptable Headless Browser
http://phantomjs.org
BSD 3-Clause "New" or "Revised" License
29.47k stars 5.75k forks source link

Remove GIF format for screen capture export (render) #12480

Closed ariya closed 10 years ago

ariya commented 10 years ago

One notable feature of PhantomJS is its ability to take the screenshot of a web page and save it as an image (see WebPage's render function). For the upcoming version 2.0, the only support formats for the image will be JPEG and PNG.

The reason is do remove GIF support is to reduce maintenance burden. A GIF representation of a web page can be produced by converting its PNG capture. There are numerous third-party tools which can do the job better (optimized palette, minimized loss, etc).

JamesMGreene commented 10 years ago

Sounds fine to me. :+1:

zackw commented 10 years ago

As long as GIFs in the webpage can still be rendered, +1 from me.

ariya commented 10 years ago

Implemented in master.

apodgorny commented 9 years ago

Why not update docs at http://phantomjs.org/api/webpage/method/render.html?

mysterycommand commented 8 years ago

👍 to @apodgorny 's comment. Please keep your docs up to date! Oh geez, I just noticed the time stamp … it's been almost 2 years since this was implemented, but searching for "phantomjs render gif" leads to (first result) the screen capture docs "Beside PNG format, PhantomJS supports JPEG, GIF, and PDF." … and (second result) the render docs "GIF support depends on the build of Qt used"!

apodgorny commented 8 years ago

@mysterycommand I'vd ditched phantom a while back for reasons known to all who touched it. My favorite now is "nightmarejs w/ electron" – it makes nicer quality snapshots and documentation up to date, it is a lot more intuitive, and much fewer bugs. That day I had to celebrate. )))