question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enhancement: expose pngsave options requiring libimagequant

See original GitHub issue

https://libvips.github.io/libvips/API/current/VipsForeignSave.html#vips-pngsave

/*
 * @param {Boolean} [options.palette=false] - quantise to a palette-based image with alpha transparency support, requires libimagequant
 * @param {Number} [options.quality=100] - use the lowest number of colours needed to achieve given quality, requires libimagequant
 * @param {Number} [options.colours=256] - maximum number of palette entries, requires libimagequant
 * @param {Number} [options.colors=256] - alternative spelling of `options.colours`, requires libimagequant
 * @param {Number} [options.dither=1.0] - level of Floyd-Steinberg error diffusion, requires libimagequant
/

Please note that the pre-compiled binaries provided by sharp will not include libimagequant. If you require these possible future options then libvips will have to be compiled from source and globally installed.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
avishnyakcommented, May 20, 2019

For anyone looking for a precompiled version of this. I will try to maintain one that can be used just by setting an environment variable before doing an npm/yarn install.

Set ENV Variable SHARP_DIST_BASE_URL=https://github.com/avishnyak/sharp-libvips/releases/download/v8.7.4 (or newer version when they are released).

NOTE: This includes libimagequant which is GPL code and I’m only compiling for linux-x64 right now.

Other linux targets are probably simple to add if someone needs it (just open an issue).

1reaction
ArunJRKcommented, Jan 25, 2021

For anyone looking for a precompiled version of this. I will try to maintain one that can be used just by setting an environment variable before doing an npm/yarn install.

Set ENV Variable SHARP_DIST_BASE_URL=https://github.com/avishnyak/sharp-libvips/releases/download/v8.7.4 (or newer version when they are released).

NOTE: This includes libimagequant which is GPL code and I’m only compiling for linux-x64 right now.

Other linux targets are probably simple to add if someone needs it (just open an issue).

Thank you so much 😀😁❤

Read more comments on GitHub >

github_iconTop Results From Across the Web

https://raw.githubusercontent.com/python-pillow/Pi...
_MODEINFO #5316 [radarhere] - Add preserve_tone option to autocontrast ... on Windows #3808 [radarhere] - Detect libimagequant when installed by pacman on ...
Read more >
sharp @ 0.20.8 .. 0.22.1 - Package Diff
`options.tile` **[Boolean][5]** set to true to repeat the overlay image across the entire image ... +* Expose PNG output options requiring libimagequant.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found