Skip to content

Commit 35dd341

Browse files
committed
Fix bug in filter color. Should be 0-1 instead of 0-255.
1 parent a8f4aea commit 35dd341

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

build/scripting/Host.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -900,9 +900,9 @@ var CCLScripting = function(workerUrl){
900900
cG = Math.floor((filter.params.color % 65536)/256),
901901
cB = filter.params.color % 256;
902902
var cMatrix = [
903-
0,0,0,cR,0,
904-
0,0,0,cG,0,
905-
0,0,0,cB,0,
903+
0,0,0,cR/256,0,
904+
0,0,0,cG/256,0,
905+
0,0,0,cB/256,0,
906906
0,0,0,1,0,
907907
];
908908
dFilter.appendChild(__("feColorMatrix",{

src/scripting/Unpacker.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -599,9 +599,9 @@
599599
cG = Math.floor((filter.params.color % 65536)/256),
600600
cB = filter.params.color % 256;
601601
var cMatrix = [
602-
0,0,0,cR,0,
603-
0,0,0,cG,0,
604-
0,0,0,cB,0,
602+
0,0,0,cR/256,0,
603+
0,0,0,cG/256,0,
604+
0,0,0,cB/256,0,
605605
0,0,0,1,0,
606606
];
607607
dFilter.appendChild(__("feColorMatrix",{

0 commit comments

Comments
 (0)