We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f51db95 commit eddfedeCopy full SHA for eddfede
lib/linux/index.js
@@ -143,9 +143,11 @@ function linuxSnapshot (options = {}) {
143
encoding: 'buffer',
144
maxBuffer: maxBuffer(screens)
145
}
146
+ const extension = path.extname(filename) || '.jpeg'
147
+ const filetype = extension.substr(1)
148
149
exec(
- `import -silent -window root -crop ${screen.crop} -screen jpeg:${filename} `,
150
+ `import -silent -window root -crop ${screen.crop} -screen ${filetype}:${filename} `,
151
execOptions,
152
(err, stdout) => {
153
if (err) {
0 commit comments