diff options
Diffstat (limited to 'js')
| -rw-r--r-- | js/color.js | 6 | ||||
| -rw-r--r-- | js/vendor/gif-encode/client.js | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/js/color.js b/js/color.js index a6e1317..34404cd 100644 --- a/js/color.js +++ b/js/color.js @@ -205,7 +205,7 @@ function rgb2cmy (R,G,B){ return [C,M,Y] } function cmy2rgb (C,M,Y){ - if (CMY.length) { + if (C.length) { Y = C[2] M = C[1] C = C[0] @@ -216,7 +216,7 @@ function cmy2rgb (C,M,Y){ return [R,G,B] } function cmy2cmyk (C,M,Y) { - if (CMY.length) { + if (C.length) { Y = C[2] M = C[1] C = C[0] @@ -241,7 +241,7 @@ function cmy2cmyk (C,M,Y) { return [C,M,Y,K] } function cmyk2cmy (C,M,Y,K) { - if (CMYK.length) { + if (C.length) { K = C[3] Y = C[2] M = C[1] diff --git a/js/vendor/gif-encode/client.js b/js/vendor/gif-encode/client.js index 8116bf0..c441b47 100644 --- a/js/vendor/gif-encode/client.js +++ b/js/vendor/gif-encode/client.js @@ -141,6 +141,9 @@ function GifEncoder(){ } var encode = this.encode = function (nq, ct) { + if (! canvases.length) { + throw Error ("No frames to encode") + } nq = nq || neuquant ct = ct || colortab |
