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

Commit

Permalink
Attempt to fix invalid image path when exporting to video in Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
aumouvantsillage committed Aug 1, 2017
1 parent 011ce9e commit 7ed1810
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ exports.convertToVideo = function (inputFileName, options) {
// Convert a sequence of image files
"-f", "image2",
// The list of image files
"-i", path.join(tmpDir.name, "%d.png"),
"-i", path.join(tmpDir.name, "img%d.png"),
// The video bit rate
"-b:v", options.bitRate,
// Overwrite the output file without asking
Expand Down
6 changes: 3 additions & 3 deletions lib/sozi-to-pdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"use strict";

var system = require("system");
var fs = require("fs");
var page = require("webpage").create();
var tmpDir;

Expand All @@ -20,9 +21,8 @@ page.onConsoleMessage = function (msg) {
* Render the current page into a PDF file.
* Called from sandboxed Javascript.
*/
page.onCallback = function (fileName) {
// page.zoomFactor = 0.5;
page.render(tmpDir + "/" + fileName + ".png", {format: "png", quality: 100});
page.onCallback = function (index) {
page.render(tmpDir + fs.separator + "img" + index + ".png", {format: "png", quality: 100});
};

/*
Expand Down
6 changes: 3 additions & 3 deletions lib/sozi-to-video.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"use strict";

var system = require("system");
var fs = require("fs");
var page = require("webpage").create();
var tmpDir;
var Timing = require("./Timing");
Expand All @@ -21,9 +22,8 @@ page.onConsoleMessage = function (msg) {
* Render the current page into a PDF file.
* Called from sandboxed Javascript.
*/
page.onCallback = function (fileName) {
// page.zoomFactor = 0.5;
page.render(tmpDir + "/" + fileName + ".png", {format: "png", quality: 100});
page.onCallback = function (index) {
page.render(tmpDir + fs.separator + "img" + index + ".png", {format: "png", quality: 100});
};

/*
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sozi-export",
"version": "17.07.30",
"version": "17.08.01",
"description": "Convert a Sozi presentation to PDF, PPTX or video",
"author": "Guillaume Savaton",
"license": "MPL-2.0",
Expand Down

0 comments on commit 7ed1810

Please sign in to comment.