Using Tools

All pixie tools can be used programmatically without the need to show or even open pixie interface.

See more examples and documentation on exporting in export tool documentation.

Example for resizing and getting data

var pixie = new Pixie({
    onLoad: function() {
        pixie.tools.resize.apply(800, 400);
        var base64ImageData = pixie.tools.export.getDataUrl('png');
        var base64ImageData = pixie.tools.export.getDataUrl('png');
    }
});

Example for resizing and exporting

var pixie = new Pixie({
    onLoad: function() {
        pixie.tools.resize.apply(800, 400);
        pixie.tools.export.export('imageName', 'png', 0.8);
    }
});