diff --git a/dist/image-sequencer.js b/dist/image-sequencer.js index 8fceb584..41489bb9 100755 --- a/dist/image-sequencer.js +++ b/dist/image-sequencer.js @@ -46816,6 +46816,8 @@ module.exports = function Average(options, UI){ // report back and store average in metadata: options.step.metadata.averages = sum; console.log("average: ", sum); + // TODO: refactor into a new "display()" method as per https://github.com/publiclab/image-sequencer/issues/242 + if (options.step.inBrowser && options.step.ui) $(options.step.ui).find('.details').append("
Averages (r, g, b, a): " + sum.join(', ') + "
"); return pixels; } diff --git a/dist/image-sequencer.min.js b/dist/image-sequencer.min.js index 621e4285..bb321ca8 100644 --- a/dist/image-sequencer.min.js +++ b/dist/image-sequencer.min.js @@ -1 +1 @@ -!function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(a)return a(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return i(n||e)},f,f.exports,e,t,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;ol;)u=T[p++],c 3)throw"Disposal out of range.";var m=!1,_=0;if(void 0!==l.transparent&&null!==l.transparent&&(m=!0,(_=l.transparent)<0||_>=h))throw"Transparent color index.";if((0!==v||m||0!==g)&&(e[i++]=33,e[i++]=249,e[i++]=4,e[i++]=v<<2|(!0===m?1:0),e[i++]=255&g,e[i++]=g>>8&255,e[i++]=_,e[i++]=0),e[i++]=44,e[i++]=255&t,e[i++]=t>>8&255,e[i++]=255&n,e[i++]=n>>8&255,e[i++]=255&r,e[i++]=r>>8&255,e[i++]=255&a,e[i++]=a>>8&255,e[i++]=!0===f?128|p-1:0,!0===f)for(var w=0,b=c.length;w>16&255,e[i++]=y>>8&255,e[i++]=255&y}i=function(e,t,n,r){e[t++]=n;var i=t++,a=1< =3&&0===e.bl_tree[2*M[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),u=e.opt_len+3+7>>>3,(l=e.static_len+3+7>>>3)<=u&&(u=l)):u=l=n+5,n+4<=u&&-1!==t?te(e,t,n,r):e.strategy===i||l===u?(q(e,(f<<1)+(r?1:0),3),$(e,R,I)):(q(e,(c<<1)+(r?1:0),3),function(e,t,n,r){var i;for(q(e,t-257,5),q(e,n-1,5),q(e,r-4,4),i=0;i=f&&(j-=f),n++,0===_&&(_=1),n%_==0)for(E-=E/c,(S=(A-=A/g)>>p)<=1&&(S=0),l=0;l>=o,n[e][1]>>=o,n[e][2]>>=o,n[e][3]=e}(),function(){var e,t,r,o,s,u,l=0,f=0;for(e=0;e>1,t=l+1;t>1,t=l+1;t<256;t++)E[t]=a}()},this.getColormap=function(){for(var e=[],t=[],r=0;r=0;)f=u?f=i:(f++,s<0&&(s=-s),(a=o[0]-e)<0&&(a=-a),(s+=a)=0&&((s=t-(o=n[c])[1])>=u?c=-1:(c--,s<0&&(s=-s),(a=o[0]-e)<0&&(a=-a),(s+=a)0)if(t.ended&&!a){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&a){s=new Error("stream.unshift() after end event");e.emit("error",s)}else!t.decoder||a||i||(r=t.decoder.write(r)),a||(t.reading=!1),t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,a?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&g(e)),function(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(function(){!function(e,t){var n=t.length;for(;!t.reading&&!t.flowing&&!t.ended&&t.length=this.size&&(e^=this.primitive,e&=this.size-1);for(t=0;ta;)w=d[w]>>8,++_;var b=w;if(h+_+(m!==v?1:0)>r)return void console.log("Warning, gif stream longer than expected.");n[h++]=b;var y=h+=_;for(m!==v&&(n[h++]=b),w=m;_--;)w=d[w],n[--y]=255&w,w>>=8;null!==g&&s<4096&&(d[s++]=g<<8|b,s>=l+1&&u<12&&(++u,l=l<<1|1)),g=v}else s=o+1,l=(1<<(u=i+1))-1,g=null}return h!==r&&console.log("Warning, gif stream shorter than expected."),n}try{n.GifWriter=function(e,t,n,r){var i=0,a=void 0===(r=void 0===r?{}:r).loop?null:r.loop,o=void 0===r.palette?null:r.palette;if(t<=0||n<=0||t>65535||n>65535)throw"Width/Height invalid.";function s(e){var t=e.length;if(t<2||t>256||t&t-1)throw"Invalid code/color length, must be power of 2 and 2 .. 256.";return t}e[i++]=71,e[i++]=73,e[i++]=70,e[i++]=56,e[i++]=57,e[i++]=97;var u=0,l=0;if(null!==o){for(var f=s(o);f>>=1;)++u;if(f=1<=f)throw"Background index out of range.";if(0===l)throw"Background index explicitly passed as 0."}}if(e[i++]=255&t,e[i++]=t>>8&255,e[i++]=255&n,e[i++]=n>>8&255,e[i++]=(null!==o?128:0)|u,e[i++]=l,e[i++]=0,null!==o)for(var c=0,h=o.length;c0&&(0===e||1!==S))return-1;for(z[1]=0,k=1;k<15;k++)z[k+1]=z[k]+D[k];for(E=0;E852||2===e&&j>592)return 1;for(;;){0,w=k-R,c[E]<_?(b=0,y=c[E]):c[E]>_?(b=P[O+c[E]],y=L[B+c[E]]):(b=96,y=0),p=1<852||2===e&&j>592)return 1;l[g=C&v]=T<<24|M<<16|m-f|0}}return 0!==C&&(l[m+C]=k-R<<24|64<<16|0),h.bits=T,0}},{"../utils/common":70}],78:[function(e,t,n){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],79:[function(e,t,n){"use strict";var r=e("../utils/common"),i=4,a=0,o=1,s=2;function u(e){for(var t=e.length;--t>=0;)e[t]=0}var l=0,f=1,c=2,h=29,p=256,d=p+1+h,g=30,v=19,m=2*d+1,_=15,w=16,b=7,y=256,x=16,k=17,E=18,A=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],S=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],M=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],R=new Array(2*(d+2));u(R);var I=new Array(2*g);u(I);var j=new Array(512);u(j);var C=new Array(256);u(C);var L=new Array(h);u(L);var B,D,z,P=new Array(g);function O(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function N(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function U(e){return e<256?j[e]:j[256+(e>>>7)]}function F(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function q(e,t,n){e.bi_valid>w-n?(e.bi_buf|=t<