Lovell Fuller

Results 604 comments of Lovell Fuller

You'll need to ensure that the `BlackAndWhite` image is single-channel, which can be achieved using [toColourspace](https://sharp.pixelplumbing.com/api-colour#tocolourspace). ```diff const BlackAndWhite = await sharp(mask.data) .threshold(50) // Adjust threshold value as needed +...

I hope this information helped. Please feel free to re-open with more details if further assistance is required.

https://sharp.pixelplumbing.com/api-output#png > `[options.quality]` use the lowest number of colours needed to achieve given quality, sets `palette` to `true` > `[options.palette]` quantise to a palette-based image with alpha transparency support When...

The prebuilt binaries provided by sharp include the [BSD-licenced libimagequant v2.4.1](https://github.com/lovell/libimagequant) for generating and mapping image palettes. You may have some luck building your own libvips from source compiled with...

Ah yes, this does look like dithering gone a bit wrong, so altering the `dither` level until you find a value that works for the type of input you'll be...

Yes, the underlying logic that maps downsampling kernels to upsampling interpolators within libvips can be seen at: https://github.com/libvips/libvips/blob/c2ede6c110ffcdb47606e8366b8f6a5ff7515b76/libvips/resample/resize.c#L113-L132 However this mapping was missing from the sharp documentation, which commit https://github.com/lovell/sharp/commit/6257994746652f1d337f1601f796ed020df3bbdf...

I hope this information helped. Please feel free to re-open with more details if further assistance is required.

Thanks for the suggestion, this is a good idea for more advanced users that are comfortable building their own custom libvips. I've added it via commit https://github.com/lovell/sharp/commit/579cf93030cf2a27c50976e106a23dfe5bd6795e An alternative fail-fast...

@TransRapid Please see https://sharp.pixelplumbing.com/install#building-from-source for the prerequisite dependencies that are required to be able to build sharp from source. If you are still having problems, please open [a new installation...