-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PNG compression #14
Comments
Yes, I faced with this issue. It looks like you use PhantomJS as an engine for Manet. I've just make some test with the following request: http://localhost:8891/?url=https%3A%2F%2Fgithub.com%2Fvbauer%2Fmanet&force=true (it is the Github page of Manet) and got the following results:
Is it OK for you to switch engine to SlimerJS (as temporary workaround)? I need some time to research possibilities of some compression library (like this one: https://github.com/imagemin/imagemin) |
I've just integrated imagemin and added compressing for the following formats: JPEG, PNG, GIF, SVG. It shown the following results for the same page (PNG format):
I think the result is pretty good, but it takes additional time for compressing. |
Imagemin is a good compressor, but the main problem in the "quality" parameter.. |
It looks like I've found the problem. PhantomJS documentation contains mistake: http://phantomjs.org/api/webpage/method/render.html
I've committed new fix, now it should work fine without |
Oops: Just noticed that I was getting the cached version of the screenshot. Setting the Which also means that it has been published on npm (and it says that you published it 'one day ago': https://www.npmjs.com/package/manet), and that I have the latest version. However, I still have to explicitly set the |
Actually, In the next release all PNG images should be much smaller (even without this parameter) and |
Thanks @vbauer for making this update - it helps out a lot! |
Thanks for the great library (I migrated from https://github.com/fzaninotto/screenshot-as-a-service).
Is there a way to modify the PNG compression? Or perhaps the color palette?
When I take a screenshot of a black and white document with pure text on a white background, the resulting PNG file is still well over 1MB.
When I use the JPEG or PDF compression, the file is much smaller.
Any tips?
The text was updated successfully, but these errors were encountered: