penrose 0.2.32 → 0.2.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/penrose.js +4 -3
  2. package/package.json +1 -1
package/lib/penrose.js CHANGED
@@ -354,11 +354,12 @@ Penrose.prototype = {
354
354
  const $svg = cheerio.load(result.svg)('svg');
355
355
  const width = Math.ceil(exToPx($svg.attr('width'), config.ex));
356
356
  const height = Math.ceil(exToPx($svg.attr('height'), config.ex));
357
-
358
- return svg2png(buffer, {
357
+ const resize = {
359
358
  width: width,
360
359
  height: height
361
- });
360
+ };
361
+
362
+ return sharp(buffer).resize(resize).toBuffer();
362
363
  })
363
364
  .then((buffer) => fs.writeFileAsync(outputResolved, buffer));
364
365
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "penrose",
3
- "version": "0.2.32",
3
+ "version": "0.2.33",
4
4
  "description": "Build derivative images",
5
5
  "main": "lib/penrose.js",
6
6
  "repository": {