update example with compressPNG
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
/build
|
||||
/lib
|
||||
/node_modules
|
||||
/test/results
|
||||
/test/results
|
||||
image.png
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user