Questions tagged [sharp]

Questions about sharp, a Node.js image processing library to resize, crop and optimize JPEG, PNG, WebP and TIFF images.

The typical use case for this high speed module is to convert large images in common formats to smaller, web-friendly JPEG, PNG and WebP images of varying dimensions.

Resizing an image is typically 4x-5x faster than using the quickest [tag:imagemagick and settings.

Colour spaces, embedded ICC profiles and alpha transparency channels are all handled correctly. Lanczos resampling ensures quality is not sacrificed for speed.

As well as image resizing, operations such as rotation, extraction, compositing and gamma correction are available.

Most 64-bit OS X, Windows and Linux (glibc) systems running Node versions 4, 6, 8 and 9 do not require any additional install or runtime dependencies.

Download Sharp

455 questions
0
votes
1 answer

Does lovell sharp support color modulation (hue, saturation, brightness)?

I have application where I need to change colors of image by altering values of hue, saturation and lightness. Following is the sample image: When I will pass HSL value as 90, 100, 50 respectively. It should return image as follows Any idea how to…
0
votes
1 answer

Jest mocking - How do I mock this module..?

I'm trying to mock sharp and I have this: // /__mocks__/sharp.js const Sharp = jest.genMockFromModule('sharp') Sharp.prototype.jpeg = function (options) { return this } Sharp.prototype.trim = function (options) { return this…
Stephen Last
  • 5,491
  • 9
  • 44
  • 85
0
votes
0 answers

Do I have to reorganize the data to animate it on time, using Unity and C#?

My Json file looks something like this (it's huge, so this is just simplified): { "foo": { "id": [ 20, 1, 3, 4, 60, 1, ], "times": [ 330.89, 5.33, 353.89, 33.89, 14.5, 207.5, ] }, "poo": { "id": [ 20, 1, 3, 4, 60, …
0
votes
1 answer

Start lad web process failed with sharp.node requires libvips-cpp.42.dylib 49.0.0

I am following this basic installation guide here https://github.com/ladjs/lad#installation My versions are below: crocodile version: 1.0.4 node version: v8.2.1 platform: Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017;…
HP.
  • 19,226
  • 53
  • 154
  • 253
0
votes
1 answer

How to make sure two users don't get the same roll number?

Let me tell you a bit about my application and the problem: This application will be used to register students in a particular course launched by an organization. A student will provide the following in the form besides other information: a course…
Farooq AR
  • 314
  • 4
  • 9
0
votes
1 answer

sharp is not defined error in AWS Lambda resize

This code below works fine until I try to add an overlayWith. The overlay image is png and is smaller than the resized image. The Lambda function package I am using is from…
Paul
  • 37
  • 9
0
votes
2 answers

how to add a row in a datagridview using textboxes and a button

So i have a datagridview which is populated with a list of objects. I added on the form 3 textboxes and a button. The question is how to insert and populate another row into the datagridview with the text from textboxes. this is my class: class…
0
votes
1 answer

How to define the sharpest image?

I have the following cell reconstructed images. 12 images of the same cell I would like to implement a automatic detection of the most sharpest image, which in our case is the 4th , 5th or 6th image. If we pick one of them is equally correct. What…
-1
votes
1 answer

How do I install sharp on my AWS Lambda via the CDK with a custom install command?

I have an error message asking me to install a specific version of sharp for my AWS lambda function: npm install --platform=linux --arch=x64 sharp. Whilst I can do this locally, I believe the CDK just runs npm i sharp, which causes issues. Current…
Luke
  • 761
  • 1
  • 18
-1
votes
2 answers

Sharp Promise[] is missing the following properties from type 'Promise': then, catch, finally, [Symbol.toStringTag]

I have written a code that should verify and convert every image that passes through it. I made use from nestjs, magic-bytes.js and Sharp. But i get an error that says: Type 'Promise[]' is missing the following properties from type…
lucius0
  • 1
  • 3
-1
votes
1 answer

req is "undefined" in one middleware and not in another

I am trying to use sharp in my MERN application, I sent a request from my frontend and it is undefined in my sharp middleware but if I get rid of the sharp middleware the req is defined later on. If I log the request in createCountry, the body is…
Isaiahm
  • 19
  • 4
-1
votes
1 answer

gatsby-remark-images-remote make the build fail, how to troubleshoot the root cause?

My gatsby site https://jeff-tian.jiwai.win/ (Source code: https://github.com/Jeff-Tian/space/) uses gatsby js. It contains thousands of markdown blog posts and the building used to be smooth before I made the following change. The images in the…
Jeff Tian
  • 5,210
  • 3
  • 51
  • 71
-1
votes
1 answer

Sharp returning errors on npm install for M1 Big Sur

I'm trying to install sharp for my project. When running npm i and npm install sharp, I am receiving the same errors about sharp (shown below). I've tried installing libvip globally and locally, and read about every thread about this issue and…
-1
votes
1 answer

Error installing sharp with npm on windows 10

PS E:\前端学习\Node.js\08-Buffer\01-Buffer的使用> npm install sharp npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@7.1.2 npm ERR! gyp info using node@14.13.1 | win32 | x64 npm ERR! gyp info find Python using Python version…
painting
  • 1
  • 1
-1
votes
1 answer

How to soften overflown edges on CSS

I am trying to soften those sharp edges of the orange div when sub divs got overflown as I scroll down. Can I do that with CSS? Sorry if my explanation is confusing. screenshot
eren
  • 31
  • 6
1 2 3
30
31