Questions tagged [jimp]

Jimp (JavaScript Image Manipulation Program) is an image processing library for Node written entirely in JavaScript, with zero native dependencies.

Jimp (JavaScript Image Manipulation Program) is an image processing library for Node written entirely in JavaScript, with zero native dependencies.

104 questions
0
votes
0 answers

Image skew in javascript with Jimp module

I'm trying to skew an uploaded image with Jimp. There is a plugin for 3D https://github.com/oliver-moran/jimp/tree/master/packages/plugin-displace But I'm having trouble understanding exactly how this module works. Despite my research, I could not…
Ugur
  • 750
  • 9
  • 20
0
votes
1 answer

How to dynamically find main rectangular image within an image?

I'd like to take a screenshot of an image, and extract the image out of the screenshot. For example: I'd like to dynamically extract that image out of the screenshot. However, I want to be able to dynamically detect where the image to be extracted…
Kodie Grantham
  • 1,963
  • 2
  • 17
  • 27
0
votes
1 answer

How to make everything happen in order (Node js)

I'm writing a program to get data from a CSV file, duplicate an image, print text (someone's name name from a CSV file) onto that image using Jimp, then send an email with the image as the attachment to the email (the email is found in the CSV…
code
  • 5,690
  • 4
  • 17
  • 39
0
votes
3 answers

Using NPM packages in NEST JS which doesnt have Nest specific package

In my Nest js app, i want to add libraries which doesnt have any nest specific implementation. For example sharp or jimp. I have added these in my project like npm i jimp. and imported in my code like this. import Jimp from 'jimp'; It works fine…
Shofiqul Alam
  • 585
  • 1
  • 7
  • 29
0
votes
1 answer

Node JS and JIMP: No matching constructor overloading was

I'm trying to write some text on a simple jpg or png with nodejs and JIMP but i'm having issues on making it work. The picture is gotten from a telegram bot, it gets merged with another picture with canvas and then i must write some simple text on…
0
votes
2 answers

Dynamically change the size of text with canvas

Using the package node-canvas, I need to render a username - one that can be rather large. I need to ensure that the text can dynamically scale the size of it to fit into a pre-defined image, so that the name is never cut off, it just gets smaller…
user13050631
0
votes
2 answers

take all images in directory, type the filename of each image onto the image

I want to identify a directory, 'inbox_screenshots', which contains a list of up to 100 png files from 1-100. I want to loop through each image and write its filename onto the actual image (i.e 1.png written onto 1.png etc) I have tried for (i = 1;…
Dave
  • 23
  • 1
  • 5
0
votes
2 answers

MaxListenersExceededWarnin Possible EventEmitter memory leak detected. 11 guildMemberAdd listeners added to [Client]

I'm trying to make a code using jimp in which, when a member enters the discord server, they sends a welcome picture, like their nickname and avatar. In the channel set by the ID, they sends the image, but they sends 11 images, and in the console…
davi0880 _
  • 35
  • 4
0
votes
1 answer

AWS lambda fails by timeout during getting buffer from resized image

I am resizing image on AWS lambda by using JIMP and if image is large 2MB+ it fails by time out when I am getting buffer: const img = await jimp.read(buff); await img.resize(jimp.AUTO, 512); const imgBuff = await img.getBufferAsync(mime); //…
Ted
  • 1,682
  • 3
  • 25
  • 52
0
votes
1 answer

Why is my try-catch exception with nested async function not throwing?

I want to get some images, so I wrote a promise based script to get images from a chosen image url. However, when an invalid url is supplied it is supposed to return "Get Error." But instead (as I can see), the application crashes, and thus the…
Crupeng
  • 317
  • 2
  • 14
0
votes
2 answers

How to add watermark to an animated gif image using jimp javascript?

These are my codes I used for adding watermark to an image: const ORIGINAL_IMAGE = "https://example/sample_image; const LOGO = fs.readFileSync('gangle.png'); const LOGO_MARGIN_PERCENTAGE = 5; let [image, logo] = await Promise.all([ …
noyruto88
  • 767
  • 2
  • 18
  • 40
0
votes
2 answers

NodeJS: Use Data in Raw Format from .env

I have the following code which uses Jimp package to edit the background of a file: const file = await Jimp.read(JPGPath) file .resize(parseInt(width), parseInt(height)) .background(process.env.JPG_BACKGROUND_COLOR) …
Israel Obanijesu
  • 666
  • 1
  • 12
  • 24
0
votes
1 answer

i'm trying to put a manipulated image to welcome people on my dicrod bo using jimp

I'm using this but it's not working. I don't know why please help me. const Discord = require("discord.js"); const jimp = require("jimp"); const client = new Discord.Client(); const config = require("./config.json"); client.on("ready", () => { …
0
votes
1 answer

Error in Jimp.loadFont (use load-bmfont module) with React

I am testing Jimp.js for image manipulation (using React with react-scripts, npm: 6.14.4, node: v12.16.3) Everything is going well except writing text on a loaded image import Jimp from 'jimp' Jimp.read(image) .then(image => { …
ahuegle
  • 21
  • 4
0
votes
2 answers

How do I convert an avatar URL to .png?

How do I convert the avatar URL to .png? Error: Unsupported MIME type: image/webp at Jimp.throwError…