Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
fix: resize png to original screen size
Browse files Browse the repository at this point in the history
  • Loading branch information
lkuechler authored and marionebl committed May 10, 2018
1 parent ebb8181 commit deb7d2c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/export/png-exporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,12 @@ export class PngExporter extends Exporter {
height: Math.round(config.height * scaleFactor)
},
capture => {
const pngBuffer: Buffer = capture.toPNG();
// resize the capture to the original screen size
const resizedCapture = capture.resize({
width: config.width
});

const pngBuffer: Buffer = resizedCapture.toPNG();
resolve(pngBuffer);

setTimeout(() => {
Expand Down

0 comments on commit deb7d2c

Please sign in to comment.