Conversation
dist/index.js
Outdated
| var _Y = 'Y'.charCodeAt(0); | ||
| var _S = 's'.charCodeAt(0); | ||
|
|
||
| function changeDpiBuffer(format, blob, dpi) { |
There was a problem hiding this comment.
what is the blob argument here? a blob or a buffer?
There was a problem hiding this comment.
sorry, the variable name is confusing, it should be buffer
There was a problem hiding this comment.
So a couple of suggestion
-
rename it buffer
-
With this addition the users have to specify the format by themselves. That is fine, but they have to know how to do it. Docs will be a way for sure, but also adding to the exports the current 2 supported formats is an help, as you did for the new function. so that they can just reference the 2 formtted strings
image/jpegandimage/png.
|
Do not forget to also add a test please. |
|
Ok sorry, my bad, we have already a PR doing this: |
Sorry, I don't see it. So you can reject this pr |
|
I do not need to reject it, i wonder if you tried it and if it fits your need. If it does, i could merge that and we could try to polish what is missing if you want to help anyway with a contribution. |
My project needs to save an image with 300 dpi from nodejs with Jipm. Jimp can get buffer and save to file, but it can't set dpi. so I need this feature for my project. |
change dpi from a buffer source