3 ms·
Are the two most recent images _actually_ the same, as in a per-pixel match, or are you going to get random noise from dithering etc? If they are literally the
by sam0x17 8y ago
Are the two most recent images _actually_ the same, as in a per-pixel match, or are you going to get random noise from dithering etc? If they are literally the same, then this becomes a lot easier.
You could easily set up a simple node.js program that uses fs.watcher to watch for new files, and https://github.com/lovell/sharp https://github.com/lovell/sharp to process the two most recent images and see if the pixels are identical. If you need to package this into a standalone executable, you could use https://www.npmjs.com/package/pkg https://www.npmjs.com/package/pkg. Then you could use the built-in SMTP sender (if it is not blocked on your network) or mailgun or something of that nature to send the email.
You can do the same thing in other languages, like ruby, python, etc as well.
If the two images files are literally identical as in the same jpeg with all the same bytes, you could do this with a bash script that compares the sha1 or md5 hash of the two files and then consult https://stackoverflow.com/questions/5155923/sending-a-mail-from-a-linux-shell-script https://stackoverflow.com/questions/5155923/sending-a-mail-f... for how to send an email from a bash script.
- TheSpiceIsLife 8y agoThanks for the response, this gives me a bit to go on. The images are jpg files from iSpy Connect. I'll see take some sample photos and see if they hash the same.