Closed mahdi-shojaee closed 7 years ago
any reason for not to merging this @lksv ?
There are few differences with the output though because of the jpeg transparency limitations but apart from that IMHO It's tested and working well enough.
Very sorry for so late response. I am not convinced for adding all the formats/special API to this repo. I do not say strictly no, lets discuss... I am thinking about some row level api, or plugable modules. Unfortunately I have no time (see #21) to thing about this idea in details. I hope next week will be better...
Hello @lksv Lukas,
Actually we have already integrated JPG format support with previous pull request of mine which was actually built on your instructions :)
The issue for us in here is using node-resemble-js for tens of thousands image comparisons with BackstopJS. As a result of that comparisons we are wasting a lot of space and bandwidth. We were using another batch conversion previously and we were loosing a lot of time as well for that. But with this improvement we are saving up to 10 times of space and time.
The whole idea behind being able compare JPG images in previous PR of mine was actually this.
We would like to contribute this amazing tool of yours and we will be very glad to see this merged :)
thank you very much
Recently JPEG support added as the input. This PR adds JPEG support to output also. To preserve backward compatibility, a new method (
getDiffImageAsJPEG()
) added alongsidegetDiffImage()
.This new method returns data as a Node.js Buffer.