Skip to content

Commit

Permalink
fix tripviss#33: force white background when converting jpeg to png
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed Dec 27, 2016
1 parent d226667 commit 479b2c7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/streams/optimize.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ module.exports = function () {

// if a specific output format is specified, set it
if (image.outputFormat) {
if (image.outputFormat === 'jpeg') {
r.background('#FFFFFF').flatten();
}
r.toFormat(image.outputFormat);
}

Expand All @@ -53,4 +56,4 @@ module.exports = function () {
});
});

};
};

0 comments on commit 479b2c7

Please sign in to comment.