From 5d26a8df795f48f89c445eb0de900dba568b6f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Gonz=C3=A1lez?= Date: Mon, 9 Oct 2017 16:56:04 -0300 Subject: [PATCH 1/8] added arm support for RPI --- .gitignore | 1 + capture/bin/arm/scrot | Bin 0 -> 22224 bytes capture/linux.js | 2 +- 3 files changed, 2 insertions(+), 1 deletion(-) create mode 100755 capture/bin/arm/scrot diff --git a/.gitignore b/.gitignore index cb4e535..7a56aae 100644 --- a/.gitignore +++ b/.gitignore @@ -27,5 +27,6 @@ build/Release # Dependency directory # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git node_modules +.idea diff --git a/capture/bin/arm/scrot b/capture/bin/arm/scrot new file mode 100755 index 0000000000000000000000000000000000000000..df4f6fe5765810e6561e2b6053390a3c48da1d9f GIT binary patch literal 22224 zcmeHve|%KcweLQY1jZ0?(4c7=<)FzWY7z#BG+?R&L4H_%3=kAse3MD$B$+aq8D}Oy zY;HS&Xt8B#3K3DjjJ>qaPitFhq4id*W2N_cE$y|f*IKI2`N4Sxuoe5P;;l9J`#nFx z@yPXa-~GJ5-pBL#?5wr-UVH7e)?Rzo=yF!y+sBpLyuYw)L7 zlr#!iT!6YN@k!Q4TbByax>VAV6C_N5m{W5(5c_y|; zv6cV~OcHJAi;3-7OPVb!m>gQ#1%_p4%zjz#z~4dC52Bu_0u7j0Z^{@&K8n7X7NMNU ztXr)n0?2;oVS5+S8q{0+-;NHM*q*Y@3{al@hu}r@g=at#gHEX^Da6tyG@0HbN-iv0C}s&cDGoZliuAT~ zujJUa9d#mEBs`9q6@zjOK!_1KTfhHm`g?*5jCXZ+}y-mA0HRqr0y_r$KM_?s;g7T)x4uMcl|sNegiDTNI; z29H!dwDpm{|KpU4p15yU)ob#S=Z_YWpM0bA&da_f`7_^*PX7L-r#8KR+Z*@yHU0Uk zRhO0jd{*tZZ~Wp{PY-NUZ~X4hPW|?c$6tJ+`P;(qKK?_7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RhG3maB z0@Be2M?iN3bbGi^8jneb?;A-MW&isBFV*>(q$b_NI-SOE17gXBrRQu*mL}bIfKNu^ z80-I!^jsZ^#`XO%aC|bM(Q%FLUvYlAXFx+e$dBLfCC@{LD)B55$AWbF|2aj>LqpTG zC?D Date: Mon, 9 Oct 2017 16:56:04 -0300 Subject: [PATCH 2/8] added arm support for RPI --- .gitignore | 1 + capture/bin/arm/scrot | Bin 0 -> 22224 bytes capture/linux.js | 2 +- 3 files changed, 2 insertions(+), 1 deletion(-) create mode 100755 capture/bin/arm/scrot diff --git a/.gitignore b/.gitignore index cb4e535..7a56aae 100644 --- a/.gitignore +++ b/.gitignore @@ -27,5 +27,6 @@ build/Release # Dependency directory # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git node_modules +.idea diff --git a/capture/bin/arm/scrot b/capture/bin/arm/scrot new file mode 100755 index 0000000000000000000000000000000000000000..df4f6fe5765810e6561e2b6053390a3c48da1d9f GIT binary patch literal 22224 zcmeHve|%KcweLQY1jZ0?(4c7=<)FzWY7z#BG+?R&L4H_%3=kAse3MD$B$+aq8D}Oy zY;HS&Xt8B#3K3DjjJ>qaPitFhq4id*W2N_cE$y|f*IKI2`N4Sxuoe5P;;l9J`#nFx z@yPXa-~GJ5-pBL#?5wr-UVH7e)?Rzo=yF!y+sBpLyuYw)L7 zlr#!iT!6YN@k!Q4TbByax>VAV6C_N5m{W5(5c_y|; zv6cV~OcHJAi;3-7OPVb!m>gQ#1%_p4%zjz#z~4dC52Bu_0u7j0Z^{@&K8n7X7NMNU ztXr)n0?2;oVS5+S8q{0+-;NHM*q*Y@3{al@hu}r@g=at#gHEX^Da6tyG@0HbN-iv0C}s&cDGoZliuAT~ zujJUa9d#mEBs`9q6@zjOK!_1KTfhHm`g?*5jCXZ+}y-mA0HRqr0y_r$KM_?s;g7T)x4uMcl|sNegiDTNI; z29H!dwDpm{|KpU4p15yU)ob#S=Z_YWpM0bA&da_f`7_^*PX7L-r#8KR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J4 z(TqQ4znf8F(&_OUbJMIu9Z{yO7CL^HH;TpVn2bW>F`H~h-sH#s>vagf%}{RhG3maB z0@Be2M?iN3bbGi^8jneb?;A-MW&isBFV*>(q$b_NI-SOE17gXBrRQu*mL}bIfKNu^ z80-I!^jsZ^#`XO%aC|bM(Q%FLUvYlAXFx+e$dBLfCC@{LD)B55$AWbF|2aj>LqpTG zC?D Date: Mon, 9 Oct 2017 17:58:28 -0300 Subject: [PATCH 3/8] updated dependencies --- .gitignore | 1 + module.js | 2 +- package.json | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 7a56aae..ba3e916 100644 --- a/.gitignore +++ b/.gitignore @@ -28,5 +28,6 @@ build/Release # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git node_modules .idea +package-lock.json diff --git a/module.js b/module.js index fdaee33..2d99008 100755 --- a/module.js +++ b/module.js @@ -2,7 +2,7 @@ module.exports = function() { return new Screenshot(arguments); }; -var path = require('flavored-path'); +var path = require('path'); var jimp = require('jimp'); var fs = require('fs'); diff --git a/package.json b/package.json index 8606fab..4b3c589 100755 --- a/package.json +++ b/package.json @@ -12,8 +12,7 @@ "url": "https://github.com/johnvmt/node-desktop-screenshot" }, "dependencies": { - "jimp": "0.2.x", - "flavored-path": "0.0.x" + "jimp": "0.2.x" }, "main": "module.js" } From a08a2a376453fda6cd8e60d744525afcc811bb95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Gonz=C3=A1lez?= Date: Tue, 17 Oct 2017 21:14:56 -0300 Subject: [PATCH 4/8] added bufered option --- module.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/module.js b/module.js index 2d99008..2b33793 100755 --- a/module.js +++ b/module.js @@ -16,13 +16,7 @@ function Screenshot(args) { if(error && typeof config.callback === "function") config.callback(error, null); else if(!error) { - if (typeof options.intermediate === "string") { - self.processImage(options.intermediate, options.output, options, function (error, success) { - fs.unlink(options.intermediate, handleCallback); // delete intermediate - }); - } - else - self.processImage(options.output, options.output, options, handleCallback); + self.processImage(options.output, options.output, options, handleCallback); } }); } @@ -61,7 +55,18 @@ Screenshot.prototype.processImage = function(input, output, options, callback) { if(typeof options.quality === "number" && options.quality >= 0 && options.quality <= 100) image.quality(Math.floor(options.quality)); // only works with JPEGs - image.write(output, callback); + if(options.buffered){ + image.getBuffer(jimp.MIME_PNG, function(error, buffer) { + if(error) { + callback(error); + } + fs.unlink(input, function(error) { + callback(error, buffer); + }) + }); + } else { + image.write(output, callback); + } } catch(error) { callback(error); From 4101f1e04429ca015b647906e1ef74ddf414b6f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Gonz=C3=A1lez?= Date: Tue, 17 Oct 2017 23:11:16 -0300 Subject: [PATCH 5/8] remove intermediate file for jpg osx issue, it seems to be already fixed --- capture/darwin.js | 27 ++++----------------------- module.js | 6 +++--- 2 files changed, 7 insertions(+), 26 deletions(-) diff --git a/capture/darwin.js b/capture/darwin.js index 7b64886..aafe4de 100644 --- a/capture/darwin.js +++ b/capture/darwin.js @@ -3,15 +3,10 @@ module.exports = function(options, callback) { var fs = require('fs'); var childProcess = require('child_process'); - // due to bug in jpgjs processing OSX jpg images https://github.com/notmasteryet/jpgjs/issues/34 + // due to bug in jpgjs processing OSX jpg images https://github.com/notmasteryet/jpgjs/issues/34 // when requesting JPG capture as PNG, so JIMP can read it - var ext = extension(options.output); - if(ext === "jpeg" || ext === "jpg") { - options.intermediate = path.resolve(path.join(__dirname, uniqueId() + ".png")); // create an intermediate file that can be processed, then deleted - capture(options.intermediate, callbackReturn); - } - else - capture(options.output, callbackReturn); // when jpegjs bug fixed, only need this line + /* the previuos error seems already corrected */ + capture(options.output, callbackReturn); // when jpegjs bug fixed, only need this line function callbackReturn(error, success) { // called from capture @@ -19,26 +14,12 @@ module.exports = function(options, callback) { callback(error, options); } - function uniqueId() { - function s4() { - return Math.floor((1 + Math.random()) * 0x10000) - .toString(16) - .substring(1); - } - return s4() + s4() + '-' + s4() + '-' + s4() + '-' + - s4() + '-' + s4() + s4() + s4(); - } - - function extension(file) { - return path.extname(file).toLowerCase().substring(1); - } - function capture(output, callback) { var cmd = "screencapture"; var args = [ // will create PNG by default "-t", - path.extname(output).toLowerCase().substring(1), + path.extname(file).toLowerCase().substring(1), "-x", output ]; diff --git a/module.js b/module.js index 2b33793..ca5fd0b 100755 --- a/module.js +++ b/module.js @@ -21,7 +21,7 @@ function Screenshot(args) { }); } catch(error) { - if(typeof error == "object" && typeof error.code === "string" && error.code === "MODULE_NOT_FOUND") + if(typeof error === "object" && typeof error.code === "string" && error.code === "MODULE_NOT_FOUND") handleCallback("unsupported_platform"); } @@ -60,8 +60,8 @@ Screenshot.prototype.processImage = function(input, output, options, callback) { if(error) { callback(error); } - fs.unlink(input, function(error) { - callback(error, buffer); + fs.unlink(input, function(errorUnlink) { + callback(errorUnlink, buffer); }) }); } else { From ddf002394ba31116acdc725c4c5504fd48086f15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Gonz=C3=A1lez?= Date: Tue, 17 Oct 2017 23:16:32 -0300 Subject: [PATCH 6/8] fix buffered MIME_PNG to AUTO --- module.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module.js b/module.js index ca5fd0b..a6bf544 100755 --- a/module.js +++ b/module.js @@ -56,7 +56,7 @@ Screenshot.prototype.processImage = function(input, output, options, callback) { image.quality(Math.floor(options.quality)); // only works with JPEGs if(options.buffered){ - image.getBuffer(jimp.MIME_PNG, function(error, buffer) { + image.getBuffer(jimp.AUTO, function(error, buffer) { if(error) { callback(error); } From a25ecd6481c420ed0b4bae22752e2763b467b5bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Gonz=C3=A1lez?= Date: Tue, 17 Oct 2017 23:29:57 -0300 Subject: [PATCH 7/8] add index for capture folder to load platforms as a module --- capture/index.js | 6 ++++++ module.js | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 capture/index.js diff --git a/capture/index.js b/capture/index.js new file mode 100644 index 0000000..eab42ef --- /dev/null +++ b/capture/index.js @@ -0,0 +1,6 @@ +'use strict' +exports = module.exports = { + darwin: require('./darwin'), + linux: require('./linux'), + win32: require('./win32') +} \ No newline at end of file diff --git a/module.js b/module.js index a6bf544..0ef6d9d 100755 --- a/module.js +++ b/module.js @@ -5,13 +5,14 @@ module.exports = function() { var path = require('path'); var jimp = require('jimp'); var fs = require('fs'); +var capture = require('./capture') function Screenshot(args) { var config = this.parseArgs(args); var self = this; try { - require("./capture/" + process.platform + ".js")(config.options, function(error, options) { + capture[process.platform](config.options, function(error, options) { // TODO add option for string, rather than file if(error && typeof config.callback === "function") config.callback(error, null); @@ -88,7 +89,7 @@ Screenshot.prototype.parseArgs = function(args) { config.callback = args[property]; break; case "object": - if(args[property] != null) + if(args[property] !== null) config.options = args[property]; break; } From f0da3bb7c5b2ff3f61d307ea63dfff327b54f22c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Gonz=C3=A1lez?= Date: Tue, 17 Oct 2017 23:35:27 -0300 Subject: [PATCH 8/8] remove unnecesary try/catch --- module.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/module.js b/module.js index 0ef6d9d..27e419a 100755 --- a/module.js +++ b/module.js @@ -11,19 +11,17 @@ function Screenshot(args) { var config = this.parseArgs(args); var self = this; - try { + if(capture[process.platform]){ capture[process.platform](config.options, function(error, options) { - // TODO add option for string, rather than file - if(error && typeof config.callback === "function") - config.callback(error, null); - else if(!error) { - self.processImage(options.output, options.output, options, handleCallback); - } - }); - } - catch(error) { - if(typeof error === "object" && typeof error.code === "string" && error.code === "MODULE_NOT_FOUND") - handleCallback("unsupported_platform"); + // TODO add option for string, rather than file + if(error && typeof config.callback === "function") + config.callback(error, null); + else if(!error) { + self.processImage(options.output, options.output, options, handleCallback); + } + }); + } else { + handleCallback("unsupported_platform"); } function handleCallback(error, success) {