Skip to content

Commit

Permalink
some small fixes in different places; approaching to fix gif transpar…
Browse files Browse the repository at this point in the history
…ency
  • Loading branch information
Oleksandr Yanovych committed Sep 26, 2016
1 parent 8ed8edb commit f8b299c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/components/frame/frame.styl
Expand Up @@ -4,6 +4,7 @@
display: inline-block
position: relative
margin-right: 10px
vertical-align: middle
// background: #1B2631
background: url(../../images/tile-light.png) repeat
border: 4px solid #40606d
Expand Down
2 changes: 1 addition & 1 deletion src/libs/gif/GIFEncoder.js
Expand Up @@ -341,7 +341,7 @@ const GIFEncoder = function() {
var dg = g - (colorTab[i++] & 0xff);
var db = b - (colorTab[i] & 0xff);
var d = dr * dr + dg * dg + db * db;
var index = i / 3;
var index = i / 3 | 0;
if (usedEntry[index] && (d < dmin)) {
dmin = d;
minpos = index;
Expand Down
3 changes: 2 additions & 1 deletion src/workers/generateGif.worker.js
Expand Up @@ -14,9 +14,10 @@ self.onmessage = event => {
const encoder = new GIFEncoder(); //create a new GIFEncoder for every new job

encoder.setRepeat(0);
// encoder.setQuality(10);
encoder.setDelay(delay);
encoder.setSize(width, height);
encoder.setTransparent(0xffffff);
encoder.setTransparent(0x000000);

if(frameNum == 0) {
encoder.start();
Expand Down

0 comments on commit f8b299c

Please sign in to comment.