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

Commit

Permalink
update example with compressPNG
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemorris committed Feb 26, 2015
1 parent fc6f0dd commit 848fa66
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/build
/lib
/node_modules
/test/results
/test/results
image.png
6 changes: 4 additions & 2 deletions examples/load-from-fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ var map = new mbgl.Map(fileSource);
map.load(require('../test/fixtures/style.json'));
map.render({}, function(err, image) {
if (err) throw err;
fs.writeFileSync('image.png', image);
console.warn('Written image.png');
mbgl.compressPNG(image, function(err, png) {
fs.writeFileSync('image.png', png);
console.warn('Written image.png');
});
});

0 comments on commit 848fa66

Please sign in to comment.