Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Play nice with Jimp #112

Open
Steve-Mcl opened this issue Oct 26, 2020 · 5 comments
Open

Play nice with Jimp #112

Steve-Mcl opened this issue Oct 26, 2020 · 5 comments
Assignees

Comments

@Steve-Mcl
Copy link

Hi, this is less of an issue and more of a request.

Is there any thoughts to integrating/interoperable with JIMP?

Perhaps it is already possible however I see no references or remarks as to how I could use a JIMP image object with this library.

I feel closer integration with JIMP would be a WIN WIN for both this lib and for JIMP.

Please feel free to correct me / close this if this is something already implemented or simple to do.

@joshmarinacci
Copy link
Owner

I've never heard of JIMP. Could you put in a link explaining what it is?

@Steve-Mcl
Copy link
Author

Hi @joshmarinacci - sure, no problem.

Jimp is a pure JS image processing library. Been around for many years, has over 10000 github stars - quite a big deal.

An image processing library written entirely in JavaScript for Node, with zero external or native dependencies

I feel these two libs could really compliment each other. Jimp has loads of image loading & processing functionality however lacks many of the drawing bits that this lib provides.

@joshmarinacci
Copy link
Owner

That sounds like a good idea. What would it take? Providing a raw buffer in a particular format that JIMP understands?

@joshmarinacci
Copy link
Owner

this looks good: You can also initialize a new Jimp image with a raw image buffer:

new Jimp({ data: buffer, width: 1280, height: 768 }, (err, image) => {
// this image is 1280 x 768, pixels are loaded from the given buffer.
});
This can be useful for interoperating with other image processing libraries. buffer is expected to be four-channel (rgba) image data.

@joshmarinacci
Copy link
Owner

I think we just need to add an example of how to make this work.

@joshmarinacci joshmarinacci self-assigned this Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants