mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Initial commit
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
var ns = $.namespace("pskl.controller.settings");
|
var ns = $.namespace("pskl.controller.settings");
|
||||||
|
|
||||||
var URL_MAX_LENGTH = 60;
|
var URL_MAX_LENGTH = 60;
|
||||||
|
var MAX_GIF_COLORS = 256;
|
||||||
|
|
||||||
ns.GifExportController = function (piskelController) {
|
ns.GifExportController = function (piskelController) {
|
||||||
this.piskelController = piskelController;
|
this.piskelController = piskelController;
|
||||||
@@ -114,9 +115,10 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
ns.GifExportController.prototype.renderAsImageDataAnimatedGIF = function(zoom, fps, cb) {
|
ns.GifExportController.prototype.renderAsImageDataAnimatedGIF = function(zoom, fps, cb) {
|
||||||
|
var preserveColors = pskl.app.currentColorsService.getCurrentColors().length < MAX_GIF_COLORS;
|
||||||
var gif = new window.GIF({
|
var gif = new window.GIF({
|
||||||
workers: 2,
|
workers: 2,
|
||||||
quality: 10,
|
quality: 1,
|
||||||
width: this.piskelController.getWidth()*zoom,
|
width: this.piskelController.getWidth()*zoom,
|
||||||
height: this.piskelController.getHeight()*zoom
|
height: this.piskelController.getHeight()*zoom
|
||||||
});
|
});
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user