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
10
votes
1 answer

How convert jimp object to image buffer in node?

So, I use some lib to join countable images in specific way to one single image. This lib use Jimp library to done it and after all joins return a Jimp object. Like this: Jimp { _background: 0, bitmap: { data:
Roman Shmandrovskyi
  • 883
  • 2
  • 8
  • 22
6
votes
2 answers

Fix image orientation in Jimp

I am using Jimp (https://www.npmjs.com/package/jimp) library to crop the image. Crop is working fine but I only have an issue with image orientation. Sometimes, user uploaded rotated images and its result rotated cropped images. I went through with…
Parveen Kumar
  • 397
  • 1
  • 5
  • 12
5
votes
1 answer

My welcome message is confusing. (Discord.js)

I've a code that sends a message to a welcome channel: import Discord from "discord.js" const client = new Discord.Client() client.on("guildMemberAdd", async member => { let bg = await jimp.read("img/img_bg.png") // Bg da imagem. if(guildId…
Carlos Santos
  • 69
  • 2
  • 2
  • 9
5
votes
1 answer

Error cropping a base64 format image using jimp package in Nodejs

var base64str="data:image/jpeg;base64,***"//base64 format of the image var buf = Buffer.from(base64str, 'base64'); jimp.read(buf, (err, image) => { if (err) throw err; else { image.crop(140, 50, 200, 280) .quality(100) …
Veda Vyas
  • 121
  • 3
  • 11
4
votes
3 answers

Jimp and it's Buffer data is not working as expected for PDF Generation with puppeteer

I am using Jimp , puppeteer-full-page-screenshot & puppeteer to generate full page screenshot but the BUFFER data which i am getting from Jimp and puppeteer-full-page-screenshot is not working in my case (Buffer data which i am getting from…
Asumoon
  • 343
  • 2
  • 12
3
votes
1 answer

Colorizing an image using jimp

I am coloring png images from a folder using jimp, but I'm getting the error: w and h must be numbers (Line 42 - the image.color function.). This seems like it should be a simple operation but solutions I have found have been extremely complicated.…
3
votes
0 answers

jimp.loadFont function renders non-English (Thai) font ugly with vowel character

Background I've used Gatsby plugin to generate image using the font typing source, which is a simple node.js code. // ... const titleFont = await jimp.loadFont(`${__dirname}/fonts/Title.fnt`) // ... This code use montserrat font from Google font,…
3
votes
1 answer

guildMemberAdd dont work with Jimp | JavaScript

This function its not working. I tried a lot of things and nothing,i think its the "guildMemberAdd". client.on("guildMemberAdd", async member => { let canal = client.channels.get(config.welcome) let fonte = await…
Envyus
  • 31
  • 1
3
votes
1 answer

Jimp: getting rgb color of pixels from 24-bit bmp

I have a 24-bit bmp file that I want to get the rgb values for the pixels using Jimp for node. If I open the image in GIMP and examine pixel 0,0 the rgb values are r: 45, g: 203, b: 203. However, if I use Jimp and the following…
Davout1806
  • 51
  • 1
  • 3
3
votes
0 answers

Deprecated `Buffer` in Jimp breaking AWS Lambda

I am writing an image resize lambda function. It reads an object from s3 and uses jimp to resize it. When I run it, I get this error: ERROR (node:9) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues.…
Thinking Sites
  • 3,494
  • 17
  • 30
3
votes
0 answers

Stitch multiple pngs with Jimp

I need to stitch multiple pngs into a long png, and I believe I can use Jimp's blit method: // blit the image with another Jimp image at x, y, optionally cropped. image.blit( src, x, y, [srcx, srcy, srcw, srch] ); My question is, how do I loop…
pangpp
  • 155
  • 3
  • 12
2
votes
0 answers

"webpack 5 breaking change" after installing Jimp

I am building a react app with react-dom v18 and react v18. I installed jimp, and got the following error. And I am not using webpack, but not sure where this error is coming from, downgrading react seems to help, but thats not ideal for me, so can…
Tsering Norbu
  • 69
  • 1
  • 3
2
votes
1 answer

When trying to write image file it moves ahead and write works late

What i am trying to do here is i am writing a image file after resizing it with node and after that i will use it to upload it. but when i am writing it my uploading code started at that time and file is still not written. async function…
sahil saini
  • 129
  • 1
  • 1
  • 7
2
votes
0 answers

What path to be used for local files which are in public folder in Next js api function

I am using Jimp NPM module for image processing in NextJs api function which is to use a local font situated in public folder, This is working fine in development server but it is giving me errors when deployed to vercel, error says no such file or…
2
votes
0 answers

How do you use Jimp to resize an image if needed

I'm trying to use jimp to convert an image to JPG and keep a maximum size e.g. 1920x1920 keeping the original aspect ratio However, some of my input files are smaller than that size. I am thinking it is image.scaleToFit(1920, 1920, Jimp.AUTO) but…
Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265
1
2 3 4 5 6 7