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

Jimp returning wrong mime type

I wrote a bitmap parser that should return jimp object (image) and im getting error "Unsupported MIME type: audio/mpeg" Here's the code: var mid = Buffer.from(mapbitmap, 'base64'); var image2 = await Jimp.read(mid); the mapbitmap is the bitmap that…
FrostX
  • 23
  • 3
0
votes
0 answers

Trying to send an image generated by Jimp in discord.js but the bot only sends text

I'm having a problem in a Discord.js bot I'm making, once a member enters the server, the bot generates the image successfully and saves it without any problem, but then it only sends the message with text and no image attached. I use discord.js…
0
votes
1 answer

Module import failing in Next.js: __WEBPACK_IMPORTED_MODULE_1___default(...). is not a function

I've got a barebones Next.js project (w/ TypeScript) to which I've added Jimp. I'm using the experimental app dir in my config. My next.config.js looks like this: /** @type {import('next').NextConfig} */ const nextConfig = { experimental: { …
calmity
  • 113
  • 1
  • 9
0
votes
0 answers

how to mask a image in another image w jimp

I want to mask a image in another image like this the expected output where this image image1 is being masked over this image2 const Jimp = require('jimp'); module.exports = async d => { const data = d.util.aoiFunc(d); const [c = ""] =…
0
votes
0 answers

I cant load font with Jimp (js)

im trying to load a font with Jimp but ive this error : Error: no named row at line 1 So i tried to load others font but i had the same error Error: no named row at line 1. const policedecriture = await Jimp.loadFont(fontpath)```
0
votes
0 answers

Read an image with Jimp while processing previous image

This may have been asked before, but I couldn't find it! I need to process a series of image files with jimp, and I'm trying to be as efficient as possible. My current program simply uses "await jimp.read(...)" synchronously before processing it.…
ScottyB
  • 2,167
  • 1
  • 30
  • 46
0
votes
0 answers

Setting quality in JIMP always gives the same result

When I set the quality for a PNG or JPEG in JIM (number from 1 - 99) I always get the same result. I don't see any difference in between quality or the final size. Here is my code: function lossy(buffer, quality){ return new…
Jonah
  • 43
  • 5
0
votes
0 answers

Strange behavior when converting images to base64 using Jimp and Javascript

I have the code in Javascript that I paste below, the result obtained with method 1 is correct, that is, an image in base64 format when the conversion starts from reading a file. But when I use the value returned by Jimp the conversion is done to…
0
votes
0 answers

How to get the most predominant color of an image

I'm trying to get the most predominant color of an image in jimp I searched and didn't find anything on how to do this.
miguel
  • 26
  • 3
0
votes
1 answer

how to convert black color by transparency in jimp

I'm trying to change all black colors of my image into transparency in jimp js I've done a lot of research on the subject and so far nothing, so I decided to come here and ask this question
miguel
  • 26
  • 3
0
votes
1 answer

Problem writing the combination of two different images in node.js for only some images

Its a baffling problem, since I don't know how to debug this. The goal: combine two images into one with jimp. It works perfectly on some images(no clue why it works on some but not on others), but on other images it doesn't work and just kills…
Jeff
  • 11
  • 1
0
votes
0 answers

How to make a cube in Jimp?

I am using Jimp and I would like to know if it is possible to make a cube like the one in the image. Here's an image of what I want to have I haven't tried anything because I don't know where to start.
0
votes
0 answers

Using jimp to get hex values of pixels of an image and then find a square within it in NOde.JS

I have an image, then the goal is to detect large rectangles of the same color within an image. So if an image is uploaded with a square picture of a duck on the left, and a square picture of another duck on top, the largest rectangle can be found…
HelloTher
  • 1
  • 3
0
votes
0 answers

Identify similar images in a folder based on an image from the scanner

I have a question that I can't figure out,I do not know where to begin.I use the following technologies: React Native (mobile application) and the backend application is built with Node Js. What I'm trying to do is, the user takes a picture of a…
0
votes
2 answers

NodeJS - | Jimp Write("image.png") | not saving the image until the script ends

I really need some help, I'm new to coding and I'm trying to make a script The script is supposed to achieve the following: Takes a picture Finds text within the image using tesseract Search for a specific string within the text founded Preforms an…