lksv / node-resemble.js

LOOKING FOR MAINTAINER - Image analysis and comparison
MIT License
99 stars 37 forks source link

Added JPEG support for output #27

Closed mahdi-shojaee closed 7 years ago

mahdi-shojaee commented 8 years ago

Recently JPEG support added as the input. This PR adds JPEG support to output also. To preserve backward compatibility, a new method (getDiffImageAsJPEG()) added alongside getDiffImage().

This new method returns data as a Node.js Buffer.

mirzazeyrek commented 8 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.

lksv commented 8 years ago

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...

mirzazeyrek commented 7 years ago

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 :)

mirzazeyrek commented 7 years ago

thank you very much